Skip to content

Commit

Permalink
fix(Component tests): Flaky test fix because of missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbase12 committed Oct 22, 2024
1 parent 89c3ec1 commit e429a4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/test/component/table-basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ test('table-basic', async ({ page }, { config }) => {
const table = await locatorOne(sceneRoot, 'table.ui');
await expectHeadersOrder(table, ['Id', 'Size', 'Created']);

expectHeaderRowCount(table, 1);
expectTableRowCount(table, 3);
await expectHeaderRowCount(table, 1);
await expectTableRowCount(table, 3);
});
4 changes: 2 additions & 2 deletions code/test/component/table-sorting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ test('table-sorting', async ({ page }, { config }) => {

await expectHeadersOrder(table, ['Id', 'Size', 'Created', 'Not sortable']);

expect(table.locator('thead tr')).toHaveCount(1);
expectTableRowCount(table, 3);
await expect(table.locator('thead tr')).toHaveCount(1);
await expectTableRowCount(table, 3);

// Sorted by default by Created ascending by scene definition
await expectColumnData(page, table, 'Created', ['1725666894','1725667915','1726074087']);
Expand Down

0 comments on commit e429a4e

Please sign in to comment.