diff --git a/.github/workflows/merge-master-into-develop.yml b/.github/workflows/merge-master-into-develop.yml index fb21e71729..b569d457f0 100644 --- a/.github/workflows/merge-master-into-develop.yml +++ b/.github/workflows/merge-master-into-develop.yml @@ -1,4 +1,4 @@ -name: merge-master-into-develop +name: Merge master into develop on: push: branches: @@ -20,7 +20,7 @@ jobs: run: git checkout develop - name: Check for merge conflict id: check-conflict - run: echo "::set-output name=merge_conflict::$(git merge-tree $(git merge-base HEAD master) master HEAD | egrep '<<')" + run: echo "::set-output name=merge_conflict::$(git merge-tree $(git merge-base HEAD master) master HEAD | egrep '<<<<<<<')" - name: Merge master into develop run: git merge master if: ${{ !steps.check-conflict.outputs.merge_conflict }} @@ -43,19 +43,32 @@ jobs: run: git push origin ${{ steps.gen-names.outputs.branch_name }} if: ${{ steps.check-conflict.outputs.merge_conflict }} - name: Create Pull Request - uses: repo-sync/pull-request@v2 + uses: actions/github-script@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: ${{ steps.gen-names.outputs.branch_name }} - destination_branch: "develop" - pr_title: | - chore: merge master - ${{ steps.gen-names.outputs.sha }} into develop - pr_body: | - There was a merge conflict when trying to automatically merge master into develop. Please resolve the conflict and complete the merge. + script: | + const pull = await github.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + base: 'develop', + head: '${{ steps.gen-names.outputs.branch_name }}', + title: 'chore: merge master (${{ steps.gen-names.outputs.sha }}) into develop', + body: `There was a merge conflict when trying to automatically merge master into develop. Please resolve the conflict and complete the merge. - DO NOT SQUASH AND MERGE + DO NOT SQUASH AND MERGE - @${{ github.actor }} - pr_reviewer: ${{ github.actor }} - pr_label: "auto-merge" + @${context.actor}`, + maintainer_can_modify: true, + }) + await github.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: pull.data.number, + reviewers: [context.actor], + }) + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pull.data.number, + labels: ['auto-merge'], + }) if: ${{ steps.check-conflict.outputs.merge_conflict }} diff --git a/circle.yml b/circle.yml index 5ccc1a8a77..df4f66de3d 100644 --- a/circle.yml +++ b/circle.yml @@ -210,7 +210,7 @@ commands: - store_test_results: path: /tmp/cypress - store_artifacts: - path: /tmp/artifacts + path: ./packages/runner-ct/cypress/videos - store-npm-logs run-e2e-tests: diff --git a/cli/package.json b/cli/package.json index aaba9f17fc..821998779e 100644 --- a/cli/package.json +++ b/cli/package.json @@ -52,7 +52,7 @@ "minimist": "^1.2.5", "ospath": "^1.2.2", "pretty-bytes": "^5.4.1", - "ramda": "~0.26.1", + "ramda": "~0.27.1", "request-progress": "^3.0.0", "supports-color": "^7.2.0", "tmp": "~0.2.1", diff --git a/npm/eslint-plugin-dev/CHANGELOG.md b/npm/eslint-plugin-dev/CHANGELOG.md index 4e473735f3..0a80dec103 100644 --- a/npm/eslint-plugin-dev/CHANGELOG.md +++ b/npm/eslint-plugin-dev/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/eslint-plugin-dev-v5.1.0](https://github.com/cypress-io/cypress/compare/@cypress/eslint-plugin-dev-v5.0.2...@cypress/eslint-plugin-dev-v5.1.0) (2021-02-16) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) + # [@cypress/eslint-plugin-dev-v5.0.2](https://github.com/cypress-io/cypress/compare/@cypress/eslint-plugin-dev-v5.0.1...@cypress/eslint-plugin-dev-v5.0.2) (2020-10-29) diff --git a/npm/react/CHANGELOG.md b/npm/react/CHANGELOG.md index 6e25b53d9b..852314eb56 100644 --- a/npm/react/CHANGELOG.md +++ b/npm/react/CHANGELOG.md @@ -1,3 +1,52 @@ +# [@cypress/react-v5.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.0.0...@cypress/react-v5.0.1) (2021-02-17) + + +### Bug Fixes + +* trigger semantic release ([#15128](https://github.com/cypress-io/cypress/issues/15128)) ([3a6f3b1](https://github.com/cypress-io/cypress/commit/3a6f3b1928277f7086062b1107f424e5a0247e00)) + +# [@cypress/react-v5.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v4.16.4...@cypress/react-v5.0.0) (2021-02-17) + + +### Bug Fixes + +* update dependencies of npm/react-vue ([#15095](https://github.com/cypress-io/cypress/issues/15095)) ([e028262](https://github.com/cypress-io/cypress/commit/e028262aed485865c4f40162c1f8102970ef91f8)) +* **component-testing:** make content adjust to size of window ([#14876](https://github.com/cypress-io/cypress/issues/14876)) ([4cf3896](https://github.com/cypress-io/cypress/commit/4cf3896ecbb074831709f73f22768457fdaf5779)) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) + + +### BREAKING CHANGES + +* change of architecture for +component testing + +Co-authored-by: Dmitriy Kovalenko + +# [@cypress/react-v5.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v4.16.4...@cypress/react-v5.0.0) (2021-02-16) + + +### Bug Fixes + +* update dependencies of npm/react-vue ([#15095](https://github.com/cypress-io/cypress/issues/15095)) ([e028262](https://github.com/cypress-io/cypress/commit/e028262aed485865c4f40162c1f8102970ef91f8)) +* **component-testing:** make content adjust to size of window ([#14876](https://github.com/cypress-io/cypress/issues/14876)) ([4cf3896](https://github.com/cypress-io/cypress/commit/4cf3896ecbb074831709f73f22768457fdaf5779)) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) + + +### BREAKING CHANGES + +* change of architecture for +component testing + +Co-authored-by: Dmitriy Kovalenko + # [@cypress/react-v4.16.4](https://github.com/cypress-io/cypress/compare/@cypress/react-v4.16.3...@cypress/react-v4.16.4) (2021-01-27) diff --git a/npm/react/circle.yml b/npm/react/circle.yml deleted file mode 100644 index 7c3c683094..0000000000 --- a/npm/react/circle.yml +++ /dev/null @@ -1,371 +0,0 @@ -version: 2.1 -orbs: - cypress: cypress-io/cypress@1.26.0 - -workflows: - build: - jobs: - # install and cache dependencies in this job - # AND build the library once - # then the workspace will be passed to other jobs - - cypress/install: - name: Install - executor: cypress/base-12 - build: npm run transpile - post-steps: - - run: - name: Show info πŸ“Ί - command: npx cypress info - - run: - name: Linting code 🧹 - command: npm run lint - - run: - name: Stop exclusive tests 1️⃣ - command: npm run stop-only - - run: - name: Build folder πŸ— - command: npm run build - - run: - name: Run unit tests πŸ‘· - command: npm run test:unit - - - cypress/run: - name: Example A11y - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/a11y - command: npm test - store_artifacts: true - - - cypress/run: - name: Example Babel - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: false - working_directory: examples/using-babel - command: npm test - store_artifacts: true - - - cypress/run: - name: Example Babel + Typescript - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/using-babel-typescript - command: npm test - store_artifacts: true - - - cypress/run: - name: Example React Scripts - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/react-scripts - command: npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - npm run check-coverage - npm run only-covered - working_directory: examples/react-scripts - - - cypress/run: - name: Example Next.js - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/nextjs - command: npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - npm run check-coverage - npm run only-covered - working_directory: examples/nextjs - - - cypress/run: - # react-scripts example with component tests not in "src" folder - # but in "cypress/component" folder - name: Example Component Folder - executor: cypress/base-12 - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/react-scripts-folder - command: npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - npm run check-coverage - npm run only-covered - working_directory: examples/react-scripts-folder - - - cypress/run: - name: Example Tailwind - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - executor: cypress/base-12 - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/tailwind - command: | - DEBUG=cypress-react-unit-test,find-webpack npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - ls -la - npm run check-coverage - npm run only-covered - working_directory: examples/tailwind - - - cypress/run: - name: Example Webpack file - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - executor: cypress/base-12 - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/webpack-file - command: npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - npm run check-coverage - npm run only-covered - working_directory: examples/webpack-file - - - cypress/run: - name: Example Rollup - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - executor: cypress/base-12 - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/rollup - command: npm test - store_artifacts: true - - - cypress/run: - name: Example Webpack options - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - executor: cypress/base-12 - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/webpack-options - command: npm test - store_artifacts: true - post-steps: - - run: - name: Check coverage πŸ“ˆ - command: | - npm run check-coverage - npm run only-covered - working_directory: examples/webpack-options - -# - cypress/run: -# name: Example Sass -# requires: -# - Install -# # we need the same OS version as in install job -# # because we will use native Sass dependency -# executor: cypress/base-12 -# # each example installs "cypress-react-unit-test" as a local dependency (symlink) -# install-command: npm install --no-bin-links -# verify-command: echo 'Already verified' -# no-workspace: true -# working_directory: examples/sass-and-ts -# command: npm test -# store_artifacts: true -# post-steps: -# - run: -# name: Check coverage πŸ“ˆ -# command: | -# npm run check-coverage -# npm run only-covered -# working_directory: examples/sass-and-ts - - - cypress/run: - name: Example Snapshots - requires: - - Install - executor: cypress/base-12 - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/snapshots - command: npm test - store_artifacts: true - - - cypress/run: - name: Visual Sudoku - executor: cypress/base-12 - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/visual-sudoku - command: npm test - store_artifacts: true - post-steps: - - store_artifacts: - path: examples/visual-sudoku/cypress/snapshots - - - cypress/run: - name: Visual with Applitools - executor: cypress/base-12 - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/visual-testing-with-applitools - # to correctly run this job, we need Applitools token - # external pull requests do not have environment variables set - # thus the job will always fail. Let's skip this job if the - # environment variable is missing - command: | - if [ -z "$APPLITOOLS_API_KEY" ]; then - echo "Skipping Applitools test job, missing environment variable APPLITOOLS_API_KEY" - else - npm test - fi - store_artifacts: true - - - cypress/run: - name: Visual with Percy - executor: cypress/base-12 - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/visual-testing-with-percy - # run Percy agent and then run Cypress component tests - # https://docs.percy.io/docs/cypress - command: npx percy exec -- npm test - store_artifacts: true - - - cypress/run: - name: Visual with Happo - executor: cypress/base-12 - requires: - - Install - # each example installs "cypress-react-unit-test" as a local dependency (symlink) - install-command: npm install --no-bin-links - verify-command: echo 'Already verified' - no-workspace: true - working_directory: examples/visual-testing-with-happo - command: npm run test:happo - store_artifacts: true - - - cypress/run: - name: Component Tests - executor: cypress/base-12 - parallelism: 4 - requires: - - Install - # notice a trick to avoid re-installing dependencies - # in this job - a do-nothing "install-command" parameter - install-command: echo 'Nothing to install in this job' - # we are not going to use results from this job anywhere else - no-workspace: true - record: false - store_artifacts: true - # following examples from - # https://circleci.com/docs/2.0/parallelism-faster-jobs/ - # TODO probably only run component tests and move integration sanity checks into own job - command: | - TESTFILES=$(circleci tests glob "cypress/{component,integration}/**/*spec.{js,jsx,ts,tsx}" | circleci tests split --total=4) - echo "Test files for this machine are $TESTFILES" - npx cypress run --spec $TESTFILES - - # this job attaches the workspace left by the install job - # so it is ready to run Cypress tests - # only we will run semantic release script instead - - cypress/run: - name: NPM release - # only run NPM release from specific branch(es) - filters: - branches: - only: - - main - # we need newer Node for semantic release - executor: cypress/base-12 - requires: - - Install - - Component Tests - - Example A11y - - Example Babel - - Example Component Folder - - Example React Scripts - # - Example Sass - - Example Snapshots - - Example Tailwind - - Example Webpack file - - Example Webpack options - - Example Rollup - - Visual Sudoku - - Visual with Percy - - Visual with Happo - - Visual with Applitools - install-command: echo 'Already installed' - verify-command: echo 'Already verified' - no-workspace: true - # instead of "cypress run" do NPM release 😁 - # clear environment variables to trick semantic-release - # into thinking this is NOT a pull request. - # (under the hood the module env-ci is used to check if this is a PR) - command: | - npm run build - CIRCLE_PR_NUMBER= \ - CIRCLE_PULL_REQUEST= \ - CI_PULL_REQUEST= \ - npm run semantic-release diff --git a/npm/react/package.json b/npm/react/package.json index f01afacb80..f79e894c34 100644 --- a/npm/react/package.json +++ b/npm/react/package.json @@ -13,7 +13,7 @@ "pretest": "yarn transpile", "test": "yarn cy:run", "transpile": "tsc", - "watch": "yarn build --watch" + "watch": "yarn build --watch --watch.exclude ./dist/**/*" }, "dependencies": { "@babel/plugin-transform-modules-commonjs": "7.12.1", @@ -156,6 +156,9 @@ "optional": true } }, + "publishConfig": { + "access": "public" + }, "ciJobs": [ "npm-react", "npm-react-axe", diff --git a/npm/vite-dev-server/CHANGELOG.md b/npm/vite-dev-server/CHANGELOG.md new file mode 100644 index 0000000000..548800d889 --- /dev/null +++ b/npm/vite-dev-server/CHANGELOG.md @@ -0,0 +1,13 @@ +# [@cypress/vite-dev-server-v1.0.1](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v1.0.0...@cypress/vite-dev-server-v1.0.1) (2021-02-17) + + +### Bug Fixes + +* trigger semantic release ([#15128](https://github.com/cypress-io/cypress/issues/15128)) ([3a6f3b1](https://github.com/cypress-io/cypress/commit/3a6f3b1928277f7086062b1107f424e5a0247e00)) + +# @cypress/vite-dev-server-v1.0.0 (2021-02-16) + + +### Features + +* adding vite-dev-server plugin ([#14839](https://github.com/cypress-io/cypress/issues/14839)) ([0225406](https://github.com/cypress-io/cypress/commit/022540605139545d137125dbb6a85eb995053fcb)) diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index 3d1316e170..eeac6b0cce 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -29,5 +29,10 @@ "repository": { "type": "git", "url": "https://github.com/cypress-io/cypress.git" + }, + "homepage": "https://github.com/cypress-io/cypress/tree/master/npm/vite-dev-server#readme", + "bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md", + "publishConfig": { + "access": "public" } } diff --git a/npm/vue/CHANGELOG.md b/npm/vue/CHANGELOG.md index b80e24a5b4..abb1774cf5 100644 --- a/npm/vue/CHANGELOG.md +++ b/npm/vue/CHANGELOG.md @@ -1,3 +1,41 @@ +# [@cypress/vue-v2.0.1](https://github.com/cypress-io/cypress/compare/@cypress/vue-v2.0.0...@cypress/vue-v2.0.1) (2021-02-17) + + +### Bug Fixes + +* trigger semantic release ([#15128](https://github.com/cypress-io/cypress/issues/15128)) ([3a6f3b1](https://github.com/cypress-io/cypress/commit/3a6f3b1928277f7086062b1107f424e5a0247e00)) + +# [@cypress/vue-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v1.0.0...@cypress/vue-v2.0.0) (2021-02-16) + + +### Bug Fixes + +* code coverage for vue ([68032c1](https://github.com/cypress-io/cypress/commit/68032c1fcb19999a917c89374ea0a85a9c0a9150)) +* update dependencies of npm/react-vue ([#15095](https://github.com/cypress-io/cypress/issues/15095)) ([e028262](https://github.com/cypress-io/cypress/commit/e028262aed485865c4f40162c1f8102970ef91f8)) +* **Component Testing:** Broken links in docs ([#14251](https://github.com/cypress-io/cypress/issues/14251)) ([a72529f](https://github.com/cypress-io/cypress/commit/a72529f396baee669c9b112d9296d314177f8cc1)) +* **deps:** update dependency debug to version 4.3.1 🌟 ([#14583](https://github.com/cypress-io/cypress/issues/14583)) ([9be6165](https://github.com/cypress-io/cypress/commit/9be61657f4150ba5dee7b67f806d810f3106d13b)) +* add discord chat link for component testing readme ([#8780](https://github.com/cypress-io/cypress/issues/8780)) ([529abdc](https://github.com/cypress-io/cypress/commit/529abdc07c9848fabacf3e304d1dad0def18ebc3)) +* adding build-prod tasks to all of the npm dependencies that need artifacts ([#9045](https://github.com/cypress-io/cypress/issues/9045)) ([550c05c](https://github.com/cypress-io/cypress/commit/550c05cc3d7a2a179de21138ae5f8118277df6ef)) +* adding build-prod tasks to all of the npm dependencies that need artifacts ([#9046](https://github.com/cypress-io/cypress/issues/9046)) ([462829b](https://github.com/cypress-io/cypress/commit/462829bea1d903b0f1666d4ef2dd85e56636b725)) +* Fix cypress-vue-unit-test reference ([#8756](https://github.com/cypress-io/cypress/issues/8756)) ([fa253d2](https://github.com/cypress-io/cypress/commit/fa253d24c04d4f4cecca94729651fcacd48b4ff1)) +* make imported @cypress/react working and pass CI ([#8718](https://github.com/cypress-io/cypress/issues/8718)) ([5e4b638](https://github.com/cypress-io/cypress/commit/5e4b6383854a78d10249621ffea9e4e20effe192)) +* reset head between tests to avoid style bleed ([#8828](https://github.com/cypress-io/cypress/issues/8828)) ([ee7b819](https://github.com/cypress-io/cypress/commit/ee7b8196c8c0e0a9a55b44885e8f43f6120d4869)) +* update bugs link in package.json ([#9015](https://github.com/cypress-io/cypress/issues/9015)) ([34186cb](https://github.com/cypress-io/cypress/commit/34186cb8b76c230a2506cabb0358d44c3205e0c4)) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) +* create-cypress-tests wizard ([#8857](https://github.com/cypress-io/cypress/issues/8857)) ([21ee591](https://github.com/cypress-io/cypress/commit/21ee591d1e9c4083a0c67f2062ced92708c0cedd)) + + +### BREAKING CHANGES + +* change of architecture for +component testing + +Co-authored-by: Dmitriy Kovalenko + # [@cypress/vue-v1.1.0-alpha.3](https://github.com/cypress-io/cypress/compare/@cypress/vue-v1.1.0-alpha.2...@cypress/vue-v1.1.0-alpha.3) (2021-01-27) diff --git a/npm/vue/circle.yml b/npm/vue/circle.yml deleted file mode 100644 index b0b8505706..0000000000 --- a/npm/vue/circle.yml +++ /dev/null @@ -1,90 +0,0 @@ -version: 2.1 -orbs: - cypress: cypress-io/cypress@1 - -workflows: - build: - jobs: - # install and cache dependencies in this job - # AND build the library once - # then the workspace will be passed to other jobs - - cypress/install: - name: Install - executor: cypress/base-12 - # creates files in "dist" folder - build: | - npm run build - echo "" - echo "Build package archive πŸ“¦" - echo "" - # first show the contents to be packed - npm pack --dry - echo "" - echo "packing ..." - echo "" - npm pack - echo "" - ls -la - post-steps: - - run: - name: Show info πŸ“Ί - command: npx cypress info - - run: - name: Linting code 🧹 - command: npm run lint - - - cypress/run: - name: Test - executor: cypress/base-12 - parallelism: 2 - requires: - - Install - # notice a trick to avoid re-installing dependencies - # in this job - a do-nothing "install-command" parameter - install-command: echo 'Nothing to install in this job' - # we are not going to use results from this job anywhere else - no-workspace: true - record: false - store_artifacts: true - # following examples from - # https://circleci.com/docs/2.0/parallelism-faster-jobs/ - command: | - TESTFILES=$(circleci tests glob "cypress/{component,integration}/**/*spec.{js,jsx,ts,tsx}" | circleci tests split --total=2) - echo "Test files for this machine are $TESTFILES" - npx cypress run --spec $TESTFILES - -# - cypress/run: -# name: Example CLI -# executor: cypress/base-12 -# requires: -# - Install -# install-command: npm install -# verify-command: echo 'Already verified' -# no-workspace: true -# working_directory: examples/cli -# command: | -# echo "🦢🏻 Scaffolding component tests" -# echo "" -# # scaffolds Babel + Webpack combo -# npx --package @vue/cli vue add cypress-experimental -# echo "" -# echo "🦢🏻 test scaffolded project, should work" -# echo "" -# DEBUG=@cypress/vue npx cypress run --spec 'tests/components/**/*.js' -# # let's inspect the scaffolded app -# ls -la -# echo "" -# echo "🦢🏻 install the current @cypress/vue" -# echo "" -# npm install ../../@cypress/vue -# echo "" -# echo "🦢🏻 run component tests" -# echo "" -# DEBUG=@cypress/vue npx cypress run --spec 'tests/components/**/*.js' -# echo "" -# echo "🦢🏻 look at the generated files, should have coverage" -# # (after updating cypress-experimental) -# echo "" -# ls -la -# store_artifacts: true - diff --git a/npm/vue/package.json b/npm/vue/package.json index 3f4bf479b6..32da693e5a 100644 --- a/npm/vue/package.json +++ b/npm/vue/package.json @@ -69,6 +69,7 @@ "vue" ], "publishConfig": { + "access": "public", "registry": "http://registry.npmjs.org/" }, "ciJobs": [ diff --git a/npm/webpack-batteries-included-preprocessor/CHANGELOG.md b/npm/webpack-batteries-included-preprocessor/CHANGELOG.md index 75752e6bf9..b0a13211d7 100644 --- a/npm/webpack-batteries-included-preprocessor/CHANGELOG.md +++ b/npm/webpack-batteries-included-preprocessor/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/webpack-batteries-included-preprocessor-v2.1.5](https://github.com/cypress-io/cypress/compare/@cypress/webpack-batteries-included-preprocessor-v2.1.4...@cypress/webpack-batteries-included-preprocessor-v2.1.5) (2021-01-27) + + +### Bug Fixes + +* ignore browserslist file ([#14754](https://github.com/cypress-io/cypress/issues/14754)) ([a21e76f](https://github.com/cypress-io/cypress/commit/a21e76fb0fb8706b4a188bc944137fb33030b42a)) + # [@cypress/webpack-batteries-included-preprocessor-v2.1.4](https://github.com/cypress-io/cypress/compare/@cypress/webpack-batteries-included-preprocessor-v2.1.3...@cypress/webpack-batteries-included-preprocessor-v2.1.4) (2021-01-05) diff --git a/npm/webpack-dev-server/CHANGELOG.md b/npm/webpack-dev-server/CHANGELOG.md new file mode 100644 index 0000000000..57ffa667e8 --- /dev/null +++ b/npm/webpack-dev-server/CHANGELOG.md @@ -0,0 +1,21 @@ +# [@cypress/webpack-dev-server-v1.0.2](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.0.1...@cypress/webpack-dev-server-v1.0.2) (2021-02-18) + + +### Bug Fixes + +* add webpack-dev-server to peerDependencies, improve peerDependency error handling, fix index-template.html path ([#15149](https://github.com/cypress-io/cypress/issues/15149)) ([2863e33](https://github.com/cypress-io/cypress/commit/2863e338920362cbb1ecf20c2fab28fbd3a52c33)) + +# [@cypress/webpack-dev-server-v1.0.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.0.0...@cypress/webpack-dev-server-v1.0.1) (2021-02-17) + + +### Bug Fixes + +* add a trivial change to trigger semantic release ([#15127](https://github.com/cypress-io/cypress/issues/15127)) ([fb7540e](https://github.com/cypress-io/cypress/commit/fb7540e99d56e0cff89aaf2fe76065b9815bdbec)) +* trigger semantic release ([#15128](https://github.com/cypress-io/cypress/issues/15128)) ([3a6f3b1](https://github.com/cypress-io/cypress/commit/3a6f3b1928277f7086062b1107f424e5a0247e00)) + +# @cypress/webpack-dev-server-v1.0.0 (2021-02-16) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) diff --git a/npm/webpack-dev-server/index.js b/npm/webpack-dev-server/index.js index 2d2f3c0bcb..59ad7a88e9 100644 --- a/npm/webpack-dev-server/index.js +++ b/npm/webpack-dev-server/index.js @@ -1 +1,5 @@ +const { validatePeerDependencies } = require('./dist/errors') + +validatePeerDependencies() + module.exports = require('./dist') diff --git a/npm/webpack-dev-server/package.json b/npm/webpack-dev-server/package.json index 493fdda034..15cfed5da1 100644 --- a/npm/webpack-dev-server/package.json +++ b/npm/webpack-dev-server/package.json @@ -25,14 +25,21 @@ }, "peerDependencies": { "html-webpack-plugin": "> 3", - "webpack": "> 4" + "webpack": "> 4", + "webpack-dev-server": "> 3" }, "files": [ - "dist" + "dist", + "index-template.html" ], "license": "MIT", "repository": { "type": "git", "url": "https://github.com/cypress-io/cypress.git" + }, + "homepage": "https://github.com/cypress-io/cypress/tree/master/npm/webpack-dev-server#readme", + "bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md", + "publishConfig": { + "access": "public" } } diff --git a/npm/webpack-dev-server/src/errors.ts b/npm/webpack-dev-server/src/errors.ts new file mode 100644 index 0000000000..ea1cef561c --- /dev/null +++ b/npm/webpack-dev-server/src/errors.ts @@ -0,0 +1,80 @@ +export interface MissingDependency { + prettyName: string + packageName: string +} + +const peerDeps: MissingDependency[] = [ + { + prettyName: 'Webpack Dev Server', + packageName: 'webpack-dev-server', + }, + { + prettyName: 'Html Webpack Plugin', + packageName: 'html-webpack-plugin', + }, + { + prettyName: 'Webpack', + packageName: 'webpack', + }, +] + +const makePrettyLibs = (libs) => { + return libs.reduce((acc, curr, idx) => { + acc.prettyNames.push(curr.prettyName) + acc.packageNames.push(curr.packageName) + + if (idx >= libs.length) return acc + + return { + prettyNames: acc.prettyNames.join(', '), + packageNames: acc.packageNames.join(' '), + } + }, { prettyNames: [], packageNames: [] }) +} + +export class MissingPeerDependency extends Error { + private libs: { prettyNames: string[], packageNames: string[] } + + constructor (message, + libs: MissingDependency[]) { + const prettyLibs = makePrettyLibs(libs) + + super(`${message} ${prettyLibs.prettyNames}`) + this.name = 'PeerDependencyMissing' + this.libs = prettyLibs + + Object.setPrototypeOf(this, MissingPeerDependency.prototype) + } + + get prettyMessage () { + return `❌ Missing ${this.libs.prettyNames}. Please install them with npm or yarn. + + npm i ${this.libs.packageNames} -D + yarn add ${this.libs.packageNames} --dev + + Updating webpack config is unnecessary +` + } +} + +export function validatePeerDependencies () { + const missingPeerDeps = peerDeps.filter((peerDep) => { + try { + require(peerDep.packageName) + } catch (err) { + return true + } + + return false + }) + + if (missingPeerDeps.length) { + const error = new MissingPeerDependency(`@cypress/webpack-dev-server is missing peer dependencies`, missingPeerDeps) + + console.error(error.prettyMessage) // eslint-disable-line + + throw error + } + + return true +} diff --git a/npm/webpack-dev-server/src/index.ts b/npm/webpack-dev-server/src/index.ts index b7dba88ad0..8a4a2f8773 100644 --- a/npm/webpack-dev-server/src/index.ts +++ b/npm/webpack-dev-server/src/index.ts @@ -14,13 +14,6 @@ export interface DevServerOptions { devServerEvents: EventEmitter } -export interface StartDevServer { - /* this is the Cypress options object */ - options: DevServerOptions - /* support passing a path to the user's webpack config */ - webpackConfig?: Record -} - type DoneCallback = () => unknown export interface ResolvedDevServerConfig { @@ -28,6 +21,13 @@ export interface ResolvedDevServerConfig { close: (done?: DoneCallback) => void } +export interface StartDevServer { + /* this is the Cypress options object */ + options: DevServerOptions + /* support passing a path to the user's webpack config */ + webpackConfig?: Record +} + export async function startDevServer (startDevServerArgs: StartDevServer) { const webpackDevServer = await createDevServer(startDevServerArgs) diff --git a/npm/webpack-preprocessor/CHANGELOG.md b/npm/webpack-preprocessor/CHANGELOG.md index fc7a1d2e05..8ce24c9873 100644 --- a/npm/webpack-preprocessor/CHANGELOG.md +++ b/npm/webpack-preprocessor/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/webpack-preprocessor-v5.6.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.5.0...@cypress/webpack-preprocessor-v5.6.0) (2021-02-16) + + +### Features + +* component testing ([#14479](https://github.com/cypress-io/cypress/issues/14479)) ([af26fbe](https://github.com/cypress-io/cypress/commit/af26fbebe6bc609132013a0493a116cc78bb1bd4)) + # [@cypress/webpack-preprocessor-v5.5.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.4.11...@cypress/webpack-preprocessor-v5.5.0) (2020-11-30) diff --git a/package.json b/package.json index 8f43a4a581..8d18e31bf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "6.5.0", + "version": "6.6.0", "description": "Cypress.io end to end testing tool", "private": true, "scripts": { @@ -174,7 +174,7 @@ "pretty-ms": "7.0.0", "print-arch": "1.0.0", "proxyquire": "2.1.3", - "ramda": "0.24.1", + "ramda": "0.27.1", "semantic-release": "17.2.3", "semantic-release-monorepo": "7.0.3", "semver": "7.3.2", diff --git a/packages/desktop-gui/cypress/integration/runs_list_spec.js b/packages/desktop-gui/cypress/integration/runs_list_spec.js index 022e5b00d8..24564dfe30 100644 --- a/packages/desktop-gui/cypress/integration/runs_list_spec.js +++ b/packages/desktop-gui/cypress/integration/runs_list_spec.js @@ -333,7 +333,7 @@ describe('Runs List', function () { }) it('displays "need to set up" message', () => { - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') }) }) @@ -348,7 +348,7 @@ describe('Runs List', function () { }) it('displays "need to set up" message', () => { - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') }) describe('click setup project', function () { @@ -448,7 +448,7 @@ describe('Runs List', function () { it('displays "need to set up" message', function () { this.ipcError({ type: 'NO_PROJECT_ID' }) - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') }) it('displays old runs if another error', function () { @@ -735,7 +735,7 @@ describe('Runs List', function () { }) it('displays "need to set up" message', () => { - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') cy.percySnapshot() }) @@ -834,7 +834,7 @@ describe('Runs List', function () { }) it('displays "need to set up" message', () => { - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') }) it('banner does not cover browser dropdown', () => { diff --git a/packages/desktop-gui/cypress/integration/setup_project_modal_spec.js b/packages/desktop-gui/cypress/integration/setup_project_modal_spec.js index 858ae14d3e..93a9be3a4b 100644 --- a/packages/desktop-gui/cypress/integration/setup_project_modal_spec.js +++ b/packages/desktop-gui/cypress/integration/setup_project_modal_spec.js @@ -47,7 +47,7 @@ describe('Connect to Dashboard', function () { }) it('displays "need to set up" message', () => { - cy.contains('You could see test recordings here') + cy.contains('Connect to the Dashboard to see your recorded test runs here') }) describe('when there is a current user', function () { diff --git a/packages/desktop-gui/src/runs/dashboard-banner.jsx b/packages/desktop-gui/src/runs/dashboard-banner.jsx index ba484c43ac..12a42ec91c 100644 --- a/packages/desktop-gui/src/runs/dashboard-banner.jsx +++ b/packages/desktop-gui/src/runs/dashboard-banner.jsx @@ -4,15 +4,14 @@ import React from 'react' const DashboardBanner = () => { return (
-
-
-
+
+
Test Runner
{_.map(['pass', 'fail', 'pass'], (test, i) => (
- + {_.capitalize(test)}ed test
@@ -22,17 +21,34 @@ const DashboardBanner = () => {
-
- -
-
-
- -
-
))}
+
+ {_.map([2, 4, 3], (num, i) => ( +
+ {_.map(_.range(num), (x) =>
)} +
+ ))} +
+
+
Cypress Dashboard
+
+
+
+
+ {_.map(_.range(4), (i) => ( +
+
+
+
+
+ ))} +
+
+
+
+
) } diff --git a/packages/desktop-gui/src/runs/project-not-setup.jsx b/packages/desktop-gui/src/runs/project-not-setup.jsx index 7a12a797df..dbf8e76981 100644 --- a/packages/desktop-gui/src/runs/project-not-setup.jsx +++ b/packages/desktop-gui/src/runs/project-not-setup.jsx @@ -7,6 +7,7 @@ import { configFileFormatted } from '../lib/config-file-formatted' import SetupProject from './setup-project-modal' import DashboardBanner from './dashboard-banner' import authStore from '../auth/auth-store' +import { IconFailurePoint, IconSupercharge, IconFailAlerts } from './svg-icons' @observer export default class ProjectNotSetup extends Component { @@ -20,13 +21,9 @@ export default class ProjectNotSetup extends Component { render () { return ( -
-
- { - this.props.isValid ? -
{this._getStartedWithCI()}
: -
{this._invalidProject()}
- } + <> +
+ { this.props.isValid ? this._getStartedWithCI() : this._invalidProject() }
{this._projectSetup()} -
+ ) } _getStartedWithCI () { return (
- -

You could see test recordings here!

-
-
Connect to Cypress Dashboard for free:
-
    -
  • Record test runs in CI and debug failed tests with ease
  • -
  • Understand the health of your tests with test analytics
  • -
  • Improve testing efficiency with parallelization, load balancing, and more
  • -
+
+ +

Connect to the Dashboard to see your recorded test runs here!

+
Sign up and get started for free.
+ +
+
+
What is Cypress Dashboard?
+
+
+ + See exact point of failure of tests running in CI. +
+
+ + Supercharge test times with parallelization. +
+
+ + Get instant test failure alerts via Slack or GitHub. +
+
- -

After logging in, you'll see recorded test runs here and in your Cypress Dashboard.

) } @@ -67,7 +75,7 @@ export default class ProjectNotSetup extends Component { return (

- {' '} + {' '} Runs cannot be displayed

We were unable to find an existing project matching the projectId in your {configFileFormatted(this.props.project.configFile)}.

@@ -77,7 +85,7 @@ export default class ProjectNotSetup extends Component { className='btn btn-warning' onClick={this._showSetupProjectModal} > - {' '} + {' '} Set up a new project

diff --git a/packages/desktop-gui/src/runs/runs.scss b/packages/desktop-gui/src/runs/runs.scss index 7567188217..0322342d66 100644 --- a/packages/desktop-gui/src/runs/runs.scss +++ b/packages/desktop-gui/src/runs/runs.scss @@ -531,91 +531,11 @@ } .dashboard-banner { - background-color: #311C56; - box-shadow: 0 0 3px 0 rgba(0,0,0,0.20); - display: flex; - flex-direction: column; - justify-content: flex-end; - height: 185px; - position: relative; - overflow: hidden; - z-index: 0; - - .left-vector { - z-index: 900; - position: absolute; - width: 250px; - height: 225px; - left: -100px; - bottom: -140px; - border-radius: 100px; - - background-color: #3d2665; - transform: matrix(-0.97, -0.08, 0.24, -1, 0, 0); - } - - .right-vector { - z-index: 900; - position: absolute; - width: 250px; - height: 225px; - right: -65px; - top: -100px; - border-radius: 100px; - - background-color: #3d2665; - transform: matrix(0.42, 0.82, -1.09, 0.18, 0, 0); - } -} - -.dashboard-banner-db { - z-index: 1000; - background-color: #fff; - width: 600px; - margin: 0 auto; - border-top-right-radius: 3px; - border-top-left-radius: 3px; -} - -.dashboard-banner-test { - padding: 10px 20px; - display: flex; - justify-content: space-between; - color: #888B91; - height: 50px; align-items: center; - border-bottom: 1px solid #f4f5f7; - font-size: 11px; - - i { - padding-right: 8px; - } - - &:first-of-type { - border-top-left-radius: 3px; - } - - .test-title-top { - margin-bottom: 4px; - display: flex; - } - - .test-title-bottom { - display: flex; - margin-left: 20px; - - &>div:nth-child(1) { - width: 45px; - } - - &>div:nth-child(2) { - width: 60px; - } - - &>div:nth-child(3) { - width: 20px; - } - } + display: flex; + justify-content: center; + overflow: hidden; + padding: 25px 15px 20px; .fake-text { background-color: #E0E0E0; @@ -625,47 +545,324 @@ margin-top: 3px; } - .dashboard-banner-test-title { - font-weight: bold; + .dashboard-banner-tr { + border-radius: 5px; + background-color: #fff; + box-shadow: 0 4px 8px 1px rgba(0, 0, 0, 0.25); + flex-basis: 250px; + min-width: 200px; + + .dashboard-banner-tr-title { + background: #26282e; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + color: #fff; + font-family: $font-title; + font-size: 13px; + padding: 6px 10px 2px; + text-align: left; + } + + .dashboard-banner-test { + align-items: center; + border-bottom: 1px solid #f4f5f7; + color: #888B91; + display: flex; + font-size: 11px; + height: 40px; + justify-content: space-between; + padding: 0 10px; + + i { + padding-right: 8px; + } + + &:last-of-type { + border-bottom: none; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } + + .test-title-top { + margin-bottom: 4px; + display: flex; + } + + .test-title-bottom { + display: flex; + margin-left: 20px; + + &>div:nth-child(1) { + width: 45px; + } + + &>div:nth-child(2) { + width: 55px; + } + + &>div:nth-child(3) { + width: 18px; + } + } + + .dashboard-banner-test-title { + font-weight: bold; + display: flex; + flex-direction: column; + padding-right: 100px; + + i { + margin-top: 3px; + } + } + + &.pass { + border-left: 5px solid #1CB77E; + + .dashboard-banner-test-title { + color: #1CB77E; + } + } + + &.fail { + border-left: 5px solid #ec6573; + + .dashboard-banner-test-title { + color: #ec6573; + } + } + } + } + + .dashboard-banner-dashboard { + background: #F7F7Fa; + border-radius: 5px; + box-shadow: 0 4px 8px 1px rgba(0, 0, 0, 0.25); + flex-basis: 250px; + min-width: 200px; + + .dashboard-banner-dashboard-title { + background: #fff; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + font-family: $font-title; + font-size: 13px; + padding: 6px 10px 2px; + text-align: left; + } + + .dashboard-banner-dashboard-content { + height: 120px; + padding: 8px 0 0 8px; + + .dashboard-banner-graph { + background: #fff; + border-bottom-right-radius: 5px; + border-top-left-radius: 2px; + display: flex; + flex-direction: column; + height: 100%; + padding: 6px 0 0 12px; + + .graph-title { + height: 8px; + width: 70px; + } + + .graph-footer { + height: 5px; + width: 25px; + } + + .graph-bars { + display: flex; + padding: 5px 0; + + .graph-bar { + display: flex; + flex-direction: column; + height: 70px; + justify-content: flex-end; + padding-right: 10px; + width: 100%; + + &:last-of-type { + padding-right: 0; + } + + .graph-bar-section { + &:nth-child(1) { + background: #E0E0E0; + } + + &:nth-child(2) { + background: #ec6573; + } + + &:nth-child(3) { + background: #1CB77E; + } + } + + &:nth-child(1) { + .graph-bar-section { + &:nth-child(1) { + height: 10px; + } + + &:nth-child(2) { + height: 8px; + } + + &:nth-child(3) { + height: 20px; + } + } + } + + &:nth-child(2) { + .graph-bar-section { + &:nth-child(1) { + height: 16px; + } + + &:nth-child(2) { + height: 6px; + } + + &:nth-child(3) { + height: 32px; + } + } + } + + &:nth-child(3) { + .graph-bar-section { + &:nth-child(1) { + height: 12px; + } + + &:nth-child(2) { + height: 12px; + } + + &:nth-child(3) { + height: 46px; + } + } + } + + &:nth-child(4) { + .graph-bar-section { + &:nth-child(1) { + height: 14px; + } + + &:nth-child(2) { + height: 6px; + } + + &:nth-child(3) { + height: 38px; + } + } + } + } + } + } + } + } + + .dashboard-banner-connectors { display: flex; flex-direction: column; - padding-right: 100px; + overflow: hidden; + flex-basis: 120px; + flex-shrink: 4; + min-width: 20px; - i { - margin-top: 3px; - } - } + .connector-row { + display: flex; + padding: 10px 0; + width: 120px; - &.pass { - border-left: 5px solid #48996b; + .connector-bar { + border-radius: 10px; + height: 5px; + margin-right: 10px; - .dashboard-banner-test-title { - color: #48996b; - } - } + &:first-of-type { + border-bottom-left-radius: 0; + border-top-left-radius: 0; + } - &.fail { - border-left: 4px solid #DB7177; + &:last-of-type { + border-bottom-right-radius: 0; + border-top-right-radius: 0; + margin-right: 0; + } + } - .dashboard-banner-test-title { - color: #DB7177; + &:nth-child(1) { + .connector-bar { + &:nth-child(1) { + background: #F5A327; + width: 35px; + } + + &:nth-child(2) { + background: #1CB77E; + border-bottom-right-radius: 10px; + border-top-right-radius: 10px; + margin-right: 5px; + width: 100px; + } + } + } + + &:nth-child(2) { + .connector-bar { + &:nth-child(1) { + background: #BCBDC4; + width: 10px; + } + + &:nth-child(2) { + background: #1CB77E; + width: 80px; + } + + &:nth-child(3) { + background: #ec6573; + width: 30px; + } + + &:nth-child(4) { + background: #BCBDC4; + width: 10px; + } + } + } + + &:nth-child(3) { + .connector-bar { + &:nth-child(1) { + background: #ec6573; + width: 35px; + } + + &:nth-child(2) { + background: #F5A327; + width: 25px; + } + + &:nth-child(3) { + background: #1CB77E; + width: 70px; + } + } + } } } } - -.dashboard-banner-test-mid, .dashboard-banner-test-end { - display: flex; - flex-direction: row; -} - -.dashboard-banner-test-mid { - &>div:nth-of-type(1) { - width: 70px; - } -} - -.dashboard-banner-test-end { - &>div:nth-of-type(1) { - width: 60px; - } -} \ No newline at end of file diff --git a/packages/desktop-gui/src/runs/svg-icons.jsx b/packages/desktop-gui/src/runs/svg-icons.jsx new file mode 100644 index 0000000000..e19d760c4d --- /dev/null +++ b/packages/desktop-gui/src/runs/svg-icons.jsx @@ -0,0 +1,108 @@ +import React, { Component } from 'react' + +export class IconFailurePoint extends Component { + render () { + return ( + + + + + + + ) + } +} + +export class IconSupercharge extends Component { + render () { + return ( + + + + + + + + + + ) + } +} + +export class IconFailAlerts extends Component { + render () { + return ( + + + + ) + } +} diff --git a/packages/desktop-gui/src/styles/components/_empty.scss b/packages/desktop-gui/src/styles/components/_empty.scss index 385d5f24b6..51e78af42e 100644 --- a/packages/desktop-gui/src/styles/components/_empty.scss +++ b/packages/desktop-gui/src/styles/components/_empty.scss @@ -1,4 +1,5 @@ .empty, .well-message { + height: 100%; text-align: center; p { @@ -14,26 +15,16 @@ .empty-no-runs, .empty-log-in { h4 { - margin-top: 40px; - font-size: 22px; - color: #000; - } - - .empty-no-runs-details { - text-align: left; - margin: 15px auto 0; - width: 440px; - } - - ul { color: #272B2F; - padding-left: 25px; - font-size: 13px; + font-family: $font-title; + font-size: 24px; } h5 { color: #272B2F; - font-size: 15px; + font-family: $font-title; + font-size: 18px; + font-weight: 400; } p { @@ -44,6 +35,85 @@ } } +.empty-no-runs { + display: flex; + flex-direction: column; + height: 100%; + + .what-is-dashboard { + background: #f8f8f8; + flex-grow: 2; + margin-top: 20px; + padding: 8px 50px 10px; + text-align: left; + + .columns { + align-items: center; + justify-content: space-between; + display: flex; + + .column { + align-items: center; + display: flex; + width: 30%; + + svg { + color: $brand-primary; + flex-shrink: 0; + font-size: 54px; + } + + span { + font-family: $font-title; + font-size: 15px; + margin-left: 15px; + } + } + } + + @media (max-width: 800px) { + padding-left: 20px; + padding-right: 20px; + + .columns .column svg { + font-size: 42px; + } + } + + @media (max-width: 620px) { + padding-left: 40px; + padding-right: 40px; + + .columns { + flex-direction: column; + + .column { + padding-bottom: 15px; + width: 85%; + + &:last-of-type { + padding-bottom: 0; + } + } + } + } + } +} + +.empty-log-in { + h4 { + margin-top: 25px; + } + + .login-content { + padding-top: 10px; + } + + .dashboard-banner { + padding-top: 35px; + } +} + .empty-no-api-server { padding: 40px 100px 20px; } diff --git a/packages/launcher/package.json b/packages/launcher/package.json index 3929ce01cb..964a394e64 100644 --- a/packages/launcher/package.json +++ b/packages/launcher/package.json @@ -19,7 +19,7 @@ "fs-extra": "8.1.0", "lodash": "4.17.19", "plist": "3.0.1", - "ramda": "0.24.1" + "ramda": "0.27.1" }, "devDependencies": { "@packages/ts": "0.0.0-development", diff --git a/packages/runner-ct/.gitignore b/packages/runner-ct/.gitignore new file mode 100644 index 0000000000..4068db97ef --- /dev/null +++ b/packages/runner-ct/.gitignore @@ -0,0 +1 @@ +cypress/videos/* \ No newline at end of file diff --git a/packages/runner-ct/cypress.json b/packages/runner-ct/cypress.json index 2ee17d7ffe..7f8a54afd0 100644 --- a/packages/runner-ct/cypress.json +++ b/packages/runner-ct/cypress.json @@ -1,4 +1,4 @@ { "testFiles": "**/*spec.{ts,tsx}", - "video": false + "video": true } diff --git a/packages/runner-ct/cypress/component/RunnerCt.spec.tsx b/packages/runner-ct/cypress/component/RunnerCt.spec.tsx index c61f5eb74c..cc9ff8fc91 100644 --- a/packages/runner-ct/cypress/component/RunnerCt.spec.tsx +++ b/packages/runner-ct/cypress/component/RunnerCt.spec.tsx @@ -1,7 +1,7 @@ /// import React from 'react' import { mount } from '@cypress/react' -import App from '../../src/app/RunnerCt' +import RunnerCt from '../../src/app/RunnerCt' import State from '../../src/lib/state' import '@packages/runner/src/main.scss' @@ -12,18 +12,23 @@ class FakeEventManager { notifyRunningSpec = () => { } } +const fakeConfig = { projectName: 'Project', env: {}, isTextTerminal: false } as any as Cypress.RuntimeConfigOptions + describe('RunnerCt', () => { + beforeEach(() => { + cy.viewport(1000, 500) + }) + function assertSpecsListIs (state: 'closed' | 'open') { // for some reason should("not.be.visible") doesn't work here so ensure that specs list was outside of screen - cy.get('[data-cy=specs-list]').then(([el]) => { - const { x } = el.getBoundingClientRect() + cy.get('[data-cy=specs-list]').then(($el) => { + const { x } = $el[0].getBoundingClientRect() state === 'closed' ? expect(x).to.be.lessThan(0) : expect(x).to.be.lessThan(0) }) } - it('renders App', () => { - cy.viewport(1000, 500) + it('renders RunnerCt', () => { const state = new State({ reporterWidth: 500, spec: null, @@ -31,11 +36,30 @@ describe('RunnerCt', () => { }) mount( - , + ) + + cy.percySnapshot() + }) + + it('renders RunnerCt for video recording', () => { + const state = new State({ + reporterWidth: 500, + spec: null, + specs: [{ relative: '/test.js', absolute: 'root/test.js', name: 'test.js' }], + }) + + mount( + , ) @@ -44,7 +68,6 @@ describe('RunnerCt', () => { context('keyboard shortcuts', () => { beforeEach(() => { - cy.viewport(1000, 500) const state = new State({ reporterWidth: 500, spec: null, @@ -52,11 +75,11 @@ describe('RunnerCt', () => { }) mount( - , ) @@ -80,7 +103,6 @@ describe('RunnerCt', () => { context('specs-list resizing', () => { beforeEach(() => { - cy.viewport(1000, 500) const state = new State({ reporterWidth: 500, spec: null, @@ -88,11 +110,11 @@ describe('RunnerCt', () => { }) mount( - , ) }) diff --git a/packages/runner-ct/src/app/RunnerCt.scss b/packages/runner-ct/src/app/RunnerCt.scss index c74e5aa73d..5bd121bbbc 100644 --- a/packages/runner-ct/src/app/RunnerCt.scss +++ b/packages/runner-ct/src/app/RunnerCt.scss @@ -69,9 +69,12 @@ main.app-ct { .app-wrapper { position: relative; - width: calc(100vw - #{$specs-list-offset}); height: 100vh; - margin-inline: $specs-list-offset; + + &.with-specs-drawer { + width: calc(100vw - #{$specs-list-offset}); + margin-inline: $specs-list-offset; + } } .app-wrapper-screenshotting { diff --git a/packages/runner-ct/src/app/RunnerCt.tsx b/packages/runner-ct/src/app/RunnerCt.tsx index b89b35e67e..98d93ee26d 100644 --- a/packages/runner-ct/src/app/RunnerCt.tsx +++ b/packages/runner-ct/src/app/RunnerCt.tsx @@ -24,17 +24,10 @@ import './RunnerCt.scss' import { KeyboardHelper, NoSpecSelected } from './NoSpecSelected' import { useScreenshotHandler } from './useScreenshotHandler' -// Cypress.ConfigOptions only appears to have internal options. -// TODO: figure out where the "source of truth" should be for -// an internal options interface. -export interface ExtendedConfigOptions extends Cypress.ConfigOptions { - projectName: string -} - interface AppProps { state: State eventManager: typeof EventManager - config: ExtendedConfigOptions + config: Cypress.RuntimeConfigOptions } const DEFAULT_LEFT_SIDE_OF_SPLITPANE_WIDTH = 355 @@ -48,10 +41,11 @@ const App: React.FC = observer( const pluginRootContainer = React.useRef(null) const { state, eventManager, config } = props + const isOpenMode = !config.isTextTerminal const [pluginsHeight, setPluginsHeight] = React.useState(500) const [isResizing, setIsResizing] = React.useState(false) - const [isSpecsListOpen, setIsSpecsListOpen] = React.useState(true) + const [isSpecsListOpen, setIsSpecsListOpen] = React.useState(isOpenMode) const [drawerWidth, setDrawerWidth] = React.useState(300) const windowSize = useWindowSize() const [leftSideOfSplitPaneWidth, setLeftSideOfSplitPaneWidth] = React.useState(DEFAULT_LEFT_SIDE_OF_SPLITPANE_WIDTH) @@ -124,47 +118,53 @@ const App: React.FC = observer( return ( <>

- - + )} + +
{ + initializePlugins = (config: Cypress.RuntimeConfigOptions, rootElement: HTMLElement) => { if (config.env.reactDevtools) { this.loadReactDevTools(rootElement) .then(action(() => { diff --git a/packages/server/__snapshots__/cypress_spec.js b/packages/server/__snapshots__/cypress_spec.js index f25827837e..fc962c3145 100644 --- a/packages/server/__snapshots__/cypress_spec.js +++ b/packages/server/__snapshots__/cypress_spec.js @@ -68,6 +68,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - codeshipBasic - codeshipPro - concourse +- codeFresh - drone - githubActions - gitlab @@ -104,6 +105,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - codeshipBasic - codeshipPro - concourse +- codeFresh - drone - githubActions - gitlab @@ -141,6 +143,7 @@ The ciBuildId is automatically detected if you are running Cypress in any of the - codeshipBasic - codeshipPro - concourse +- codeFresh - drone - githubActions - gitlab diff --git a/packages/server/lib/exec.js b/packages/server/lib/exec.js index 27eef58abf..3e49d85c68 100644 --- a/packages/server/lib/exec.js +++ b/packages/server/lib/exec.js @@ -12,7 +12,7 @@ const trimStdio = R.evolve({ stderr: R.trim, }) -const loadShellVars = R.memoize(shellEnv) +const loadShellVars = R.memoizeWith(R.toString, shellEnv) module.exports = { run (projectRoot, options) { diff --git a/packages/server/lib/modes/run-ct.js b/packages/server/lib/modes/run-ct.js index 2f1d5b5383..2b4014f488 100644 --- a/packages/server/lib/modes/run-ct.js +++ b/packages/server/lib/modes/run-ct.js @@ -1,4 +1,5 @@ const run = (options) => { + // TODO make sure if we need to run this in electron by default to match e2e behavior? options.browser = options.browser || 'chrome' // if we're in run mode with component diff --git a/packages/server/lib/util/ci_provider.js b/packages/server/lib/util/ci_provider.js index 275b34cc50..7c57b71324 100644 --- a/packages/server/lib/util/ci_provider.js +++ b/packages/server/lib/util/ci_provider.js @@ -96,6 +96,7 @@ const CI_PROVIDERS = { 'codeshipBasic': isCodeshipBasic, 'codeshipPro': isCodeshipPro, 'concourse': isConcourse, + codeFresh: 'CF_BUILD_ID', 'drone': 'DRONE', githubActions: 'GITHUB_ACTIONS', 'gitlab': isGitlab, @@ -218,6 +219,20 @@ const _providerCiParams = () => { 'BUILD_TEAM_NAME', 'ATC_EXTERNAL_URL', ]), + // https://codefresh.io/docs/docs/codefresh-yaml/variables/ + codeFresh: extract([ + 'CF_BUILD_ID', + 'CF_BUILD_URL', + 'CF_CURRENT_ATTEMPT', + 'CF_STEP_NAME', + 'CF_PIPELINE_NAME', + 'CF_PIPELINE_TRIGGER_ID', + // variables added for pull requests + 'CF_PULL_REQUEST_ID', + 'CF_PULL_REQUEST_IS_FORK', + 'CF_PULL_REQUEST_NUMBER', + 'CF_PULL_REQUEST_TARGET', + ]), drone: extract([ 'DRONE_JOB_NUMBER', 'DRONE_BUILD_LINK', @@ -465,6 +480,12 @@ const _providerCommitParams = () => { // remoteOrigin: ??? // defaultBranch: ??? }, + codeFresh: { + sha: env.CF_REVISION, + branch: env.CF_BRANCH, + message: env.CF_COMMIT_MESSAGE, + authorName: env.CF_COMMIT_AUTHOR, + }, drone: { sha: env.DRONE_COMMIT_SHA, branch: env.DRONE_COMMIT_BRANCH, diff --git a/packages/server/package.json b/packages/server/package.json index 71c2a639ac..d51922a514 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -95,7 +95,7 @@ "ospath": "1.2.2", "p-queue": "6.1.0", "pluralize": "8.0.0", - "ramda": "0.24.1", + "ramda": "0.27.1", "randomstring": "1.1.5", "recast": "0.20.4", "resolve": "1.17.0", diff --git a/packages/server/test/unit/ci_provider_spec.js b/packages/server/test/unit/ci_provider_spec.js index 343b86a09d..c350739ca1 100644 --- a/packages/server/test/unit/ci_provider_spec.js +++ b/packages/server/test/unit/ci_provider_spec.js @@ -458,6 +458,52 @@ describe('lib/util/ci_provider', () => { return expectsCommitParams(null) }) + it('codeFresh', () => { + resetEnv = mockedEnv({ + // build information + 'CF_BUILD_ID': 'cfBuildId', + 'CF_BUILD_URL': 'cfBuildUrl', + 'CF_CURRENT_ATTEMPT': 'cfCurrentAttempt', + 'CF_STEP_NAME': 'cfStepName', + 'CF_PIPELINE_NAME': 'cfPipelineName', + 'CF_PIPELINE_TRIGGER_ID': 'cfPipelineTriggerId', + + // variables added for pull requests + 'CF_PULL_REQUEST_ID': 'cfPullRequestId', + 'CF_PULL_REQUEST_IS_FORK': 'cfPullRequestIsFork', + 'CF_PULL_REQUEST_NUMBER': 'cfPullRequestNumber', + 'CF_PULL_REQUEST_TARGET': 'cfPullRequestTarget', + + // git information + CF_REVISION: 'cfRevision', + CF_BRANCH: 'cfBranch', + CF_COMMIT_MESSAGE: 'cfCommitMessage', + CF_COMMIT_AUTHOR: 'cfCommitAuthor', + }, { clear: true }) + + expectsName('codeFresh') + expectsCiParams({ + cfBuildId: 'cfBuildId', + cfBuildUrl: 'cfBuildUrl', + cfCurrentAttempt: 'cfCurrentAttempt', + cfStepName: 'cfStepName', + cfPipelineName: 'cfPipelineName', + cfPipelineTriggerId: 'cfPipelineTriggerId', + // pull request variables + cfPullRequestId: 'cfPullRequestId', + cfPullRequestIsFork: 'cfPullRequestIsFork', + cfPullRequestNumber: 'cfPullRequestNumber', + cfPullRequestTarget: 'cfPullRequestTarget', + }) + + expectsCommitParams({ + sha: 'cfRevision', + branch: 'cfBranch', + message: 'cfCommitMessage', + authorName: 'cfCommitAuthor', + }) + }) + it('drone', () => { resetEnv = mockedEnv({ DRONE: 'true', diff --git a/yarn.lock b/yarn.lock index 34951f098e..1b56ac4424 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27685,7 +27685,7 @@ ramda@0.25.0, ramda@^0.25.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ== -ramda@0.26.1, ramda@^0.26.0, ramda@^0.26.1, ramda@~0.26.1: +ramda@0.26.1, ramda@^0.26.0, ramda@^0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== @@ -27695,16 +27695,16 @@ ramda@0.27.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.0.tgz#915dc29865c0800bf3f69b8fd6c279898b59de43" integrity sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA== +ramda@0.27.1, ramda@^0.27.1, ramda@~0.27.1: + version "0.27.1" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" + integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== + ramda@0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.9.1.tgz#cc914dc3a82c608d003090203787c3f6826c1d87" integrity sha1-zJFNw6gsYI0AMJAgN4fD9oJsHYc= -ramda@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" - integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== - randexp@0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3"