Skip to content

Commit

Permalink
chore: improve the way Cypress records are handled as CircleCI artefacts
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanmaisse committed Jul 12, 2021
1 parent 17e026f commit 983ce9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
command: yarn test:e2e-framework --clean --all --skip angular11 --skip angular --skip vue3 --skip web_components_typescript --skip cra
no_output_timeout: 5m
- store_artifacts:
path: /tmp/storybook/cypress
path: /tmp/cypress-record
destination: cypress
e2e-tests-core:
executor:
Expand All @@ -224,7 +224,7 @@ jobs:
command: yarn test:e2e-framework vue3 angular angular11 web_components_typescript web_components_lit2
no_output_timeout: 5m
- store_artifacts:
path: /tmp/storybook/cypress
path: /tmp/cypress-record
destination: cypress
cra-bench:
executor:
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
name: run e2e tests
command: yarn test:e2e-framework --pnp sfcVue cra
- store_artifacts:
path: /tmp/storybook/cypress
path: /tmp/cypress-record
destination: cypress
e2e-tests-examples:
executor:
Expand All @@ -293,7 +293,7 @@ jobs:
name: cypress run
command: yarn test:e2e-examples
- store_artifacts:
path: /tmp/storybook/cypress
path: /tmp/cypress-record
destination: cypress
smoke-tests:
executor:
Expand Down
6 changes: 3 additions & 3 deletions scripts/run-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ const serveStorybook = async ({ cwd }: Options, port: string) => {
return serve(staticDirectory, port);
};

const runCypress = async (location: string) => {
const runCypress = async (location: string, name: string) => {
const cypressCommand = openCypressInUIMode ? 'open' : 'run';
await exec(
`yarn cypress ${cypressCommand} --config pageLoadTimeout=4000,execTimeout=4000,taskTimeout=4000,responseTimeout=4000,integrationFolder="cypress/generated" --env location="${location}"`,
`yarn cypress ${cypressCommand} --config pageLoadTimeout=4000,execTimeout=4000,taskTimeout=4000,responseTimeout=4000,defaultCommandTimeout=4000,integrationFolder="cypress/generated",videosFolder="/tmp/cypress-record/${name}" --env location="${location}"`,
{ cwd: rootDir },
{
startMessage: `🤖 Running Cypress tests`,
Expand Down Expand Up @@ -115,7 +115,7 @@ const runTests = async ({ name, ...rest }: Parameters) => {
logger.log();

try {
await runCypress('http://localhost:4000');
await runCypress('http://localhost:4000', name);
logger.info(`🎉 Storybook is working great with ${name}!`);
} catch (e) {
logger.info(`🥺 Storybook has some issues with ${name}!`);
Expand Down

0 comments on commit 983ce9c

Please sign in to comment.