Improved members-actions e2e browser test

refs TryGhost/Team#2667
- Added notification check before checking that user successfully unsubscribed from all newsletters. It helps to make the test more stable
This commit is contained in:
Elena Baidakova 2023-03-20 18:09:23 +04:00
parent 07ec33fb3a
commit aca8c5805c

View File

@ -111,6 +111,10 @@ test.describe('Portal', () => {
// unsubscribe from all emails
await portalFrame.locator('[data-test-button="unsubscribe-from-all-emails"]').click();
// todo: replace class locator on data-attr locator
await expect(await portalFrame.locator('.gh-portal-popupnotification.success')).toBeVisible();
await expect(await portalFrame.locator('.gh-portal-popupnotification.success')).toBeHidden();
// all newsletters should be disabled
for (let i = 0; i < count; i++) {
await expect(await newsletters.nth(i).locator('input[type="checkbox"]').isChecked()).not.toBeTruthy();