Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FaraziF committed Jun 25, 2020
0 parents commit e26059e
Show file tree
Hide file tree
Showing 15 changed files with 3,869 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
75 changes: 75 additions & 0 deletions codecept.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
const { setHeadlessWhen } = require('@codeceptjs/configure');

// turn on headless mode when running with HEADLESS=true environment variable
// HEADLESS=true npx codecept run
setHeadlessWhen(process.env.HEADLESS);

exports.config = {
tests: 'tests/*_test.js',
output: './output',
helpers: {
WebDriver: {
url: 'https://dokan.ajaira.website/',
browser: 'chrome',
windowSize: '1200x1280',
timeouts: {
"script": 60000,
"page load": 10000
},
}
},
include: {
I: './steps_file.js',
pagesPage: './pages/pages.js',
},
bootstrap: null,
mocha: {},
name: 'dokan',
plugins: {
retryFailedStep: {
enabled: true
},
screenshotOnFail: {
enabled: true
},
allure: {
enabled: true
},
autoLogin: {
enabled: true,
saveToFile: false,
inject: 'loginAs',
users: {
admin: {
login: (I) => {
I.amOnPage('/my-account/');
I.fillField('username', 'Dokan_Admin');
I.fillField('password', 'ohjcw6j3mLdN9q7s$f');
I.checkOption('Remember me');
I.click('login');
I.dontSeeElement('.woocommerce-error');
},
check: (I) => {
I.seeCurrentUrlEquals('/dashboard');
// I.see('Hello admin'); seeInCurrentUrl
I.amOnPage('/wp-admin');
},
},
user: {
login: (I) => {
I.amOnPage('/my-account');
I.fillField('Username or email address', 'jones');
I.fillField('Password', 'aa');
I.checkOption('Remember me');
I.click('login');
I.dontSeeElement('.woocommerce-error');
},
check: (I) => {
I.seeCurrentUrlEquals('/dashboard');
// I.see('Hello daniel');
},
}
},
}
}
}
Binary file added data/black.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"allowJs": true,
}
}
Loading

0 comments on commit e26059e

Please sign in to comment.