diff --git a/ghost/admin/app/templates/offers.hbs b/ghost/admin/app/templates/offers.hbs index d59d6d6cdd..1d5b240ac6 100644 --- a/ghost/admin/app/templates/offers.hbs +++ b/ghost/admin/app/templates/offers.hbs @@ -14,7 +14,6 @@ @triggerClass="gh-contentfilter-menu-trigger" @dropdownClass="gh-contentfilter-menu-dropdown" @matchTriggerWidth={{false}} - data-testid="offers-type-select" as |type| > {{#if type.name}}{{type.name}} offers{{else}}Unknown type{{/if}} diff --git a/ghost/core/test/e2e-browser/utils/e2e-browser-utils.js b/ghost/core/test/e2e-browser/utils/e2e-browser-utils.js index 1ffb6b60bc..f79ebed38f 100644 --- a/ghost/core/test/e2e-browser/utils/e2e-browser-utils.js +++ b/ghost/core/test/e2e-browser/utils/e2e-browser-utils.js @@ -295,11 +295,13 @@ const createOffer = async (page, {name, tierName, offerType, amount, discountTyp .getByRole('button', {name: 'Archive'}) .click(); - // waiting for offer to be archived - await expect(await page.locator('.modal-content')).toBeHidden(); - - await expect(await page.getByTestId('offers-type-select')).toBeVisible(); - await page.getByTestId('offers-type-select').click(); + // TODO: Use a more resilient selector + const statusDropdown = await page.getByRole('button', {name: 'Archived offers'}); + await statusDropdown.waitFor({ + state: 'visible', + timeout: 1000 + }); + await statusDropdown.click(); await page.getByRole('option', {name: 'Active offers'}).click(); }