mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
test: fix portfolio spec by introducing toPass with intervals (#57428)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -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 }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user