Skip to content

Commit

Permalink
chore: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed Nov 17, 2023
1 parent 4f4cc23 commit b4c9673
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cypress/e2e/NewEventThroughAddRelationship.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ Feature: User adds events
And you submit the event form with the associated relationship to the already existing person
Then the event and relationship should be sent to the server successfully

Scenario: User gets navigated correctly when clicking on the back button
Given you open the the new event page in Ngelehun and malaria case context
When you navigate to register a person relationship
And you click the cancel button
Then you should be navigated back to the event form
9 changes: 9 additions & 0 deletions cypress/e2e/NewEventThroughAddRelationship/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,12 @@ Then('the event and relationship should be sent to the server successfully', ()
});
});
});

When('you click the cancel button', () => {
cy.get('[data-test="cancel-button"]')
.click();
});

Then('you should be navigated back to the event form', () => {
cy.contains('New Malaria case registration');
});
7 changes: 7 additions & 0 deletions cypress/e2e/NewPage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ Feature: User creates a new entries from the registration page
Then you are navigated to the Antenatal care visit registration page
Then program and organisation unit is still selected in top bar

Scenario: Clicking the cancel button should navigate with correct context
Given you are in the main page with no selections made
And you select org unit
And you select Child Programme
When you click the cancel button
Then you are navigated to the working list with programId IpHINAT79UW


### New event in Antenatal care visit
Scenario: New event in Antenatal care visit > Submitting the form with empty visit date throws validation error
Expand Down

0 comments on commit b4c9673

Please sign in to comment.