Skip to content

Commit

Permalink
fix: correction-birth
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 committed Sep 30, 2024
1 parent 3ee7b7b commit 033bba0
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 21 deletions.
19 changes: 16 additions & 3 deletions e2e/testcases/correction-birth/correct-birth-record-2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ test.describe.serial('Correct record - 2', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()
await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()

await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
Expand Down Expand Up @@ -918,8 +925,14 @@ test.describe.serial('Correct record - 2', () => {
})

test('2.8.2 Correction review', async () => {
await page.getByRole('button', { name: 'Review', exact: true }).click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Review correction request/
})
.click()
/*
* Expected result: should show
* - Submitter
Expand Down
36 changes: 30 additions & 6 deletions e2e/testcases/correction-birth/correct-birth-record-3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,14 @@ test.describe.serial(' Correct record - 3', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()
await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()

await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
Expand Down Expand Up @@ -151,15 +158,26 @@ test.describe.serial(' Correct record - 3', () => {
await page.getByLabel('Assign record').click()
await page.getByRole('button', { name: 'Assign', exact: true }).click()

await page.getByRole('button', { name: 'Action', exact: true }).click()

/*
* Expected result: should show correct record button
* Expected result: should show correct record button in action menu
*/
await expect(
page.getByRole('button', { name: 'Correct record', exact: true })
page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
).toBeVisible()

await page
.getByRole('button', { name: 'Correct record', exact: true })
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
.click()
})
})
Expand Down Expand Up @@ -892,8 +910,14 @@ test.describe.serial(' Correct record - 3', () => {
})

test('3.8.2 Correction review', async () => {
await page.getByRole('button', { name: 'Review', exact: true }).click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Review correction request/
})
.click()
/*
* Expected result: should show
* - Submitter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ test.describe.serial(' Correct record - 4', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.getByRole('button', { name: 'Correct record', exact: true })
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
.click()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ test.describe.serial(' Correct record - 5', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()
await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()

await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
Expand Down
17 changes: 14 additions & 3 deletions e2e/testcases/correction-birth/correct-birth-record-6.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,14 @@ test.describe.serial(' Correct record - 6', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()
await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()

await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
Expand Down Expand Up @@ -139,9 +146,13 @@ test.describe.serial(' Correct record - 6', () => {
/*
* Expected result: should show correct record button
*/

await page.getByRole('button', { name: 'Action' }).click()
await page
.getByRole('button', { name: 'Correct record', exact: true })
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
.click()
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,13 @@ test.describe.serial(' Correct record - 7', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.getByRole('button', { name: 'Correct record', exact: true })
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
.click()
})

Expand Down
10 changes: 8 additions & 2 deletions e2e/testcases/correction-birth/correct-birth-record-8.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@ test.describe.serial(' Correct record - 8', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()
await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
await page.getByRole('button', { name: 'No, make correction' }).click()
Expand Down
18 changes: 14 additions & 4 deletions e2e/testcases/correction-birth/correct-birth-record-9.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ test.describe.serial(' Correct record - 9', () => {
await page.locator('#ListItemAction-0-icon').click()
await page.locator('#name_0').click()

await page.getByRole('button', { name: 'Print', exact: true }).click()

await page.getByRole('button', { name: 'Action' }).click()
await page
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Print certified copy/
})
.click()
await page.getByLabel('Print in advance').check()
await page.getByRole('button', { name: 'Continue' }).click()
await page.getByRole('button', { name: 'Yes, print certificate' }).click()
Expand Down Expand Up @@ -139,9 +145,13 @@ test.describe.serial(' Correct record - 9', () => {
/*
* Expected result: should show correct record button
*/

await page.getByRole('button', { name: 'Action' }).click()
await page
.getByRole('button', { name: 'Correct record', exact: true })
.locator('#action-dropdownMenu')
.getByRole('listitem')
.filter({
hasText: /Correct Record/
})
.click()
})
})
Expand Down

0 comments on commit 033bba0

Please sign in to comment.