Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created May 31, 2024 16:17
Show Gist options
  • Save PCreations/a02214ff00b6aa928ab36f506cd1c186 to your computer and use it in GitHub Desktop.
Save PCreations/a02214ff00b6aa928ab36f506cd1c186 to your computer and use it in GitHub Desktop.
49d6bdf9bf78.diff
-0,0 +1,12 @@
+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');
+
+ await page.getByLabel(/title/i).fill('Clean Code');
+ 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