test: fix portfolio spec by introducing toPass with intervals (#57428)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Sem Bauke
2024-12-09 15:14:32 +01:00
committed by GitHub
parent 81d509af6a
commit 9543c7c77d
+9 -3
View File
@@ -24,9 +24,15 @@ test.describe('Add Portfolio Item', () => {
await page.getByRole('button', { name: 'Edit my profile' }).click(); await page.getByRole('button', { name: 'Edit my profile' }).click();
await page // Will check if the portfolio button is hydrated correctly with different intervals.
.getByRole('button', { name: 'Add a new portfolio Item' }) await expect(async () => {
.click(); const addPortfolioItemButton = page.getByRole('button', {
name: 'Add a new portfolio Item'
});
await addPortfolioItemButton.click();
await expect(addPortfolioItemButton).toBeDisabled({ timeout: 1 });
}).toPass();
}); });
test('The title has validation', async ({ page }) => { test('The title has validation', async ({ page }) => {