File tree Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Expand file tree Collapse file tree 5 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1+ node_modules
Original file line number Diff line number Diff line change 11# Get the latest version of Playwright
2- FROM mcr.microsoft.com/playwright:v1.29.0-focal
2+ FROM mcr.microsoft.com/playwright:v1.49.1-noble
33
44RUN mkdir /tests
55COPY . /tests
66WORKDIR /tests
77
8- RUN npm install
9- RUN npx @playwright/test install
8+ RUN npm install && \
9+ npx @playwright/test install
10+
11+ CMD ["npm" , "test" ]
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ test.beforeEach(async ({ browser }) => {
6262 // console.log('beforeEach tests');
6363} ) ;
6464
65- test . afterEach ( async ( { } ) => {
66- // console.log('afterEach tests' );
65+ test . afterEach ( async ( { page } ) => {
66+ await page . close ( ) ;
6767} ) ;
6868
6969// export default and name export so spec files can use it
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ playwright-test :
4+ image : playwright
5+ build : .
6+ container_name : playwright_docker
7+ volumes :
8+ - ${PWD}:/tests
9+ command : npm run test
Original file line number Diff line number Diff line change 44 "description" : " " ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "test" : " npx playwright test" ,
7+ "test" : " npx playwright test tests/fwkTesting.spec.ts " ,
88 "test:reporter" : " npx playwright test tests/fwkTesting.spec.ts --headed --reporter=allure-playwright" ,
99 "open:allure-report" : " npx ./allure generate ./allure-results && allure open"
1010 },
You can’t perform that action at this time.
0 commit comments