-
-
Notifications
You must be signed in to change notification settings - Fork 167
Rewrites unit tests for FirstStep.vue #149
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b047f70
Rewrites unit tests for FirstStep.vue
JackieBinya 788325b
Remove unnecessary definitions line 74&63
JackieBinya d72ce9e
Adds e2e tests
JackieBinya 747047b
Modifies e2e tests, Runs linter on unit tests
JackieBinya 996b8a3
e2e tests
JackieBinya 465fab5
Modifies unit tests and deletes old test file in wrong location
JackieBinya 922c8bb
Updated unit test to use .setChecked() instead of .trigger(change)
JackieBinya 63e1894
Merge branch 'master' into bg-first-step-unit
obulat 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 hidden or 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,18 +1,19 @@ | ||
module.exports = { | ||
'@tags': ['first'], | ||
'FirstStep'(browser){ | ||
const yesRadioSelector = '#site-container > div.columns > div.stepper-container.column > div.step-container.current.enabled > div.step-content > div > div.field.not-selected > label > span.check' | ||
const noRadioSelector = '#site-container > div.columns > div.stepper-container.column > div.step-container.current.enabled > div.step-content > div > div.field.not-selected > label > span.check' | ||
const attributionHeader = '#site-container > div.columns > div.stepper-container.column > div:nth-child(2) > div > h5' | ||
const ccLicenseHeader = '#site-container > div.columns > div.stepper-container.column > div:nth-child(2) > div' | ||
'FirstStep'(browser) { | ||
const radioSelector = 'div.field.not-selected > label > span.control-label > span' | ||
const radioSelected = 'div.field.selected > label > span.control-label > span' | ||
const nextBtn = '.pagination-next' | ||
|
||
const stepTitle = 'div.step-header > h5' | ||
|
||
browser | ||
.init() | ||
.click(yesRadioSelector) | ||
.assert.visible(ccLicenseHeader, 'Click yes:Creative Commons License header is visible in the step below FirstStep') | ||
.assert.visible(nextBtn, 'Next button is visible') | ||
.click(noRadioSelector) | ||
.assert.visible(attributionHeader, 'Click no:Attribution header is visible in the step below FirstStep') | ||
} | ||
} | ||
.assert.containsText(stepTitle, 'Do you know which license you need?') | ||
.assert.containsText(radioSelector, 'Yes. I know which license I need') | ||
.assert.containsText(radioSelected, 'No. I need help selecting a license') | ||
.click(radioSelector) | ||
.assert.not.cssClassPresent(nextBtn, 'disabled') | ||
.assert.containsText(radioSelector, 'No. I need help selecting a license') | ||
.end() | ||
} | ||
} |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.