Ensure tests pass when pointing at a remote server

no issue

This will need some work, since we are introducing a 500ms delay to wait for a network request to return. Ideally the tier expander should eventually populate itself.
This commit is contained in:
Sam Lord 2022-12-01 12:30:43 +00:00 committed by Sam Lord
parent 47526bc175
commit 7bfe5db716

View File

@ -138,7 +138,7 @@ const createTier = async (page, {name, monthlyPrice, yearlyPrice}) => {
await page.locator('.gh-setting-group').filter({hasText: 'Membership'}).click();
// Expand the premium tier list
await page.getByRole('button', {name: 'Expand'}).nth(1).click({
delay: 50 // TODO: Figure out how to prevent this from opening with an empty list without using delay
delay: 500 // TODO: Figure out how to prevent this from opening with an empty list without using delay
});
// Archive if already exists
@ -147,6 +147,7 @@ const createTier = async (page, {name, monthlyPrice, yearlyPrice}) => {
await tierCard.locator('.gh-tier-card-actions-button').click();
await tierCard.getByRole('button', {name: 'Archive'}).click();
await page.locator('.modal-content').getByRole('button', {name: 'Archive'}).click();
await page.locator('.modal-content').waitFor({state: 'detached', timeout: 1000});
}
await page.locator('.gh-btn-add-tier').click();