Skip to content

Commit

Permalink
Fixed syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Eezi committed Jun 11, 2024
1 parent 949eb2f commit 6e01365
Showing 1 changed file with 49 additions and 50 deletions.
99 changes: 49 additions & 50 deletions e2e/testcases/marriage/7-validate-witness-1-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,60 +52,59 @@ test.describe('7. Validate Witness 1 details page', () => {
LONG_NAME.slice(0, 32)
)
})
})

// 2.1. Enter Non-English characters
test('2.1. Validate "Last Name(s)" text field', async ({ page }) => {
await page.locator('#familyNameEng').fill('O’Neill')
await expect(
page.getByText(
`Input contains invalid characters. Please use only letters (a-z, A-Z), numbers (0-9), hyphens (-), apostrophes(') and underscores (_)`,
{ exact: true }
)
).toBeVisible()
})
// 2.1. Enter Non-English characters
test('2.1. Validate "Last Name(s)" text field', async ({ page }) => {
await page.locator('#familyNameEng').fill('O’Neill')
await expect(
page.getByText(
`Input contains invalid characters. Please use only letters (a-z, A-Z), numbers (0-9), hyphens (-), apostrophes(') and underscores (_)`,
{ exact: true }
)
).toBeVisible()
})

// 2.2. Enter less than 33 English characters
test('2.2. Enter less than 33 English characters', async ({ page }) => {
await page.locator('#familyNamesEng').fill('Rakibul Islam')
await page.getByText('Witness 1 details').click()
// 2.2. Enter less than 33 English characters
test('2.2. Enter less than 33 English characters', async ({ page }) => {
await page.locator('#familyNamesEng').fill('Rakibul Islam')
await page.getByText('Witness 1 details').click()

await expect(page.locator('#familyNamesEng_error')).toBeHidden()
})
await expect(page.locator('#familyNamesEng_error')).toBeHidden()
})

// 2.3. Enter Field as NULL
test('2.3. Enter Field as NULL', async ({ page }) => {
await page.locator('#familyNameEng').click()
await page.locator('#relationship').click()
await expect(
page.getByText('Required for registration', { exact: true })
).toBeVisible()
})
// 2.3. Enter Field as NULL
test('2.3. Enter Field as NULL', async ({ page }) => {
await page.locator('#familyNameEng').click()
await page.locator('#relationship').click()
await expect(
page.getByText('Required for registration', { exact: true })
).toBeVisible()
})

// 2.4. Enter more than 32 English characters
test('2.4. Enter more than 32 English characters', async ({ page }) => {
const LONG_NAME = 'Ovuvuevuevue Enyetuenwuevue Ugbemugbem Osas'
await page.locator('#familyNamesEng').fill(LONG_NAME)
await page.getByText('Witness 1 details').click()
// 2.4. Enter more than 32 English characters
test('2.4. Enter more than 32 English characters', async ({ page }) => {
const LONG_NAME = 'Ovuvuevuevue Enyetuenwuevue Ugbemugbem Osas'
await page.locator('#familyNamesEng').fill(LONG_NAME)
await page.getByText('Witness 1 details').click()

await expect(page.locator('#familyNamesEng')).toHaveValue(
LONG_NAME.slice(0, 32)
)
})
// Done
test('3. Select any to the following option from Relationship to spouses:', async ({
page
}) => {
// label: "Relationship to spouses" input id: "#relationship"
await page.locator('#relationship').click()
await page.getByText('Other', { exact: true }).click()
await expect(page.getByText('Other', { exact: true })).toBeVisible()
})
// Done
test('4. Click continue', async ({ page }) => {
await page.getByText('Continue', { exact: true }).click()
await expect(
page.getByText('Witness 2 details', { exact: true })
).toBeVisible()
})
await expect(page.locator('#familyNamesEng')).toHaveValue(
LONG_NAME.slice(0, 32)
)
})
// Done
test('3. Select any to the following option from Relationship to spouses:', async ({
page
}) => {
// label: "Relationship to spouses" input id: "#relationship"
await page.locator('#relationship').click()
await page.getByText('Other', { exact: true }).click()
await expect(page.getByText('Other', { exact: true })).toBeVisible()
})
// Done
test('4. Click continue', async ({ page }) => {
await page.getByText('Continue', { exact: true }).click()
await expect(
page.getByText('Witness 2 details', { exact: true })
).toBeVisible()
})
})

0 comments on commit 6e01365

Please sign in to comment.