Skip to content

Commit

Permalink
Merge pull request #37 from shopcanal/alex-whitaker.wait-for-networkidle
Browse files Browse the repository at this point in the history
test: wait for networkidle before continuing
  • Loading branch information
alex-whitaker committed Nov 23, 2021
2 parents e950f28 + aa6b364 commit e2d9967
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/shopkeep/inventory-management.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ test.describe('Shopkeep Inventory Management', () => {
*/
test.beforeEach(async ({ context, page }) => {
await logInSuccessfully(page, context, test);

await page.waitForLoadState('networkidle');
});

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/shopkeep/requests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.describe('Shopkeep Requests', () => {
expect(page.url().includes(SHOPKEEP_ROUTES.REQUESTS)).toBeTruthy();

// Wait for the request data to load before continuing
await page.waitForSelector('text=Showing 2 product requests');
await page.waitForLoadState('networkidle');
});

test.afterEach(async ({ context }) => {
Expand Down

0 comments on commit e2d9967

Please sign in to comment.