Skip to content

Commit

Permalink
test: fix portfolio spec by introducing toPass with intervals (freeCo…
Browse files Browse the repository at this point in the history
…deCamp#57428)

Co-authored-by: Oliver Eyton-Williams <[email protected]>
  • Loading branch information
Sembauke and ojeytonwilliams authored Dec 9, 2024
1 parent 81d509a commit 9543c7c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions e2e/portfolio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ test.describe('Add Portfolio Item', () => {

await page.getByRole('button', { name: 'Edit my profile' }).click();

await page
.getByRole('button', { name: 'Add a new portfolio Item' })
.click();
// Will check if the portfolio button is hydrated correctly with different intervals.
await expect(async () => {
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 }) => {
Expand Down

0 comments on commit 9543c7c

Please sign in to comment.