From aca8c5805cdc5e98e3c2728057e5445274d296d4 Mon Sep 17 00:00:00 2001 From: Elena Baidakova Date: Mon, 20 Mar 2023 18:09:23 +0400 Subject: [PATCH] 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 --- ghost/core/test/e2e-browser/portal/member-actions.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ghost/core/test/e2e-browser/portal/member-actions.spec.js b/ghost/core/test/e2e-browser/portal/member-actions.spec.js index bc6f81a805..144e4bd37e 100644 --- a/ghost/core/test/e2e-browser/portal/member-actions.spec.js +++ b/ghost/core/test/e2e-browser/portal/member-actions.spec.js @@ -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();