-
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.
ENG-3401: Remove all donationType integration and tests (#429)
* Remove all donationType integration and tests * test: update tests removing radio buttons --------- Co-authored-by: Krupa Pammi <[email protected]>
- Loading branch information
1 parent
554eb98
commit cfbe10e
Showing
14 changed files
with
5 additions
and
134 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
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
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
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
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
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 |
---|---|---|
|
@@ -21,7 +21,6 @@ test.describe('Giftaid Update form validation @sanity @nightly-sanity', () => { | |
await page.click('button[type=submit]'); | ||
|
||
// Check for the error messages associated with each field | ||
await expect(page.locator('div#field-error--donationType > span')).toHaveText('This field is required'); | ||
await expect(page.locator('div#field-error--firstname > span')).toHaveText('Please fill in your first name'); | ||
await expect(page.locator('div#field-error--lastname > span')).toHaveText('Please fill in your last name'); | ||
await expect(page.locator('div#field-error--email > span')).toHaveText('Please fill in your email address'); | ||
|
@@ -51,11 +50,8 @@ test.describe('Giftaid Update form validation @sanity @nightly-sanity', () => { | |
|
||
// Test for a valid first name | ||
await page.fill('#field-input--firstname', ''); // clear firstname field | ||
await page.locator('.form__radio input[type="radio"][value="online"]').click(); | ||
await commands.populateUpdateFormFields(page, { firstName: 'John' }); | ||
await page.click('#giftAidClaimChoice>div:nth-child(2)>label'); // Select yes for declaration | ||
// Select 'Online' donation type | ||
await page.locator('#donationType>div:nth-child(3)>label').click(); | ||
await page.click('button[type=submit]'); // Submit the form | ||
|
||
await expect(page.locator('div > h1')).toHaveText('Thank you, John!'); | ||
|
@@ -89,7 +85,6 @@ test.describe('Giftaid Update form validation @sanity @nightly-sanity', () => { | |
// Test for a valid email | ||
const validEmail = '[email protected]'; | ||
await page.fill('input#field-input--email', ''); // clear email field | ||
await page.locator('.form__radio input[type="radio"][value="sms"]').click(); | ||
await commands.populateUpdateFormFields(page, { email: validEmail }); | ||
await page.click('#giftAidClaimChoice>div:nth-child(3)>label'); // Select no for declaration | ||
await page.click('button[type=submit]'); // Submit the form | ||
|
@@ -124,7 +119,6 @@ test.describe('Giftaid Update form validation @sanity @nightly-sanity', () => { | |
|
||
// Validate correct mobile number | ||
await page.locator('#field-input--mobile').fill(''); // Ensure the field is cleared and filled with valid data | ||
await page.locator('.form__radio input[type="radio"][value="call centre"]').click(); | ||
await commands.populateUpdateFormFields(page, { mobile: mobile }); | ||
await page.click('#giftAidClaimChoice>div:nth-child(2)>label'); // Select yes for declaration | ||
await page.click('button[type=submit]'); // Submit the form | ||
|
@@ -174,8 +168,6 @@ test.describe('Giftaid Update form validation @sanity @nightly-sanity', () => { | |
await page.locator('input#field-input--email').fill(`giftaid-update-staging-${chance.email()}`); | ||
await page.fill('input#field-input--postcode', 'SE1 7TP'); | ||
await page.click('#giftAidClaimChoice>div:nth-child(2)>label'); // Select yes for declaration | ||
// Select 'Online' donation type | ||
await page.locator('#donationType>div:nth-child(3)>label').click(); | ||
await page.click('button[type=submit]'); // Submit the form | ||
|
||
await expect(page.locator('div > h1')).toHaveText('Thank you, test!'); | ||
|
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
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
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
35 changes: 0 additions & 35 deletions
35
src/components/Buttons/DonationTypeButtons/DonationTypeButtons.js
This file was deleted.
Oops, something went wrong.
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
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
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
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