File tree Expand file tree Collapse file tree 5 files changed +64
-0
lines changed
Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ node_modules /
2+ test-results /
3+ playwright-report /
4+ blob-report /
5+ playwright /.cache /
Original file line number Diff line number Diff line change 11# playwright-powered
22A 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+ ```
Original file line number Diff line number Diff line change 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 ( / P l a y w r i g h t / ) ;
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 ( / .* i n t r o / ) ;
12+ } ) ;
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ } ) ;
You can’t perform that action at this time.
0 commit comments