test: fix flaky (#3100)
This commit is contained in:
@@ -63,6 +63,7 @@ test('Show collections items in sidebar', async ({ page }) => {
|
|||||||
.getByTestId('collection-option')
|
.getByTestId('collection-option')
|
||||||
.getByText('Delete');
|
.getByText('Delete');
|
||||||
await deleteCollection.click();
|
await deleteCollection.click();
|
||||||
|
await page.waitForTimeout(50);
|
||||||
expect(await items.count()).toBe(0);
|
expect(await items.count()).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -71,6 +72,7 @@ test('pin and unpin collection', async ({ page }) => {
|
|||||||
await createAndPinCollection(page, { collectionName: name });
|
await createAndPinCollection(page, { collectionName: name });
|
||||||
const collections = page.getByTestId('collections');
|
const collections = page.getByTestId('collections');
|
||||||
const items = collections.getByTestId('collection-item');
|
const items = collections.getByTestId('collection-item');
|
||||||
|
await page.waitForTimeout(50);
|
||||||
expect(await items.count()).toBe(1);
|
expect(await items.count()).toBe(1);
|
||||||
const first = items.first();
|
const first = items.first();
|
||||||
await first.getByTestId('collection-options').click();
|
await first.getByTestId('collection-options').click();
|
||||||
@@ -78,6 +80,7 @@ test('pin and unpin collection', async ({ page }) => {
|
|||||||
.getByTestId('collection-option')
|
.getByTestId('collection-option')
|
||||||
.getByText('Unpin');
|
.getByText('Unpin');
|
||||||
await deleteCollection.click();
|
await deleteCollection.click();
|
||||||
|
await page.waitForTimeout(50);
|
||||||
expect(await items.count()).toBe(0);
|
expect(await items.count()).toBe(0);
|
||||||
await page.getByTestId('collection-select').click();
|
await page.getByTestId('collection-select').click();
|
||||||
const option = page.locator('[data-testid=collection-select-option]', {
|
const option = page.locator('[data-testid=collection-select-option]', {
|
||||||
|
|||||||
Reference in New Issue
Block a user