File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,6 @@ node_modules
1717/styles /* css
1818
1919/test-results /
20- /playwright-report /
20+ /playwright-report *
2121/blob-report /
22- / playwright / playwright / .cache /
22+ .cache *
Original file line number Diff line number Diff line change 5959 "test:watch" : " jest --watchAll --maxWorkers=25%" ,
6060 "playwright" : " playwright test --config=playwright/playwright.config.ts" ,
6161 "playwright:update" : " npm run playwright -- -u" ,
62+ "playwright:clear-cache" : " rm -rf ./playwright/.cache" ,
6263 "playwright:docker" : " ./scripts/playwright-docker.sh 'npm run playwright'" ,
6364 "playwright:docker:update" : " ./scripts/playwright-docker.sh 'npm run playwright:update'" ,
6465 "playwright:docker:clear-cache" : " ./scripts/playwright-docker.sh clear-cache" ,
Original file line number Diff line number Diff line change 132132- ` npm run playwright:install ` - install playwright browsers and dependencies
133133- ` npm run playwright ` - run tests
134134- ` npm run playwright:update ` - update screenshots
135+ - ` npm run playwright:clear-cache ` - clear cache vite
135136- ` npm run playwright:docker ` - run tests using docker
136137- ` npm run playwright:docker:update ` - update screenshots using docker
137- - ` npm run playwright:docker:clear-cache ` - clear node_modules cache for docker container
138+ - ` 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 @@ -18,7 +18,10 @@ reporter.push(
1818 'html' ,
1919 {
2020 open : process . env . CI ? 'never' : 'on-failure' ,
21- outputFolder : resolve ( process . cwd ( ) , 'playwright-report' ) ,
21+ outputFolder : resolve (
22+ process . cwd ( ) ,
23+ process . env . IS_DOCKER ? 'playwright-report-docker' : 'playwright-report' ,
24+ ) ,
2225 } ,
2326 ] ,
2427) ;
@@ -54,6 +57,7 @@ const config: PlaywrightTestConfig = {
5457 /* Port to use for Playwright component endpoint. */
5558 screenshot : 'only-on-failure' ,
5659 timezoneId : 'UTC' ,
60+ ctCacheDir : process . env . IS_DOCKER ? '.cache-docker' : '.cache' ,
5761 ctViteConfig : {
5862 publicDir : pathFromRoot ( '.storybook/public' ) ,
5963 json : {
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