Updated create tier playwright util for all archived tiers

refs https://github.com/TryGhost/Team/issues/2371

- in case all tiers are archived before new tier is created, the add tier section can be collapsed and will need to be opened first before going through add tier flow
This commit is contained in:
Rishabh 2023-01-09 21:31:03 +05:30
parent 6987cf188f
commit 628b80778f

View File

@ -195,7 +195,9 @@ const createTier = async (page, {name, monthlyPrice, yearlyPrice, trialDays}, en
await page.locator('.modal-content').getByRole('button', {name: 'Archive'}).click();
await page.locator('.modal-content').waitFor({state: 'detached', timeout: 1000});
}
if (!await page.locator('.gh-btn-add-tier').isVisible()) {
await page.locator('[data-test-toggle-pub-info]').click();
}
// Add the tier
await page.locator('.gh-btn-add-tier').click();
const modal = page.locator('.modal-content');