-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [DHIS2-17102] edit event navigation (#3592)
- Loading branch information
1 parent
3a93911
commit 85a6f62
Showing
13 changed files
with
90 additions
and
54 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
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 @@ | ||
Feature: User interacts with a single event page view/edit form | ||
|
||
Scenario: The single event is edited and the changes are reflected in the working list | ||
Given you open the main page with Ngelehun and antenatal care context | ||
And you open the first event in the list | ||
And you complete and save the event | ||
Then you are redirected to the main page and the event status Completed is displayed in the list | ||
And you open the first event in the list | ||
And you incomplete and save the event | ||
Then you are redirected to the main page and the event status Active is displayed in the list |
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,40 @@ | ||
import { Given, Then, defineStep as And } from '@badeball/cypress-cucumber-preprocessor'; | ||
import '../../sharedSteps'; | ||
|
||
Given('you open the main page with Ngelehun and antenatal care context', () => { | ||
cy.visit('#/?programId=lxAQ7Zs9VYR&orgUnitId=DiszpKrYNg8'); | ||
}); | ||
|
||
And('you open the first event in the list', () => { | ||
cy.get('[data-test="online-list-table"]').within(() => { | ||
cy.get('[data-test="dhis2-uicore-tablebody"]') | ||
.find('tr') | ||
.eq(0) | ||
.click(); | ||
}); | ||
}); | ||
|
||
And('you (incomplete)(complete) and save the event', () => { | ||
cy.contains('Edit event') | ||
.click(); | ||
|
||
cy.get('[data-test="dataentry-field-complete"]') | ||
.find('input') | ||
.click() | ||
.blur(); | ||
|
||
cy.get('[data-test="dhis2-uicore-button"]') | ||
.contains('Save') | ||
.click(); | ||
}); | ||
|
||
Then(/^you are redirected to the main page and the event status (.*) is displayed in the list/, (status) => { | ||
cy.url().should('include', 'programId=lxAQ7Zs9VYR'); | ||
cy.url().should('include', 'orgUnitId=DiszpKrYNg8'); | ||
cy.get('[data-test="online-list-table"]').within(() => { | ||
cy.get('[data-test="dhis2-uicore-tablebody"]') | ||
.find('tr') | ||
.eq(0) | ||
.contains(status); | ||
}); | ||
}); |
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
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