Skip to content

Commit

Permalink
Merge pull request #108 from replayio-public/feature/PRO-697-reapply-…
Browse files Browse the repository at this point in the history
…replay-setup

Set up Replay again
  • Loading branch information
markerikson authored Jun 24, 2024
2 parents e66e4da + 3c0cd25 commit c43cd2a
Show file tree
Hide file tree
Showing 8 changed files with 588 additions and 110 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/add_issue_to_triage_board.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: "cypress:server:args"
REPLAY_API_KEY: ${{ secrets.REPLAY_API_KEY }}

# ui-chrome-mobile-tests:
# timeout-minutes: 15
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/merge-develop-into-flake-demo.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/triage_new_comment_workflow.yml

This file was deleted.

11 changes: 10 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import codeCoverageTask from "@cypress/code-coverage/task";
import { devServer } from "@cypress/vite-dev-server";
import { defineConfig } from "cypress";
import { mergeConfig, loadEnv } from "vite";
import { plugin as replayPlugin, wrapOn } from "@replayio/cypress";

dotenv.config({ path: ".env.local" });
dotenv.config();
Expand Down Expand Up @@ -97,9 +98,17 @@ module.exports = defineConfig({
viewportHeight: 1000,
viewportWidth: 1280,
experimentalRunAllSpecs: true,
setupNodeEvents(on, config) {
setupNodeEvents(cyOn, config) {
const testDataApiEndpoint = `${config.env.apiUrl}/testData`;

const on = wrapOn(cyOn);

replayPlugin(on, config, {
upload: true, // automatically upload your replays to DevTools

apiKey: process.env.REPLAY_API_KEY,
});

const queryDatabase = ({ entity, query }, callback) => {
const fetchData = async (attrs) => {
const { data } = await axios.get(`${testDataApiEndpoint}/${entity}`);
Expand Down
1 change: 1 addition & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @ts-check
import "@cypress/code-coverage/support";
import "@replayio/cypress/support";
import "./commands";
import { isMobile } from "./utils";

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@faker-js/faker": "6.1.2",
"@percy/cli": "^1.27.4",
"@percy/cypress": "3.1.2",
"@replayio/cypress": "^3.0.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/bcryptjs": "2.4.2",
Expand Down
Loading

0 comments on commit c43cd2a

Please sign in to comment.