diff --git a/source/guides/core-concepts/test-runner.md b/source/guides/core-concepts/test-runner.md index 8f98ef21b5..847f232fd8 100644 --- a/source/guides/core-concepts/test-runner.md +++ b/source/guides/core-concepts/test-runner.md @@ -154,3 +154,20 @@ Type in text to see which element it matches. Note that {% url `cy.contains()` c If you would like to interact with your app while the Selector Playground is open, the element highlighting might get in the way. Toggling the highlighting off will allow you to interact with your app more easily. {% imgTag /img/guides/test-runner/turn-off-highlight-in-selector-playground.gif "Turn off highlighting" %} + +# Keyboard Shortcuts + +There are keyboard shortcuts to quickly perform common actions from within the Test Runner. + +| Key | Action | +| ----------- | ----------- | +| `r` | Rerun tests | +| `s` | Stop tests | +| `f` | Bring focus to 'specs' window | + +{% imgTag /img/guides/test-runner/keyboard-shortcuts.png "Tooltips show keyboard shortcuts" %} + +{% history %} +{% url "3.5.0" changelog#3-5-0 %} | Added keyboard shortcuts to Test Runner +{% url "1.3.0" changelog#1-3-0 %} | Added Selector Playground +{% endhistory %} diff --git a/source/guides/guides/continuous-integration.md b/source/guides/guides/continuous-integration.md index 69a3eb3cc1..dcc3908099 100644 --- a/source/guides/guides/continuous-integration.md +++ b/source/guides/guides/continuous-integration.md @@ -164,6 +164,7 @@ Cypress should run on **all** CI providers. We have provided some example projec CI Provider | Example Project | Example Config ----------- | --------------- | -------------- +{% url "AWS Amplify Console" https://aws.amazon.com/amplify/console %} | {% url "cypress-example-kitchensink" https://github.com/cypress-io/cypress-example-kitchensink %} | {% url "amplify.yml" https://github.com/cypress-io/cypress-example-kitchensink/blob/master/amplify.yml %} {% url "AppVeyor" https://appveyor.com %} | {% url "cypress-example-kitchensink" https://github.com/cypress-io/cypress-example-kitchensink %} | {% url "appveyor.yml" https://github.com/cypress-io/cypress-example-kitchensink/blob/master/appveyor.yml %} {% url "Azure DevOps / VSTS CI / TeamFoundation" https://dev.azure.com/ %} | {% url "cypress-example-kitchensink" https://github.com/bahmutov/cypress-example-kitchensink %} | {% url "vsts-ci.yml" https://github.com/bahmutov/cypress-example-kitchensink/blob/master/vsts-ci.yml %} {% url "BitBucket" https://bitbucket.org/product/features/pipelines %} | {% url "cypress-example-kitchensink" https://bitbucket.org/cypress-io/cypress-example-kitchensink %} | {% url "bitbucket-pipelines.yml" https://bitbucket.org/cypress-io/cypress-example-kitchensink/src/master/bitbucket-pipelines.yml %} @@ -323,6 +324,90 @@ jobs: Find the complete CircleCI v2 example with caching and artifact upload in the {% url "cypress-example-docker-circle" https://github.com/cypress-io/cypress-example-docker-circle %} repo. +### Example `amplify.yml` + +```yaml +version: 0.1 +frontend: + phases: + preBuild: + commands: + - npm install + build: + commands: + - npm run build + artifacts: + baseDirectory: app + files: + - "**/*" + cache: + paths: + - node_modules/**/* +test: + artifacts: + baseDirectory: cypress + configFilePath: "**/mochawesome.json" + files: + - "**/*.png" + - "**/*.mp4" + phases: + preTest: + commands: + - npm install + - npm install wait-on + - npm install mocha@5.2.0 mochawesome mochawesome-merge mochawesome-report-generator + - "npm start & npx wait-on http://127.0.0.1:8080" + test: + commands: + - 'npx cypress run --reporter mochawesome --reporter-options "reportDir=cypress/report/mochawesome-report,overwrite=false,html=false,json=true,timestamp=mmddyyyy_HHMMss"' + postTest: + commands: + - npx mochawesome-merge --reportDir cypress/report/mochawesome-report > cypress/report/mochawesome.json +``` + +### Example `amplify.yml` v2 with --record for Cypress Dashboard + +Add `CYPRESS_RECORD_KEY` Enviroment Variable in [Amplify Console](https://aws.amazon.com/amplify/console/). + +```yaml +version: 0.1 +frontend: + phases: + preBuild: + commands: + - npm install + build: + commands: + - npm run build + artifacts: + baseDirectory: app + files: + - "**/*" + cache: + paths: + - node_modules/**/* +test: + artifacts: + baseDirectory: cypress + configFilePath: "**/mochawesome.json" + files: + - "**/*.png" + - "**/*.mp4" + phases: + preTest: + commands: + - npm install + - npm install wait-on + - npm install mocha@5.2.0 mochawesome mochawesome-merge mochawesome-report-generator + - "npm start & npx wait-on http://127.0.0.1:8080" + test: + commands: + - 'npx cypress run --record --reporter mochawesome --reporter-options "reportDir=cypress/report/mochawesome-report,overwrite=false,html=false,json=true,timestamp=mmddyyyy_HHMMss"' + postTest: + commands: + - npx mochawesome-merge --reportDir cypress/report/mochawesome-report > cypress/report/mochawesome.json +``` + ## Docker We have {% url 'created' https://github.com/cypress-io/cypress-docker-images %} an official {% url 'cypress/base' 'https://hub.docker.com/r/cypress/base/' %} container with all of the required dependencies installed. Just add Cypress and go! We are also adding images with browsers pre-installed under {% url 'cypress/browsers' 'https://hub.docker.com/r/cypress/browsers/' %} name. A typical Dockerfile would look like this: diff --git a/themes/cypress/source/img/guides/test-runner/keyboard-shortcuts.png b/themes/cypress/source/img/guides/test-runner/keyboard-shortcuts.png new file mode 100644 index 0000000000..cb47ed5414 Binary files /dev/null and b/themes/cypress/source/img/guides/test-runner/keyboard-shortcuts.png differ