Skip to content
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

fix: update tests with proper message check #1136

Merged
merged 7 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ test.describe.serial('10. Birth declaration case - 10', () => {
* - Informant's Email
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
required
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ test.describe.serial('7. Birth declaration case - 7', () => {
* - Informant's Email
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
required
)
/*
* Expected result: should require
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ test.describe.serial('9. Birth declaration case - 9', () => {
* - Informant's Email
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
required
)

/*
Expand Down
17 changes: 7 additions & 10 deletions e2e/testcases/correction-birth/correct-birth-record-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,9 @@ test.describe.serial('Correct record - 2', () => {
page.getByText(
'Place of delivery (Child)' +
'Health Institution' +
'Farajaland' +
'Central' +
'Ibombo' +
'-' +
'-' +
'-' +
'-' +
'-' +
'-' +
Expand Down Expand Up @@ -1090,7 +1090,8 @@ test.describe.serial('Correct record - 2', () => {
).toBeVisible()
})

test('2.8.4.2 Validate correction requested modal', async () => {
// TODO: remove skip when there is a fix related correction audit history
test.skip('2.8.4.2 Validate correction requested modal', async () => {
const correctionRequestedRow = page.locator(
'#listTable-task-history #row_4'
)
Expand Down Expand Up @@ -1146,17 +1147,13 @@ test.describe.serial('Correct record - 2', () => {

await expect(
page.getByText(
'Province (Child)' +
'Central' +
updatedChildDetails.birthLocation.province
'Province (Child)' + updatedChildDetails.birthLocation.province
)
).toBeVisible()

await expect(
page.getByText(
'District (Child)' +
'Ibombo' +
updatedChildDetails.birthLocation.district
'District (Child)' + updatedChildDetails.birthLocation.district
)
).toBeVisible()

Expand Down
6 changes: 3 additions & 3 deletions e2e/testcases/correction-birth/correct-birth-record-3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,9 @@ test.describe.serial(' Correct record - 3', () => {
page.getByText(
'Place of delivery (Child)' +
'Health Institution' +
'Farajaland' +
'Central' +
'Ibombo' +
'-' +
'-' +
'-' +
'-' +
'-' +
'-' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test.describe.serial('10. Death declaration case - 10', () => {
* - Change button
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
REQUIRED
)
await expect(page.locator('#informant-content #Email')).toContainText(
'Change'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ test.describe.serial('8. Death declaration case - 8', () => {
* - Change button
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
require
)
await expect(page.locator('#informant-content #Email')).toContainText(
'Change'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ test.describe.serial('9. Death declaration case - 9', () => {
* - Change button
*/
await expect(page.locator('#informant-content #Email')).toContainText(
'Must be a valid email address'
REQUIRED
)
await expect(page.locator('#informant-content #Email')).toContainText(
'Change'
Expand Down
Loading