Skip to content

Commit cb4e803

Browse files
committed
initial commit
1 parent f261a23 commit cb4e803

30 files changed

+1759
-1
lines changed

.gitignore

+86-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ build/Release
4242
node_modules/
4343
jspm_packages/
4444

45+
# Package-lock
46+
package-lock.json
47+
4548
# Snowpack dependency directory (https://snowpack.dev/)
4649
web_modules/
4750

@@ -102,7 +105,6 @@ dist
102105

103106
# vuepress v2.x temp and cache directory
104107
.temp
105-
.cache
106108

107109
# Docusaurus cache and generated files
108110
.docusaurus
@@ -128,3 +130,86 @@ dist
128130
.yarn/build-state.yml
129131
.yarn/install-state.gz
130132
.pnp.*
133+
134+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
135+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
136+
137+
# User-specific stuff
138+
.idea/**/workspace.xml
139+
.idea/**/tasks.xml
140+
.idea/**/usage.statistics.xml
141+
.idea/**/dictionaries
142+
.idea/**/shelf
143+
144+
# AWS User-specific
145+
.idea/**/aws.xml
146+
147+
# Generated files
148+
.idea/**/contentModel.xml
149+
150+
# Sensitive or high-churn files
151+
.idea/**/dataSources/
152+
.idea/**/dataSources.ids
153+
.idea/**/dataSources.local.xml
154+
.idea/**/sqlDataSources.xml
155+
.idea/**/dynamic.xml
156+
.idea/**/uiDesigner.xml
157+
.idea/**/dbnavigator.xml
158+
159+
# Gradle
160+
.idea/**/gradle.xml
161+
.idea/**/libraries
162+
163+
# Gradle and Maven with auto-import
164+
# When using Gradle or Maven with auto-import, you should exclude module files,
165+
# since they will be recreated, and may cause churn. Uncomment if using
166+
# auto-import.
167+
# .idea/artifacts
168+
# .idea/compiler.xml
169+
# .idea/jarRepositories.xml
170+
# .idea/modules.xml
171+
# .idea/*.iml
172+
# .idea/modules
173+
# *.iml
174+
# *.ipr
175+
176+
# CMake
177+
cmake-build-*/
178+
179+
# Mongo Explorer plugin
180+
.idea/**/mongoSettings.xml
181+
182+
# File-based project format
183+
*.iws
184+
185+
# IntelliJ
186+
out/
187+
188+
# mpeltonen/sbt-idea plugin
189+
.idea_modules/
190+
191+
# JIRA plugin
192+
atlassian-ide-plugin.xml
193+
194+
# Cursive Clojure plugin
195+
.idea/replstate.xml
196+
197+
# SonarLint plugin
198+
.idea/sonarlint/
199+
200+
# Crashlytics plugin (for Android Studio and IntelliJ)
201+
com_crashlytics_export_strings.xml
202+
crashlytics.properties
203+
crashlytics-build.properties
204+
fabric.properties
205+
206+
# Editor-based Rest Client
207+
.idea/httpRequests
208+
209+
# Android studio 3.1+ serialized cache file
210+
.idea/caches/build_file_checksums.ser
211+
212+
#other
213+
./outputs
214+
./allure-report
215+
./allure-results

.idea/.gitignore

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/e2e-codeceptjs-boilerplate.iml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codecept.conf.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const path = require('path');
2+
const playwrightConfig = require('./config/playwright.conf');
3+
const restConfig = require('./config/rest.conf');
4+
const graphqlConfig = require('./config/graphql.conf');
5+
const pluginsConfig = require('./config/plugins.conf');
6+
const multipleConfig = require('./config/multiple.conf');
7+
const gherkinConfig = require('./config/gherkin.conf');
8+
const includeConfig = require('./config/include.conf');
9+
const mochaConfig = require('./config/mocha.conf');
10+
exports.config = {
11+
output: './outputs',
12+
helpers: {
13+
Playwright: playwrightConfig,
14+
REST: restConfig,
15+
GraphQL: graphqlConfig,
16+
FileSystem: {}
17+
},
18+
keepBrowserOpen: false,
19+
mocha: mochaConfig,
20+
plugins: pluginsConfig,
21+
name: 'automation-framework',
22+
gherkin: gherkinConfig,
23+
include: includeConfig,
24+
stepTimeout: 5000,
25+
retryFailedStep: {
26+
enabled: true,
27+
retries: 2
28+
},
29+
multiple: multipleConfig,
30+
waitForNavigation: "load"
31+
};

