This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cypress npm scripts): replace scripts with concurrently & wait-…
…on (#154) * chore(cypress npm scripts): replace scripts with concurrently & wait-on * chore: rename test files to match feature and scenario description * chore: remove unused port env var from cypress commands * chore(cypress): add support for SCREENSHOT env var * docs: add Testing section to README
- Loading branch information
Showing
48 changed files
with
483 additions
and
357 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"testFiles": "**/*.feature" | ||
"testFiles": "**/*.feature", | ||
"video": false | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...HeaderBar/The_HeaderBar_contains_a_menu_to_all_apps/The_HeaderBar_contains_a_menu_icon.js
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 @@ | ||
import '../common/index' | ||
|
||
Then('the HeaderBar displays a menu icon', () => { | ||
cy.get('[data-test-id="headerbar-apps-icon"]').should('exist') | ||
}) |
9 changes: 9 additions & 0 deletions
9
...HeaderBar_contains_a_menu_to_all_apps/The_app_menu_closes_when_the_user_clicks_outside.js
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 @@ | ||
import '../common/index' | ||
|
||
When('the user opens the menu', () => { | ||
cy.get('[data-test-id="headerbar-apps-icon"]').click() | ||
}) | ||
|
||
When('the user clicks outside of the menu', () => { | ||
cy.get('[data-test-id="headerbar-title"]').click() | ||
}) |
6 changes: 6 additions & 0 deletions
6
...tion/HeaderBar/The_HeaderBar_contains_a_menu_to_all_apps/The_menu_is_closed_by_default.js
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,6 @@ | ||
import '../common/index' | ||
import './common' | ||
|
||
Then('the HeaderBar dos not display the app menu', () => { | ||
cy.get('[data-test-id="headerbar-apps-menu"]').should('not.exist') | ||
}) |
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
3 changes: 3 additions & 0 deletions
3
cypress/integration/HeaderBar/The_HeaderBar_contains_a_menu_to_all_apps/common.js
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,3 @@ | ||
Then('the HeaderBar dos not display the app menu', () => { | ||
cy.get('[data-test-id="headerbar-apps-menu"]').should('not.exist') | ||
}) |
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
10 changes: 10 additions & 0 deletions
10
.../HeaderBar/The_HeaderBar_contains_a_profile_menu/The_HeaderBar_contains_a_profile_icon.js
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,10 @@ | ||
import '../common/index' | ||
|
||
Then('the HeaderBar displays a profile icon', () => { | ||
cy.get( | ||
` | ||
[data-test-id="headerbar-profile-icon-text"], | ||
[data-test-id="headerbar-profile-icon-image"] | ||
` | ||
).should('be.visible') | ||
}) |
3 changes: 3 additions & 0 deletions
3
...egration/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_menu_is_closed_by_default.js
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,3 @@ | ||
import '../common/index' | ||
|
||
// all step definitions are shared with other scenarios |
14 changes: 14 additions & 0 deletions
14
cypress/integration/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_menu_opens.js
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,14 @@ | ||
import '../common/index' | ||
|
||
When('the user clicks on the profile icons', () => { | ||
cy.get( | ||
` | ||
[data-test-id="headerbar-profile-icon-text"], | ||
[data-test-id="headerbar-profile-icon-image"] | ||
` | ||
).click() | ||
}) | ||
|
||
Then('the menu opens', () => { | ||
cy.get('[data-test-id="headerbar-profile-menu"]').should('be.visible') | ||
}) |
5 changes: 5 additions & 0 deletions
5
...HeaderBar_contains_a_profile_menu/The_profile_menu_closes_when_the_user_clicks_outside.js
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 @@ | ||
import '../common/index' | ||
|
||
When('the user clicks outside of the menu', () => { | ||
cy.get('[data-test-id="headerbar-title"]').click() | ||
}) |
7 changes: 7 additions & 0 deletions
7
...egration/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_user_can_edit_his_profile.js
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,7 @@ | ||
import '../common/index' | ||
|
||
Then('contains a link to edit the profile', () => { | ||
cy.get('[data-test-id="headerbar-profile-edit-profile-link"]').should( | ||
'be.visible' | ||
) | ||
}) |
7 changes: 7 additions & 0 deletions
7
...gration/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_user_can_go_to_his_account.js
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,7 @@ | ||
import '../common/index' | ||
|
||
Then('contains a link to the user account', () => { | ||
cy.get('[data-test-id="headerbar-profile-menu-link-account"]').should( | ||
'be.visible' | ||
) | ||
}) |
7 changes: 7 additions & 0 deletions
7
...eaderBar/The_HeaderBar_contains_a_profile_menu/The_user_can_go_to_the_About_DHIS2_page.js
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,7 @@ | ||
import '../common/index' | ||
|
||
Then('contains a link to the About DHIS2 page', () => { | ||
cy.get('[data-test-id="headerbar-profile-menu-link-about"]').should( | ||
'be.visible' | ||
) | ||
}) |
7 changes: 7 additions & 0 deletions
7
...ation/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_user_can_go_to_the_help_page.js
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,7 @@ | ||
import '../common/index' | ||
|
||
Then('contains a link to the help page', () => { | ||
cy.get('[data-test-id="headerbar-profile-menu-link-help"]').should( | ||
'be.visible' | ||
) | ||
}) |
7 changes: 7 additions & 0 deletions
7
...ration/HeaderBar/The_HeaderBar_contains_a_profile_menu/The_user_can_go_to_the_settings.js
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,7 @@ | ||
import '../common/index' | ||
|
||
Then('contains a link to the settings', () => { | ||
cy.get('[data-test-id="headerbar-profile-menu-link-settings"]').should( | ||
'be.visible' | ||
) | ||
}) |
Oops, something went wrong.