Skip to content

Commit d1aca8a

Browse files
committed
Initial Commit
Adding Basic skeleton
1 parent ac965bb commit d1aca8a

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
test-results/
3+
playwright-report/
4+
blob-report/
5+
playwright/.cache/

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# playwright-powered
22
A Fun Project for trying out new playwright feature and AI libs along with it
3+
4+
## Getting Started
5+
6+
1. Install dependencies and browsers:
7+
```bash
8+
npm install
9+
npx playwright install
10+
```
11+
12+
2. Run tests:
13+
```bash
14+
npm test
15+
```

example.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
test('has title', async ({ page }) => {
4+
await page.goto('https://playwright.dev/');
5+
await expect(page).toHaveTitle(/Playwright/);
6+
});
7+
8+
test('get started link', async ({ page }) => {
9+
await page.goto('https://playwright.dev/');
10+
await page.getByRole('link', { name: 'Get started' }).click();
11+
await expect(page).toHaveURL(/.*intro/);
12+
});

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "playwright-powered",
3+
"version": "1.0.0",
4+
"description": "A Fun Project for trying out new playwright feature and AI libs along with it",
5+
"scripts": {
6+
"test": "npx playwright test",
7+
"test:ui": "npx playwright test --ui",
8+
"test:debug": "npx playwright test --debug"
9+
},
10+
"devDependencies": {
11+
"@playwright/test": "^1.41.0",
12+
"@types/node": "^20.11.0",
13+
"typescript": "^5.3.0"
14+
}
15+
}

playwright.config.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: './tests',
5+
fullyParallel: true,
6+
forbidOnly: !!process.env.CI,
7+
retries: process.env.CI ? 2 : 0,
8+
workers: process.env.CI ? 1 : undefined,
9+
reporter: 'html',
10+
use: {
11+
trace: 'on-first-retry',
12+
},
13+
projects: [
14+
{
15+
name: 'chromium',
16+
use: { ...devices['Desktop Chrome'] },
17+
},
18+
],
19+
});

0 commit comments

Comments
 (0)