config/env.conf.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const envConf = {
2+
'env': process.env.E2E_ENV || 'int',
3+
'int': {
4+
'web': {
5+
host_url: 'https://automationexercise.com/'
6+
},
7+
'services': {
8+
end_point: 'https://graphqlzero.almansi.me/api'
9+
},
10+
'servers': {
11+
end_point: 'https://dummyapi.online/api/'
12+
}
13+
}
14+
};
15+
16+
module.exports = envConf;

config/gherkin.conf.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
features: './src/features/*.feature',
3+
steps: './src/step_definitions/*.js'
4+
};

config/graphql.conf.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const envURL = require('./env.conf');
2+
3+
const gql_endpoint = envURL[envURL.env].services.end_point;
4+
5+
module.exports = {
6+
endpoint: gql_endpoint,
7+
defaultHeaders: {
8+
'Content-Type': 'application/json',
9+
'Accept': 'application/json'
10+
},
11+
timeout: 200000
12+
};

config/include.conf.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
I: './steps_file.js',
3+
page: './src/pages/*.js',
4+
customHelper: './custom_helpers/*.js'
5+
};

config/mocha.conf.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
// reporter: 'mochawesome',
3+
// reporterOptions: {
4+
// reportDir: 'mochawesome-report',
5+
// reportFilename: 'report',
6+
// overwrite: false, // Keep previous reports if needed
7+
// html: true, // Generate an HTML report
8+
// json: true, // Generate a JSON report
9+
// },
10+
// timeout: 60000, // Increased timeout for complex tests
11+
// require: 'mochawesome'
12+
};

config/multiple.conf.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
group1: { grep: '@suit1', browsers: ['chromium'] },
3+
group2: { grep: '@suit2', browsers: ['chromium'] },
4+
group3: { grep: '@suit3', browsers: ['chromium'] },
5+
group4: { grep: '@suit4', browsers: ['chromium'] }
6+
};

config/playwright.conf.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const path = require('path');
2+
const envURL = require('./env.conf');
3+
4+
const host_url = envURL[envURL.env].web.host_url;
5+
const downloadDir = path.join(__dirname, '../outputs/Download');
6+
7+
module.exports = {
8+
url: host_url,
9+
show: false, // Headless mode
10+
browser: 'chromium',
11+
waitForTimeout: 30000, // Consistent timeout for all operations
12+
smartWait: 10000, // Smart wait for elements to appear
13+
restart: true,
14+
windowSize: '1280x1024',
15+
keepCookies: false,
16+
keepBrowserState: false,
17+
waitForNavigation: "networkidle", // Wait until network is idle (all resources loaded)
18+
viewport: {
19+
width: 1280,
20+
height: 1024
21+
},
22+
video: true,
23+
videoOptions: {
24+
path: '../outputs/videos',
25+
size: {
26+
width: 1280,
27+
height: 1024
28+
}
29+
},
30+
chromium: {
31+
args: [
32+
'--no-sandbox',
33+
'--start-fullscreen',
34+
'--disable-web-security',
35+
'--safebrowsing-disable-download-protection',
36+
'--disable-setuid-sandbox', // Additional argument for headless stability
37+
'--disable-dev-shm-usage', // Avoid issues with large pages
38+
'--disable-extensions', // Disable extensions for headless mode
39+
'--disable-gpu', // Disable GPU for headless mode (optional, Chromium)
40+
],
41+
acceptDownloads: true,
42+
downloadsPath: downloadDir
43+
},
44+
launchOptions: {
45+
timeout: 60000, // Consistent launch timeout
46+
viewport: {
47+
width: 1280,
48+
height: 1024
49+
},
50+
deviceScaleFactor: 1,
51+
}
52+
};

0 commit comments

Comments
 (0)