Created
July 17, 2024 08:23
-
-
Save PCreations/d38bca921ade81b047c8debe88722483 to your computer and use it in GitHub Desktop.
84d82ebad90f.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-3,8 +3,9 @@ import { test, expect } from '@playwright/test'; | |
test.describe('Feature: Adding a book', () => { | |
test('Example: User can add a book', async ({ page }) => { | |
await page.goto('http://localhost:3000'); | |
+ const rand = Math.floor(Math.random() * 1000000); | |
- await page.getByLabel(/title/i).fill('Clean Code'); | |
+ await page.getByLabel(/title/i).fill(`Clean Code ${rand}`); | |
await page.getByText(/add book/i).click(); | |
await expect(page.getByText(/book added/i)).toBeVisible(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment