-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix form validation local test
- Loading branch information
1 parent
74fe36c
commit 6dfab0c
Showing
1 changed file
with
4 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,9 +52,9 @@ test.describe('Giftaid update form validation', () => { | |
// Enter a valid transaction ID and submit the form to validate successful submission | ||
await page.fill('input#field-input--transactionId', ''); // clear the transaction field | ||
await commands.populateUpdateFormFields(page); // populate giftaid update form | ||
await page.locator('#giftAidClaimChoice>div:nth-child(2)>label').click(); // select giftaid declaration | ||
await page.click('button[type=submit]'); // submit giftaid update form | ||
await expect(page.locator('div > h1')).toHaveText('Thank you, test!'); | ||
await page.click('#giftAidClaimChoice>div:nth-child(2)>label'); // Select yes for declaration | ||
await page.click('button[type=submit]'); // Submit the form | ||
await expect(page.locator('div > h1')).toHaveText('Thank you, test!'); | ||
await page.close(); | ||
}); | ||
|
||
|
@@ -114,7 +114,7 @@ test.describe('Giftaid update form validation', () => { | |
const validEmail = '[email protected]'; | ||
await page.fill('input#field-input--email', ''); // clear email field | ||
await commands.populateUpdateFormFields(page, { email: validEmail }); | ||
await page.click('#giftAidClaimChoice>div:nth-child(3)>label'); // Select no for declaration | ||
await page.click('#giftAidClaimChoice>div:nth-child(3)>label'); // Select 'no' for declaration | ||
await page.click('button[type=submit]'); // Submit the form | ||
|
||
await expect(page.locator('div > h1')).toHaveText('Thanks for letting us know'); | ||
|