Skip to content

Commit

Permalink
Merge 216bc61 into cc673ed
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored Jun 11, 2024
2 parents cc673ed + 216bc61 commit a0c675a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-books-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@replayio/cypress": major
---

Removed support for Replay Firefox
13 changes: 6 additions & 7 deletions packages/cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ The Replay adapter for cypress requires two updates: one to your `cypress.config
```js
// cypress.config.js
import { defineConfig } from "cypress";
import cypressReplay from "@replayio/cypress";
import cypressReplay, { wrapOn } from "@replayio/cypress";

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// Adds replay-firefox (macOS, linux) and replay-chromium (linux)
// browsers and hooks into Cypress lifecycle methods to capture test
setupNodeEvents(cyOn, config) {
const on = wrapOn(cyOn);
// Adds replay-chromium browsers
// and hooks into Cypress lifecycle methods to capture test
// metadata and results
cypressReplay(on, config);
return config;
Expand All @@ -40,13 +41,11 @@ import "@replayio/cypress/support";

## Runtime Configuration

- Use the `--browser` flag to select a Replay Browser to record
- If using the Firefox version of Replay, you must set the `RECORD_ALL_CONTENT` environment variable to enable recording.
- Use the `--browser` flag to select the Replay Chromium to record
- To enable capturing metadata for the tests, you must set `RECORD_REPLAY_METADATA_FILE` to an accessible file path.
- To hide the Cypress sidebar and only show your application, set `CYPRESS_NO_COMMAND_LOG`.

```bash
RECORD_ALL_CONTENT=1 \
RECORD_REPLAY_METADATA_FILE=$(mktemp) \
npx cypress run --browser replay-chromium
```
Expand Down
22 changes: 2 additions & 20 deletions packages/cypress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import semver from "semver";
import { getPlaywrightBrowserPath, RecordingEntry } from "@replayio/replay";
import { TestMetadataV2, initMetadataFile, warn } from "@replayio/test-utils";
import { initMetadataFile, warn } from "@replayio/test-utils";
import path from "path";
import dbg from "debug";
import chalk from "chalk";
Expand Down Expand Up @@ -331,25 +331,7 @@ const plugin = (
isHeadless: false,
});
} else {
debug("Chromium not supported on this platform", chromiumPath);
}

const firefoxPath = getPlaywrightBrowserPath("firefox");
if (firefoxPath) {
debug("Adding firefox to cypress at %s", firefoxPath);
config.browsers = config.browsers.concat({
name: "replay-firefox",
channel: "stable",
family: "firefox",
displayName: "Replay",
version: "91.0",
path: firefoxPath,
majorVersion: 91,
isHeaded: true,
isHeadless: false,
});
} else {
debug("Firefox not supported on this platform", firefoxPath);
debug("Replay Chromium not supported on this platform", chromiumPath);
}
}

Expand Down

0 comments on commit a0c675a

Please sign in to comment.