Skip to content

Commit

Permalink
utilized playwrights assertion and method
Browse files Browse the repository at this point in the history
  • Loading branch information
ericangeles committed Aug 2, 2024
1 parent 821d81e commit cb89d2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/notification/notification.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ test.describe('Notification widget tests', () => {

for (const notification of notifications) {
await page.click(notification);
const isVisible = await page.isVisible('#toast-container');
expect(isVisible).toBe(true); // Check if toast container is visible
// Use page.locator to create a locator for the toast container
const toastLocator = page.locator('#toast-container');
// Check if the toast container is visible
await expect(toastLocator).toBeVisible();
}
});
});
Expand Down

0 comments on commit cb89d2e

Please sign in to comment.