Skip to content

Commit

Permalink
Add Replay
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonLaster committed Jul 23, 2022
1 parent a4779fc commit 7102bff
Show file tree
Hide file tree
Showing 5 changed files with 812 additions and 381 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
build:
docker:
# specify the version you desire here
# - image: circleci/node:10
- image: cypress/base:10
# - image: circleci/node:18
- image: cypress/base:16

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand All @@ -34,5 +34,9 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test

- run:
command: npx @replayio/replay upload-all
environment:
RECORD_REPLAY_API_KEY: rwk_BfwnKwjoc9FfK1cG1tdZ8x1zt8h2YuTqHcCdhb4v8zZ
4 changes: 3 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"baseUrl": "http://localhost:8000/"
"baseUrl": "http://localhost:8000/",
"screenshotOnRunFailure": false,
"video": false
}
8 changes: 7 additions & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const cypressReplay = require('@replayio/cypress')
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
Expand All @@ -10,8 +11,13 @@

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
cypressReplay.default(on, config)
return config
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
"export": "./packages/export/cli.js http://localhost:8000/print -o docs/public/deck.pdf",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:record": "RECORD_ALL_CONTENT=1 RECORD_REPLAY_METADATA_FILE=$(mktemp) cypress run --browser 'Replay Firefox'",
"test:dev": "start-server-and-test start http://localhost:8000 cypress:open",
"jest": "jest",
"test": "jest && start-server-and-test start http://localhost:8000 cypress:run"
"test": "RECORD_ALL_CONTENT=1 RECORD_REPLAY_METADATA_FILE=$(mktemp) jest && start-server-and-test start http://localhost:8000 cypress:run --browser 'Replay Firefox'"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@testing-library/react": "^10.0.2",
"cypress": "^4.3.0",
"@replayio/cypress": "^0.2.7",
"cypress": "^9.7.0",
"husky": "^4.2.1",
"jest": "^25.1.0",
"jest-emotion": "^10.0.27",
Expand Down

0 comments on commit 7102bff

Please sign in to comment.