-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Rewrites unit tests for FirstStep.vue #149
Conversation
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.
Great start, @JackieBinya ! Could you please delete the old file and lint your tests (there are some quotes, extra spaces etc problems).
tests/e2e/specs/FirstStep.js
Outdated
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' |
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.
Both attributionHeader and ccLicenseHeader basically contain the same text, because parent div of h5 (attributionHeader), and the both should be visible, whether you click yes, no, or don't click at all. What you should better check for is the text inside them: is it Attribution or Creative Commons license.
tests/e2e/specs/FirstStep.js
Outdated
.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') |
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.
Next button is always visible, but it is disabled before you click yes/no, you can test for that before/after you click on radio buttons.
Fixes
Fixes to #148 by @JackieBinya
Description
Tests
npm run test:unit FirstStep1.spec.js
to run the old unit testsnpm run test:unit FirstStep.spec.js
npm run test
npm run test:e2e -- --tag first
on the terminalScreenshots
The Problem
The solution
Note
Checklist
Update index.md
).master
branch of the repository.visible errors.
Developer Certificate of Origin
Developer Certificate of Origin