-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9 #12
Merged
Merged
#9 #12
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
28c4711
Added demo-app
alexkrechik 74782fc
Added http server. Cucumber script update.
alexkrechik c2a9295
"${pageObject} should be present" step
alexkrechik 08a5e67
Test that correct page was opened
alexkrechik 01f181f
Added pages and id global variables
alexkrechik e4dafdf
main page pageObjects file
alexkrechik 1a345b1
Using of global vars instead of World
alexkrechik 5698ae1
#10
alexkrechik 6b10bca
Using of non-global http-server
alexkrechik 8564fa4
Removed all the semicolons
alexkrechik 9f3ffc4
Added semicolons for the styles back
alexkrechik 4f7eb0a
Should be no ability to store two different eslint files
alexkrechik e3e9b5b
Added linting as required check for travis
alexkrechik 227def1
Some eslint file updates
alexkrechik 43e59cc
Passed linting
alexkrechik 27deb8b
More eslint corrections
alexkrechik bf72ef1
Adding eslint.json "!." mask back
alexkrechik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Run server in background | ||
node_modules/http-server/bin/http-server ./test/demo-app -p 9000 > /dev/null & | ||
server=$! | ||
#Run tests | ||
./node_modules/.bin/wdio test/wdio.conf.js | ||
#Kill server after run | ||
kill -9 ${server} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
'use strict' | ||
|
||
const fs = require('fs'); | ||
const files = fs.readdirSync('./src/steps'); | ||
const fs = require('fs') | ||
const files = fs.readdirSync('./src/steps') | ||
|
||
files.forEach((f) => { | ||
const path = `./src/steps/${f}` | ||
const fileSteps = require(path); | ||
const fileSteps = require(path) | ||
|
||
if (typeof fileSteps === 'function') { | ||
fileSteps.apply(this); | ||
fileSteps.apply(this) | ||
} | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint no-undef: 0 */ | ||
/* eslint new-cap: 0 */ | ||
|
||
const { defineSupportCode } = require('cucumber') | ||
const { pageObject, getPageObject } = require('../helpers/objects.processor') | ||
const { _r } = require('../helpers/utils') | ||
|
||
module.exports = function () { | ||
defineSupportCode(({ Then }) => { | ||
|
||
Then(_r(`^${pageObject} should be present$`), (object) => { | ||
/** | ||
* The element should be present | ||
* @type {PageObject} | ||
*/ | ||
const locator = getPageObject(object) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets try to use no semicolons. |
||
|
||
browser.$(locator).waitForExist() | ||
}) | ||
|
||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>DEMO APP FOR THE WDIO-STEPS</title> | ||
<link rel="stylesheet" href="styles/styles.css"> | ||
<script src="inc/script.js"></script> | ||
</head> | ||
<body> | ||
<div id="header">Header</div> | ||
</body> | ||
</html> |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
let e = {} | ||
|
||
e.txtHeader = '//*[@id="header"]' | ||
|
||
module.exports = e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we will remove this line, then any changes to
.eslintrc.json
will not be tracked by git - are we sure that it should not be tracked?