0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed explicit timeout for offer creation helper

refs TryGhost/Team#2667
- Removed timeout to make it the same as a global one
This commit is contained in:
Elena Baidakova 2023-03-10 13:19:24 +04:00
parent 8df5b1a974
commit ac427e4253
2 changed files with 6 additions and 7 deletions

View file

@ -14,6 +14,7 @@
@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}}<span class="red">Unknown type</span>{{/if}}

View file

@ -295,13 +295,11 @@ const createOffer = async (page, {name, tierName, offerType, amount, discountTyp
.getByRole('button', {name: 'Archive'})
.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();
// 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();
await page.getByRole('option', {name: 'Active offers'}).click();
}