test(core): rewrite some flaky assertions (#5287)

This commit is contained in:
Peng Xiao
2023-12-13 07:51:59 +00:00
parent ad2c254ca3
commit 2a9a6855f4
7 changed files with 19 additions and 37 deletions

View File

@@ -24,7 +24,7 @@ const dragToFavourites = async (
const dragToCollection = async (page: Page, dragItem: Locator) => {
await page.getByTestId('slider-bar-add-collection-button').click();
const input = page.getByTestId('input-collection-title');
await input.isVisible();
await expect(input).toBeVisible();
await input.fill('test collection');
await page.getByTestId('save-collection').click();
const collection = page.getByTestId('collection-item');