This repository was archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
cypress pack initial commit #1247
Merged
Merged
Changes from all commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
449c4c2
[WIP] cypress pack initial commit
khalidelaggan e8f092a
Added the first 101 test for RCMP QC training
khalidelaggan ca7501f
remove unwanted tests
khalidelaggan 8ec2817
working FormArrayControl component and Adapters for radio and checkboxes
amazingphilippe 43b350c
broken, but added a Field component to ease markup
amazingphilippe 224e8dd
Merge branch 'master' of github.com:cds-snc/report-a-cybercrime into …
amazingphilippe 0554387
rebuilt the howdiditstart page using checkbox component.
amazingphilippe 984bb3f
lint and passing tests. Not all new components have tests
amazingphilippe aa7c496
added a test for FormArrayControl
amazingphilippe 082a5fc
merged with master
amazingphilippe cffe09b
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan 66fe8e5
Merge remote-tracking branch 'origin/checkbox-component' into cypress
khalidelaggan 4ca1052
Resolved Merge Conflict with deleted dev dependencies
khalidelaggan 84c20a6
[RCMP QC] 101 demo and training tests
khalidelaggan 31eb6c2
[RCMP QC Training] How to read fixture data
khalidelaggan 568b310
Merge Master into Cypress
khalidelaggan cf6e693
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan 131cd6f
Added a simple step definition file + cleanups
khalidelaggan 9e5c7eb
Generate e2e test report for RCMP QC team demo
khalidelaggan 4a1cd54
Enabled only HTML output format
khalidelaggan 3d216db
Added Staging url placeholder
khalidelaggan 44d9865
Added axe checks to the HP
khalidelaggan 8a50dae
Added visual test folders
khalidelaggan 1f51a91
Added the correct verb
khalidelaggan 71b08d8
updated with direct path as this won't work on windows
khalidelaggan b57dff6
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan 1a908c0
[Testing] Adding tests - configs
khalidelaggan d078ab1
Adding the missing scripts
khalidelaggan 88de650
Added to the correct workflow
khalidelaggan 3ef3183
Syntax error - try again
khalidelaggan edaddd4
Syntax error -
khalidelaggan d07ec08
Another check failed
khalidelaggan 39c7bd0
another fail testing
khalidelaggan 416037e
Added to ignore
khalidelaggan 83af38c
Added start-server-and-test
khalidelaggan 100c184
More tweaks
khalidelaggan 1a40de5
Testing the CLI
khalidelaggan 8904892
Another test to debug things
khalidelaggan d29e7b1
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan f09098c
Merge branch 'master' into cypress
khalidelaggan fa8c1a8
Merge branch 'master' into cypress
khalidelaggan 50383e2
Merge branch 'master' into cypress
khalidelaggan ad05873
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan 2acd600
Updated
khalidelaggan 3260fef
Update the lock file
khalidelaggan 1d654a0
Merge branch 'master' into cypress
khalidelaggan 2618da4
Merge branch 'master' into cypress
khalidelaggan c3c5dbe
Updated with recent cypress dependencies
khalidelaggan 3c381e9
Cypress dependencies
khalidelaggan 962880d
Testing the action log
khalidelaggan 7530d80
Merge branch 'master' into cypress
khalidelaggan 4dd6a2a
Github actions to run local instance
khalidelaggan 7dba04e
Debugging - Initiate a test without the reference
khalidelaggan ebd5eef
Merge branch 'master' into cypress
khalidelaggan 1731cb7
Debugging - added back the step definition config
khalidelaggan 80d9afc
Merge branch 'cypress' of github.com:cds-snc/report-a-cybercrime into…
khalidelaggan f7f40e6
Debugging - another failed attempt - not reading the cucumber prepro…
khalidelaggan ad74b76
Added QC specs + more defensive coding
khalidelaggan e1e1bec
Testing smart tagging in CI
khalidelaggan 4094414
simplifying the test further
khalidelaggan 130d596
Testing the new upgrade + Firefox support added
khalidelaggan 3bbf26f
Removed testing reports for now
khalidelaggan 7de2f3b
Testing smoke tag with QC
khalidelaggan bb6588d
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan e3a45bd
Merge branch 'master' into cypress
khalidelaggan c11af06
Trigger another test
khalidelaggan 686f60b
Merge branch 'cypress' of github.com:cds-snc/report-a-cybercrime into…
khalidelaggan b4d1103
Merge branch 'master' into cypress
khalidelaggan dbe78de
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan 5c3c0b0
Added a11y tracker + misc
khalidelaggan 7fa607b
Added a11y
khalidelaggan 7faa56d
Merge branch 'cypress' of github.com:cds-snc/report-a-cybercrime into…
khalidelaggan ba80208
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan d19fc73
cleanup
khalidelaggan 01e8c83
Cleanup + add new tests
khalidelaggan 94900c6
Update the package-lock
khalidelaggan f7367e8
Fixed merge conflict
khalidelaggan 587c135
Prepare for minimal testing
khalidelaggan 5d510ec
Merge remote-tracking branch 'origin/master' into cypress
khalidelaggan f60c208
Updated a fresh copy
khalidelaggan b1dc4e9
Running a minimal test in CI
khalidelaggan d85dd3c
No needed for this release
khalidelaggan 3e15927
file sync
khalidelaggan f099db4
Adding more config to properly run a11y
khalidelaggan 3af3c44
Testing configs for a11y
khalidelaggan fec5bce
typo
khalidelaggan d60d080
Merge branch 'master' into cypress
khalidelaggan 98f3e83
Remove the fake passport images
khalidelaggan 3ea3b1f
Merge branch 'cypress' of github.com:cds-snc/report-a-cybercrime into…
khalidelaggan 6dcbb53
Merge branch 'master' into cypress
khalidelaggan 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
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
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "projectId": "qe5gas", | ||
| "testFiles": "**/*.feature", | ||
| "env": { | ||
| "production": "https://report.antifraudcentre.ca", | ||
| "local": "http://localhost:3000/", | ||
| "staging":"https://report-staging.con.rcmp-grc.gc.ca", | ||
| "dev":"https://report-dev.con.rcmp-grc.gc.ca" | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "name": "victim", | ||
| "email": "[email protected]", | ||
| "phone": "000 000 0000", | ||
| "s-p": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", | ||
| "m-p": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ", | ||
| "xl-p": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* |
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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
|
|
||
| Given('I open the report home page', () => { | ||
| cy.visit(Cypress.env('production')) | ||
| }); | ||
|
|
||
| When('I click on create a report button', () => { | ||
| cy.contains('Report now').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I read before you start instructions', () => { | ||
| cy.contains('Start report').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I click cancel button', () => { | ||
| cy.contains('Cancel report').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I confirm the cancellation', () => { | ||
| cy.get('button').contains('Cancel report').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I give the reason to cancel', () => { | ||
| cy.contains('Tell us more').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I give the feedback', () => { | ||
| cy.get('form').find('[value="finalFeedback.wasServiceHard.neutral"]').check({ force: true }) | ||
| cy.get('form').find('[value="finalFeedback.wouldYouUseAgain.yes"]').check({ force: true }) | ||
| cy.get('form').find('[name="howCanWeDoBetter"]').type('testing') | ||
| cy.contains('Submit').first().click({force: true}); | ||
| }); |
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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
|
|
||
| Given('I open the report home page', () => { | ||
| cy.visit(Cypress.env('staging')) | ||
| }); | ||
|
|
||
| Then('Inject axe and check for accessibility issues', () => { | ||
| cy.reportA11y(); | ||
| }); | ||
|
|
||
| When('I click on create a report button', () => { | ||
| cy.contains('Report now').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I read before you start instructions', () => { | ||
| cy.contains('Start report').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I click continue without checking the consent', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| Then('{string} should be shown', (content) => { | ||
| cy.contains(content, {timeout:10000}).should('be.visible') | ||
| }); | ||
|
|
||
| Then('check for accessibility issues', () => { | ||
| cy.reportA11y(); | ||
| }); | ||
|
|
||
| When('I check the consent checkbox', () => { | ||
| cy.get('form').find('[name="consentOptions"]').check({ force: true }) | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| Then('{string} should be shown', (content) => { | ||
| cy.contains(content, {timeout:10000}).should('be.visible') | ||
| }); | ||
|
|
||
| Then('check for accessibility issues', () => { | ||
| cy.reportA11y(); | ||
| }); |
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Feature: Consent | ||
|
|
||
| I want to create an online investgation report | ||
| @consent | ||
| Scenario: Home page | ||
| Given I open the report home page | ||
| Then Inject axe and check for accessibility issues | ||
| When I click on create a report button | ||
| When I read before you start instructions | ||
| When I click continue without checking the consent | ||
| Then "Please accept the terms of the Privacy statement" should be shown | ||
| Then check for accessibility issues | ||
| And I check the consent checkbox | ||
| Then "How did the incident start?" should be shown | ||
| Then check for accessibility issues |
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Feature: Accessibility Checks | ||
| I want to check for Accessibility issues and pass the data to a11y dashboard | ||
| @smoke | ||
| Scenario: Home page | ||
| Given I open the report home page | ||
| Then Inject axe and check for accessibility issues |
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
|
|
||
| Given('I open the report home page', () => { | ||
| cy.visit(Cypress.env('staging')) | ||
| }); | ||
|
|
||
| Then('Inject axe and check for accessibility issues', () => { | ||
| cy.reportA11y(); | ||
| }); |
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Feature: Virus scanning test | ||
| I want to upload a virus infected file to test virus scanning | ||
| Scenario: Home page | ||
| Given I open the report home page | ||
| When I click on create a report button | ||
| When I read before you start instructions | ||
| When I click continue without checking consent | ||
| When "Please accept the terms of the Privacy statement" should be shown | ||
| And I check the consent checkbox | ||
| Then "How did the incident start?" should be shown | ||
| When I navigate to howdiditstart page and click continue | ||
| Then "What do you think could be affected?" should be shown | ||
| When I navigate to Whatcouldbeaffected page and click continue | ||
| Then "What happened?" should be shown | ||
| When I navigate to Whathappened page and click continue | ||
| Then "Add suspect clues" should be shown | ||
| When I navigate to Addsuspectclues page and click continue | ||
| Then "Attach supporting evidence" should be shown | ||
| When upload the virus file | ||
| Then "Enter your location" should be shown | ||
| When I navigate to yourLocation page and click continue | ||
| Then "Enter your contact details" should be shown | ||
| When I navigate to yourContactDetails page and click continue | ||
| Then "Review your report" should be shown | ||
| When I navigate to summary page and click Submit | ||
| Then "Thank you for reporting" should be shown |
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 |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
|
|
||
| Given('I open the report home page', () => { | ||
| cy.visit(Cypress.env('staging')) | ||
| }); | ||
|
|
||
| When('I click on create a report button', () => { | ||
| cy.contains('Report now').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I read before you start instructions', () => { | ||
| cy.contains('Start report').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I click continue without checking consent', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('{string} should be shown', (content) => { | ||
| cy.contains(content, {timeout:10000}).should('be.visible') | ||
| }); | ||
|
|
||
| When('I check the consent checkbox', () => { | ||
| cy.get('form').find('[name="consentOptions"]').check({ force: true }) | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| Then('{string} should be shown', (content) => { | ||
| cy.contains(content, {timeout:10000}).should('be.visible') | ||
| }); | ||
|
|
||
| When('I navigate to howdiditstart page and click continue', () => { | ||
| cy.get('form').find('[value="howManyTimes.once"]').check({ force: true }) | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to Whatcouldbeaffected page and click continue', () => { | ||
| cy.get('form').find('[value="whatWasAffectedForm.other"]').check({ force: true }) | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to Whathappened page and click continue', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to Addsuspectclues page and click continue', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('upload the virus file', () => { | ||
| const virusFile = 'scan.txt'; | ||
| cy.get('#uploader').uploadFile(virusFile, 'txt'); | ||
| cy.wait(1000) | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to yourLocation page and click continue', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to yourContactDetails page and click continue', () => { | ||
| cy.contains('Continue').first().click({force: true}); | ||
| }); | ||
|
|
||
| When('I navigate to summary page and click Submit', () => { | ||
| cy.contains('Submit report').first().click({force: true}); | ||
| }); |
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 |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| Feature: Test the entire report workflow in english | ||
| I want to create an online investgation report | ||
| Scenario: Home page | ||
| Given I open the report home page | ||
| When I click on create a report button | ||
| When I read before you start instructions | ||
| When I click continue without checking consent | ||
| When "Please accept the terms of the Privacy statement" should be shown | ||
| And I check the consent checkbox | ||
| Then "How did the incident start?" should be shown | ||
| When I navigate to howdiditstart page fill all forms | ||
| Then "What do you think could be affected?" should be shown | ||
| When I navigate to Whatcouldbeaffected page fill all forms | ||
| Then "How were your money or finances affected?" should be shown | ||
| When I navigate to Howwereyourmoney page fill all forms | ||
| Then "How was your personal information affected?" should be shown | ||
| When I navigate to Howwaspersonalinformationaffected page fill all forms | ||
| Then "How were your devices or accounts affected?" should be shown | ||
| When I navigate Howwereyourdevicesaffected page fill all forms | ||
| Then "How was your business affected?" should be shown | ||
| When I navigate to Howyourbusinessaffected page fill all forms | ||
| Then "What happened?" should be shown | ||
| When I navigate to Whathappened page fill all forms | ||
| Then "Add suspect clues" should be shown | ||
| When I navigate to Addsuspectclues page fill all forms | ||
| Then "Attach supporting evidence" should be shown | ||
| When I navigate to AttachSupportingEvidence page fill all forms | ||
| Then "Enter your location" should be shown | ||
| When I navigate to yourLocation page fill all forms | ||
| Then "Enter your contact details" should be shown | ||
| When I navigate to yourContactDetails page fill all forms | ||
| Then "Review your report" should be shown | ||
| When I navigate to summary page fill all forms | ||
| Then "Thank you for reporting" should be shown |
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.
Would need to figure out adding this to the secret