|
|
@@ -46,12 +46,18 @@ test('Access External account', async ({ page }) => {
|
|
|
await expect(page.getByTestId('grw-user-settings')).toBeVisible();
|
|
|
await page.getByTestId('external-accounts-tab-button').first().click();
|
|
|
|
|
|
- // Expect an error toaster to be displayed when the AddExternalAccountsButton is pressed
|
|
|
+ // press AddExternalAccountButton
|
|
|
await page.getByTestId('grw-external-account-add-button').click();
|
|
|
await expect(page.getByTestId('grw-associate-modal')).toBeVisible();
|
|
|
await page.getByTestId('add-external-account-button').click();
|
|
|
- await expect(page.locator('.Toastify__toast')).toBeVisible();
|
|
|
- await page.locator('.Toastify__close-button').click();
|
|
|
+
|
|
|
+ // Expect a few failed toasters to be displayed
|
|
|
+ await expect(page.locator('.Toastify__toast').first()).toBeVisible();
|
|
|
+ const toastCloseButtons = page.locator('.Toastify__close-button');
|
|
|
+ const count = await toastCloseButtons.count();
|
|
|
+ for (let i = 0; i < count; i++) {
|
|
|
+ await toastCloseButtons.first().click();
|
|
|
+ }
|
|
|
await expect(page.locator('.Toastify__toast')).not.toBeVisible();
|
|
|
});
|
|
|
|