File tree Expand file tree Collapse file tree 5 files changed +13
-5
lines changed
Expand file tree Collapse file tree 5 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1313storybook-static
1414
1515# Playwright
16- / playwright / playwright / .cache
17- / playwright-report
18- /test-results
16+ .cache *
17+ playwright-report *
18+ /test-results
Original file line number Diff line number Diff line change 3838 "playwright:install" : " playwright install --with-deps" ,
3939 "playwright" : " playwright test --config=playwright/playwright.config.ts" ,
4040 "playwright:update" : " npm run playwright -- -u" ,
41+ "playwright:clear-cache" : " rm -rf ./playwright/.cache" ,
4142 "playwright:docker" : " ./scripts/playwright-docker.sh 'npm run playwright'" ,
4243 "playwright:docker:update" : " ./scripts/playwright-docker.sh 'npm run playwright:update'" ,
4344 "playwright:docker:clear-cache" : " ./scripts/playwright-docker.sh clear-cache"
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ npm run playwright:docker
104104- ` npm run playwright:install ` - install playwright browsers and dependencies
105105- ` npm run playwright ` - run tests
106106- ` npm run playwright:update ` - update screenshots
107+ - ` npm run playwright:clear-cache ` - clear cache vite
107108- ` npm run playwright:docker ` - run tests using docker
108109- ` npm run playwright:docker:update ` - update screenshots using docker
109- - ` npm run playwright:docker:clear-cache ` - clear node_modules cache for docker container
110+ - ` npm run playwright:docker:clear-cache ` - clear node_modules cache for docker container and clear cache vite
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ reporter.push(
1616 'html' ,
1717 {
1818 open : process . env . CI ? 'never' : 'on-failure' ,
19- outputFolder : resolve ( process . cwd ( ) , 'playwright-report' ) ,
19+ outputFolder : resolve (
20+ process . cwd ( ) ,
21+ process . env . IS_DOCKER ? 'playwright-report-docker' : 'playwright-report' ,
22+ ) ,
2023 } ,
2124 ] ,
2225) ;
@@ -52,6 +55,7 @@ const config: PlaywrightTestConfig = {
5255 /* Port to use for Playwright component endpoint. */
5356 screenshot : 'only-on-failure' ,
5457 timezoneId : 'UTC' ,
58+ ctCacheDir : process . env . IS_DOCKER ? '.cache-docker' : '.cache' ,
5559 ctViteConfig : {
5660 plugins : [ react ( ) ] ,
5761 resolve : {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ run_command() {
1515 $CONTAINER_TOOL run --rm --network host -it -w /work \
1616 -v $( pwd) :/work \
1717 -v " $NODE_MODULES_CACHE_DIR :/work/node_modules" \
18+ -e IS_DOCKER=1 \
1819 " $IMAGE_NAME :$IMAGE_TAG " \
1920 /bin/bash -c " $1 "
2021}
3031
3132if [[ " $1 " = " clear-cache" ]]; then
3233 rm -rf " $NODE_MODULES_CACHE_DIR "
34+ rm -rf " ./playwright/.cache-docker"
3335 exit 0
3436fi
3537
You can’t perform that action at this time.
0 commit comments