Cypress Playback is a plugin and a set of commands that allows Cypress to automatically record responses to network requests made during a test run.

Overview

Cypress Playback

🔄 Automatically record and playback HTTP requests made in Cypress tests.

Contributor Covenant

Cypress Playback is a plugin and a set of commands that allows Cypress to automatically record responses to network requests made during a test run. These responses are then saved to disk and made available for playback in later test runs. This allows for applications or components under test to always receive the same response to a request, no matter where or when they run.

This plugin is not a replacement for the cy.intercept command, but is instead a wrapper around that command. It handles situations where a developer isn't concerned with the contents of a response to a network request, just that the response is always the same.

Quick start

This README contains the full documentation for Cypress Playback but this quick start will get you going in just a few minutes.

Installation

Step 1. In a project with Cypress installed, run:

npm install @oreillymedia/cypress-playback -D

Step 2. Add the tasks to the project's cypress/plugins/index.js file:

module.exports = (on, config) => {
  require('@oreillymedia/cypress-playback/addTasks')(on, config);
  // Add any other tasks
  return config;
};

Step 3. Add the commands to the project's cypress/support/index.js file:

import '@oreillymedia/cypress-playback/addCommands';

Insert playback commands

The playback command is a wrapper around the Cypress' intercept command and can be used in much the same way.

A notable exception is that it doesn't provide any way to attach a request handler or a provide a static response, as that isn't the purpose of this plugin. This plugin is designed to capture real responses and record them for later playback. For providing fixtures as responses, the normal cy.intercept command should be used.

Syntax

// Records or plays back network responses, depending on the value of
// `PLAYBACK_MODE` in the Cypress environment.
cy.playback(method, url, playbackOptions);
cy.playback(method, routeMatcher, playbackOptions);

Usage

// Capturing a request.
cy.playback('POST', \/users\/);
// Providing playback options.
cy.playback('GET', \/todos\/, { minTimes: 2 });
// Aliasing the request for later use in the test.
cy.playback('GET', 'https://www.example.com/300/150').as('image');

Run Cypress

Run Cypress as you normally would using cypress open. By default using cypress open will operate Cypress playback in hybrid mode, meaning it will save any requests that have not already been saved and fulfill ones that have and as such, is a great place to start.

That's it! Your specified playback URL calls are now stored as static fixtures and will be automatically fulfilled in further test runs.

Keep reading for further info on the various playback modes and playback API.


API and usage documentation

The playback command

Arguments

method (string)

Capture requests using this specific HTTP method (GET, POST, etc).

🚨 NOTE: Unlike the intercept command, the command requires a method argument.

url (string, glob, RegExp)

Capture requests that match this value. See the intercept command's "Matching url" documentation for more details.

routeMatcher (RouteMatcher)

An object used to define a request that can be captured. See the intercept command's "RouteMatcher" documentation for more details.

playbackOptions (PlaybackOptions)

playbackOptions is an object used to modify the behavior of the playback command. Below is an example object using all of the available properties.

{
  minTimes: 2,
  recording: {
    matchingIgnores: ['port'],
    rewriteOrigin: 'https://not-example.com',
    allowAllStatusCodes: true
  }
}
playbackOptions.minTimes (number)

The minimum number of times the system under test must trigger a request that matches the url or routeMatcher. See "All Requests Complete" Assertions for more details.

Default: 1 - At least 1 request must have been matched.

playbackOptions.recording (object)

This object modifies the behavior of the command when it is recording a network response to a request.

Default: undefined

playbackOptions.recording.matchingIgnores (string[])

An array consisting of one or more of the following values:

  • protocol
  • hostname
  • port
  • pathname
  • search
  • method
  • body

See the "Requests and Responses" section below for more details on how to use this property.

Default: undefined

playbackOptions.recording.allowAllStatusCodes (boolean)

By default, the command will only record responses that have a 2xx status code. By setting this to true, all responses will be recorded.

Note that trying to record 3xx responses will lead to some strange behavior and is area where more work is needed in the plugin.

Default: false

Yields

The command yields the response of the cy.intercept command it is wrapping. See the intercept command's "Yields" section for more details.

Requests and Responses

Since the words "request" and "response" can have a few meanings, it's helpful to provide a few definitions first:

  • Request: A network request made by the browser that may be intercepted by a request matcher.
  • Response: The response sent back to the browser's network request. The plugin saves responses to the automatically created fixture file.
  • Request Matcher: This is what is being created by calling the cy.playback command. Request matchers are saved to the automatically created fixtures file. Depending on how the route matching is setup in the matcher, the plugin may record multiple responses for a single matcher.

🚨 A Warning on Secrets: A response that is recorded in the fixtures file, which will likely be committed to the project's repository, will contain the response's headers and body. While this file is binary and is compressed, it isn't encrypted or protected in any way. When recording responses, make sure there aren't any secrets used by a request or returned in a response that you wouldn't want exposed.

Request Matching versus Response Matching

Since a developer can create a request matcher that can potentially match multiple requests, it's important that the plugin know how to return the right response to any individual request. That means the plugin is performing both request matching and response matching.

To explain this better, consider the examples below.

Example 1: Multiple Requests to the Same Request Matcher

The developer wants to record all requests made to /api/v1/todo/. Their app will be making multiple calls to this Api, each with an id value appended to the end. The developer sets up the following playback command in their test:

cy.playback('GET', new RegExp('/api/v1/todo/'));

Internally, the plugin is calling cy.intercept with that RegExp as the route matcher. The app, over the course of the test, makes requests to /api/v1/todo/1 through /api/v1/todo/5. The plugin's wrapped intercept command intercepts all of those requests and its custom request handler is called with the full details for each request that is being made. For example, that means the request handler will see information such as a request to https://example.com/api/v1/todo/1 was made.

What happens next depends on what mode the plugin is in:

  • If the plugin is in "playback" mode, it will try to find a recorded response for that specific request.
  • If the plugin is in "record" mode, it will capture the response and write it to disk when the test is completed.

More details on the plugin's mode can be found below.

Example 2: Differences between Test Environments

The developer is recording requests made to their local instance, which is hosted at http://localhost:4200. As it runs, the app will be making requests to http://localhost:4200/api/v1/todo/. However, in the project's CI job, the tests will be run in a Docker container, so the app will be hosted at http://test:8000.

This is a problem, because by default the plugin expects every attribute of the request to match. The attributes that must match are:

  • protocol
  • hostname
  • port
  • pathname
  • search
  • method
  • body

If any of those are different, the recorded response won't be returned. However, the matchingIgnores property allows the developer to specifically say certain attributes shouldn't be considered.

ℹ️ Note that while headers are recorded and played back, they are not used when trying to look up a matching response. This is because headers tend to vary considerably, so they are always ignored. However, functionality could be added to the plugin to allow a developer to specify which headers to include when matching.

In this case, since the hostname and port are going to be different, the developer should write their playback command like this:

cy.playback('GET', new RegExp('/api/v1/todo/'), {
  recording: {
    matchingIgnores: ['hostname', 'port']
  }
});

Of course, there is a danger that if too many attributes of a request are ignored, the plugin won't find the correct response. For example, if every request attribute were ignored, then every recorded response would be a match. It's best to limit the list of ignored attributes to smallest number possible.

Playback Mode

The plugin can be run in one of three different modes:

  • playback - Previously recorded responses are played back. If a matching response is not found for the intercepted request, an error is thrown and the test will fail. This is the default mode when Cypress is started with the run option.
  • record - All request responses are recorded and any previously recorded responses are ignored.
  • hybrid - If a previously recorded response matches the intercepted request, the plugin plays back that response. Otherwise, the response is recorded when the request completes. This is the default mode when Cypress is started with the open option.

The mode can be overridden through an environment variable:

CYPRESS_PLAYBACK_MODE=record npx cypress open

It can also be set in the cypress.json:

{
  "env": {
    "PLAYBACK_MODE": "record"
  }
}

"All Requests Complete" Assertion

During the afterEach stage of a test, the plugin will assert that all request matchers were matched a minimum number of times. The default number of times is 1, but that value can be changed through the minTimes option.

// This request matcher is considered optional, so don't fail the test. There
// is a danger in this, though. See the "Why This is Important" section below.
cy.playback('GET', new RegExp('/api/v1/todo/'), { minTimes: 0 });
// This request matcher must be matched 5 times, or the test will fail.
cy.playback('GET', new RegExp('/api/v1/todo/'), { minTimes: 5 });

What the plugin is doing during the afterEach stage is, over a period of time, checking to see if any request matchers still have not been matched their minimum number of times. If after 10 seconds, the expected number of requests is still not met, the plugin fails the test.

Why This is Important

There are two factors that make this assertion important. One factor is that Cypress may consider a test complete before all the network requests made by the system under test are received. The other factor is that the order in which network requests complete is non-deterministic. This means that during one test run a request may complete before the test does, while in another it has not.

To handle that, the plugin tries to make sure every playback command has received a response that can be recorded. This is to ensure that all request matchers have responses available when the test is run in "playback" mode.

This is why an "optional" request matchers can be dangerous. If a response is not captured for a request in record mode, the test would fail when that request was made when in playback mode.

"Stale" Request Matchers and Responses

As applications and tests change over time, requests that were once made may not be in the future. To keep these old request matchers and responses from building up in the recorded fixtures file, the plugin considers any request matcher or response loaded from disk as "stale". These stale entities are automatically removed when the fixtures file is written to disk.

A "stale" entity becomes "fresh" when...

  • Request matchers are considered "fresh" if a cy.playback command is invoked in the test that matches their method, url or routeMatcher, and playback options.
  • Responses are considered "fresh" if a single request is made that exactly matches the request attributes they match on. Meaning, a request was made that matches the post, hostname, etc. they match on.

The Recorded Fixtures File

All the captured responses for a test are grouped together into a single .cy-requests file that is saved to the Cypress fixtures folder. A subdirectory is created in the fixtures folder for each spec file. Within that folder, a fixture file is created for each test in the spec file. The file name is a combination of the test's name and any describe blocks it is nested under.

Consider the following example spec file.

  • File Name: ./cypress/integration/app/basic.spec.js
  • Spec File Contents:
    describe('app', () => {
      it('works', () => {
        // Test code.
      });
      it('still works', () => {
        // Test code.
      });
      describe('another language', () => {
        it('works', () => {
          // Test code.
        });
      });
    });
  • Generated Fixture Files:
    ./cypress/fixtures/app/basic-spec/app-works.cy-requests
    ./cypress/fixtures/app/basic-spec/app-still-works.cy-requests
    ./cypress/fixtures/app/basic-spec/app-another-language-works.cy-requests

⚠️ As can seen, if the location of the spec file or the structure or name of the test changes, the generated file location and name will change as well. This means your project could end up with orphaned fixture files, as the plugin doesn't keep track of changes made to file names.

File Format

The .cy-requests file is a binary file, which is created by JSON stringifying the request matchers and requests and compressing that output with Node's zlib.deflate function. There are two reasons for this approach:

  • As a compressed binary file it will take up less space on disk and Git LFS can be used to store them.
  • The unreadable nature of the file prevents developers from easily being able to edit them. This is important, because the plugin overwrites the fixture file whenever a test completes, so any manual edits would be immediately lost.

The isPlayingBackRequests command

This command can be used to allow conditional logic in a test when the plugin will playback recorded requests.

Syntax

cy.isPlayingBackRequests();

Usage

cy.isPlayingBackRequests().then((isPlayingBack) => {
  cy.log(`isPlayingBack: ${isPlayingBack}`);
});

Arguments

None

Yields

  • cy.isPlayingBackRequests yields true if the playback mode is playback or hybrid. Otherwise, yields false.

The isRecordingRequests command

This command can be used to allow conditional logic in a test when the playback mode is set to record. For example, this could be used to perform a login step that wouldn't be needed in playback mode.

Syntax

cy.isRecordingRequests();

Usage

cy.isRecordingRequests().then((isRecording) => {
  cy.log(`isRecording: ${isRecording}`);
});

Arguments

None

Yields

  • cy.isRecordingRequests yields true if the playback mode is record or hybrid. Otherwise, yields false.
Comments
  • build(deps): bump parse-url from 6.0.0 to 6.0.2 in /lib

    build(deps): bump parse-url from 6.0.0 to 6.0.2 in /lib

    Bumps parse-url from 6.0.0 to 6.0.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 2
  • build(deps): bump vm2 from 3.9.10 to 3.9.11 in /lib

    build(deps): bump vm2 from 3.9.10 to 3.9.11 in /lib

    Bumps vm2 from 3.9.10 to 3.9.11.

    Release notes

    Sourced from vm2's releases.

    3.9.11

    New Features

    https://github.com/patriksimek/vm2/commit/58478a58c6f4af3c54faf4117ed5ab72d2cc8cd5: Add option require.strict to allow to load required modules in non strict mode.

    Fixes

    https://github.com/patriksimek/vm2/commit/d9a7f3cc995d3d861e1380eafb886cb3c5e2b873: Security fix.

    Changelog

    Sourced from vm2's changelog.

    v3.9.11 (2022-08-28)

    [new] Add option require.strict to allow to load required modules in non strict mode.
    [fix] Security fix.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • fix: get invocation details from parent

    fix: get invocation details from parent

    Summary

    Gets invocation details from the parent if doesn't exist on the test. test.invocationDetails is missing during a few instances but test.parent.invocationDetails is available and point to the desired file path. I'm unsure what the root cause is - if this is a known issue / case please let me know! I'm running cypress 9.6.1.

    Related Issue(s)

    N/A

    Checklist

    opened by jjestacio 1
  • Spec files not located in the `integrations` folder not supported

    Spec files not located in the `integrations` folder not supported

    Describe the bug The plugin currently assumes that the test file will be relative to the integrations folder when making the directory path for the fixtures file. This causes a problem when run Cypress is in component-mode, as the spec files are relative to the component under test in that mode.

    To Reproduce

    1. Create a component in the Sanbox app. This will involve adding the library and tooling to do this.
    2. Add a component test with a playback command in it.
    3. Run the test.
    4. See error

    Expected behavior The cy-requests file should be created in the Cypress fixtures folder using a path and file name scheme similar to that used for tests in the integrations folder.

    Screenshots n/a

    Environment

    • OS: n/a
    • Cypress Version: n/a
    • Browser: n/a
    • Browser Version: n/a

    Additional context n/a

    bug 
    opened by tvsbrent 1
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | @testing-library/cypress | devDependencies | patch | 8.0.3 -> 8.0.7 | | chai (source) | devDependencies | patch | 4.3.6 -> 4.3.7 | | cypress | devDependencies | minor | 10.9.0 -> 10.11.0 | | eslint (source) | devDependencies | minor | 8.26.0 -> 8.28.0 | | testdouble | devDependencies | patch | 3.16.6 -> 3.16.8 |


    Release Notes

    kentcdodds/cypress-testing-library

    v8.0.7

    Compare Source

    Bug Fixes

    v8.0.6

    Compare Source

    Bug Fixes

    v8.0.5

    Compare Source

    Bug Fixes

    v8.0.4

    Compare Source

    Bug Fixes
    chaijs/chai

    v4.3.7

    Compare Source

    What's Changed

    Full Changelog: https://github.com/chaijs/chai/compare/v4.3.6...v4.3.7

    cypress-io/cypress

    v10.11.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-11-0

    v10.10.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-10-0

    eslint/eslint

    v8.28.0

    Compare Source

    Features

    • 63bce44 feat: add ignoreClassFieldInitialValues option to no-magic-numbers (#​16539) (Milos Djermanovic)
    • 8385ecd feat: multiline properties in rule key-spacing with option align (#​16532) (Francesco Trotta)
    • a4e89db feat: no-obj-calls support Intl (#​16543) (Sosuke Suzuki)

    Bug Fixes

    • c50ae4f fix: Ensure that dot files are found with globs. (#​16550) (Nicholas C. Zakas)
    • 9432b67 fix: throw error for first unmatched pattern (#​16533) (Milos Djermanovic)
    • e76c382 fix: allow * 1 when followed by / in no-implicit-coercion (#​16522) (Milos Djermanovic)

    Documentation

    Chores

    v8.27.0

    Compare Source

    Features

    • f14587c feat: new no-new-native-nonconstructor rule (#​16368) (Sosuke Suzuki)
    • 978799b feat: add new rule no-empty-static-block (#​16325) (Sosuke Suzuki)
    • 69216ee feat: no-empty suggest to add comment in empty BlockStatement (#​16470) (Nitin Kumar)
    • 319f0a5 feat: use context.languageOptions.ecmaVersion in core rules (#​16458) (Milos Djermanovic)

    Bug Fixes

    • c3ce521 fix: Ensure unmatched glob patterns throw an error (#​16462) (Nicholas C. Zakas)
    • 886a038 fix: handle files with unspecified path in getRulesMetaForResults (#​16437) (Francesco Trotta)

    Documentation

    • ce93b42 docs: Stylelint property-no-unknown (#​16497) (Nick Schonning)
    • d2cecb4 docs: Stylelint declaration-block-no-shorthand-property-overrides (#​16498) (Nick Schonning)
    • 0a92805 docs: stylelint color-hex-case (#​16496) (Nick Schonning)
    • 74a5af4 docs: fix stylelint error (#​16491) (Milos Djermanovic)
    • 324db1a docs: explicit stylelint color related rules (#​16465) (Nick Schonning)
    • 94dc4f1 docs: use Stylelint for HTML files (#​16468) (Nick Schonning)
    • cc6128d docs: enable stylelint declaration-block-no-duplicate-properties (#​16466) (Nick Schonning)
    • d03a8bf docs: Add heading to justification explanation (#​16430) (Maritaria)
    • 8a15968 docs: add Stylelint configuration and cleanup (#​16379) (Nick Schonning)
    • 9b0a469 docs: note commit messages don't support scope (#​16435) (Andy Edwards)
    • 1581405 docs: improve context.getScope() docs (#​16417) (Ben Perlmutter)
    • b797149 docs: update formatters template (#​16454) (Milos Djermanovic)
    • 5ac4de9 docs: fix link to formatters on the Core Concepts page (#​16455) (Vladislav)
    • 33313ef docs: core-concepts: fix link to semi rule (#​16453) (coderaiser)
    testdouble/testdouble.js

    v3.16.8

    Compare Source

    v3.16.7

    Compare Source

    • Update typings around replace and related methods #​499

    Configuration

    📅 Schedule: Branch creation - "on the 26 day of November in 2022,on the 27 day of November in 2022,on the 31 day of December in 2022,on the 1 day of January in 2023,on the 28 day of January in 2023,on the 29 day of January in 2023,on the 25 day of February in 2023,on the 26 day of February in 2023,on the 25 day of March in 2023,on the 26 day of March in 2023,on the 29 day of April in 2023,on the 30 day of April in 2023,on the 27 day of May in 2023,on the 28 day of May in 2023,on the 24 day of June in 2023,on the 25 day of June in 2023,on the 29 day of July in 2023,on the 30 day of July in 2023,on the 26 day of August in 2023,on the 27 day of August in 2023,on the 30 day of September in 2023,on the 1 day of October in 2023" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | @release-it/conventional-changelog | devDependencies | patch | 5.1.0 -> 5.1.1 | | eslint (source) | devDependencies | minor | 8.24.0 -> 8.26.0 | | mocha (source) | devDependencies | minor | 10.0.0 -> 10.1.0 | | release-it | devDependencies | minor | 15.4.2 -> 15.5.0 |


    Release Notes

    release-it/conventional-changelog

    v5.1.1

    Compare Source

    • Update dependencies (855a7df)
    • Add test for infile: false (40869a1)
    • Stricter tests and follow heading level (9aecd6a)
    eslint/eslint

    v8.26.0

    Compare Source

    Features

    • 4715787 feat: check Object.create() in getter-return (#​16420) (Yuki Hirasawa)
    • 28d1902 feat: no-implicit-globals supports exported block comment (#​16343) (Sosuke Suzuki)
    • e940be7 feat: Use ESLINT_USE_FLAT_CONFIG environment variable for flat config (#​16356) (Tomer Aberbach)
    • dd0c58f feat: Swap out Globby for custom globbing solution. (#​16369) (Nicholas C. Zakas)

    Bug Fixes

    • df77409 fix: use baseConfig constructor option in FlatESLint (#​16432) (Milos Djermanovic)
    • 33668ee fix: Ensure that glob patterns are matched correctly. (#​16449) (Nicholas C. Zakas)
    • 740b208 fix: ignore messages without a ruleId in getRulesMetaForResults (#​16409) (Francesco Trotta)
    • 8f9759e fix: --ignore-pattern in flat config mode should be relative to cwd (#​16425) (Milos Djermanovic)
    • 325ad37 fix: make getRulesMetaForResults return a plain object in trivial case (#​16438) (Francesco Trotta)
    • a2810bc fix: Ensure that directories can be unignored. (#​16436) (Nicholas C. Zakas)
    • 35916ad fix: Ensure unignore and reignore work correctly in flat config. (#​16422) (Nicholas C. Zakas)

    Documentation

    • 651649b docs: Core concepts page (#​16399) (Ben Perlmutter)
    • 631cf72 docs: note --ignore-path not supported with flat config (#​16434) (Andy Edwards)
    • 1692840 docs: fix syntax in examples for new config files (#​16427) (Milos Djermanovic)
    • d336cfc docs: Document extending plugin with new config (#​16394) (Ben Perlmutter)

    Chores

    v8.25.0

    Compare Source

    Features

    • 173e820 feat: Pass --max-warnings value to formatters (#​16348) (Brandon Mills)
    • 6964cb1 feat: remove support for ignore files in FlatESLint (#​16355) (Milos Djermanovic)
    • 1cc4b3a feat: id-length counts graphemes instead of code units (#​16321) (Sosuke Suzuki)

    Documentation

    Chores

    mochajs/mocha

    v10.1.0

    Compare Source

    :tada: Enhancements

    :nut_and_bolt: Other

    release-it/release-it

    v15.5.0

    Compare Source

    v15.4.3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - "on the 29 day of October in 2022,on the 30 day of October in 2022,on the 26 day of November in 2022,on the 27 day of November in 2022,on the 31 day of December in 2022,on the 1 day of January in 2023,on the 28 day of January in 2023,on the 29 day of January in 2023,on the 25 day of February in 2023,on the 26 day of February in 2023,on the 25 day of March in 2023,on the 26 day of March in 2023,on the 29 day of April in 2023,on the 30 day of April in 2023,on the 27 day of May in 2023,on the 28 day of May in 2023,on the 24 day of June in 2023,on the 25 day of June in 2023,on the 29 day of July in 2023,on the 30 day of July in 2023,on the 26 day of August in 2023,on the 27 day of August in 2023,on the 30 day of September in 2023,on the 1 day of October in 2023" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | cypress | devDependencies | minor | 10.4.0 -> 10.9.0 | | eslint (source) | devDependencies | minor | 8.23.1 -> 8.24.0 |


    Release Notes

    cypress-io/cypress

    v10.9.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-9-0

    v10.8.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-8-0

    v10.7.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-7-0

    v10.6.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-6-0

    v10.5.0

    Compare Source

    Changelog: https://docs.cypress.io/guides/references/changelog#​10-5-0

    eslint/eslint

    v8.24.0

    Compare Source

    Features

    • 1729f9e feat: account for sourceType: "commonjs" in the strict rule (#​16308) (Milos Djermanovic)
    • b0d72c9 feat: add rule logical-assignment-operators (#​16102) (fnx)
    • f02bcd9 feat: array-callback-return support findLast and findLastIndex (#​16314) (Sosuke Suzuki)

    Documentation

    Chores


    Configuration

    📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore: Vulnerability Patches - Critical

    chore: Vulnerability Patches - Critical

    This Pull Request was created to address Critical security vulnerabilities as idenitified by Dependabot.

    Updates to lib/package-lock.json

    This pull request contains updates to lib/package-lock.json. If you do not wish to accept one or more of these changes, please close the Dependabot issue. The vulnerabillity patcher will then update this pull request the next time it runs against this repository.

    :thumbsup: This pull request only regenerated the file referenced above. No other updates were applied.

    | Package | Vulnerable Versions | Message | Issue | Severity | Scope | Status | |---------|---------------------|---------|:-----:|----------|-------|:------:| | vm2 | < 3.9.11 | Addressed by lock regeneration | Issue 14 | Critical | Development | :white_check_mark: |

    Operations
    [2022-09-28T16:26:25.795Z]	Reset package-lock.json
    [2022-09-28T16:26:44.227Z]	Created package-lock.json
    
    maintenance 
    opened by orm-vulnerabilityscanner 0
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | eslint (source) | devDependencies | patch | 8.23.0 -> 8.23.1 | | release-it | devDependencies | patch | 15.4.1 -> 15.4.2 |


    Release Notes

    eslint/eslint

    v8.23.1

    Compare Source

    Bug Fixes

    • b719893 fix: Upgrade eslintrc to stop redefining plugins (#​16297) (Brandon Mills)
    • 734b54e fix: improve autofix for the prefer-const rule (#​16292) (Nitin Kumar)
    • 6a923ff fix: Ensure that glob patterns are normalized (#​16287) (Nicholas C. Zakas)
    • c6900f8 fix: Ensure globbing doesn't include subdirectories (#​16272) (Nicholas C. Zakas)

    Documentation

    • 16cba3f docs: fix mobile double tap issue (#​16293) (Sam Chen)
    • e098b5f docs: keyboard control to search results (#​16222) (Shanmughapriyan S)
    • 1b5b2a7 docs: add Consolas font and prioritize resource loading (#​16225) (Amaresh S M)
    • 1ae8236 docs: copy & use main package version in docs on release (#​16252) (Jugal Thakkar)
    • 279f0af docs: Improve id-denylist documentation (#​16223) (Mert Ciflikli)

    Chores

    release-it/release-it

    v15.4.2

    Compare Source

    • Update dependencies (97095d5)
    • Defer dry run bail out in asset globbing (to include the warning in dry runs) (bf6ccc8)
    • Housekeeping for Actions (feff2eb)

    Configuration

    📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | eslint (source) | devDependencies | minor | 8.22.0 -> 8.23.0 | | release-it | devDependencies | patch | 15.4.0 -> 15.4.1 |


    Release Notes

    eslint/eslint

    v8.23.0

    Compare Source

    Features

    • 3e5839e feat: Enable eslint.config.js lookup from CLI (#​16235) (Nicholas C. Zakas)
    • 30b1a2d feat: add allowEmptyCase option to no-fallthrough rule (#​15887) (Amaresh S M)
    • 43f03aa feat: no-warning-comments support comments with decoration (#​16120) (Lachlan Hunt)

    Documentation

    Chores

    release-it/release-it

    v15.4.1

    Compare Source

    • Handle file paths and dots in git urls (055a4ff)
    • Update dependencies (including git-url-parse) (1851650)

    Configuration

    📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore(deps): update dependency release-it to v15.4.0

    chore(deps): update dependency release-it to v15.4.0

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | release-it | devDependencies | minor | 15.3.0 -> 15.4.0 |


    Release Notes

    release-it/release-it

    v15.4.0

    Compare Source

    • Add npm.name to config.context and extend context for tagName (closes #​933) (627763f)

    Configuration

    📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • chore(deps): update dependency @testing-library/cypress to v9

    chore(deps): update dependency @testing-library/cypress to v9

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | @testing-library/cypress | devDependencies | major | 8.0.7 -> 9.0.0 |


    Release Notes

    kentcdodds/cypress-testing-library

    v9.0.0

    Compare Source

    chore
    BREAKING CHANGES
    • Use addQuery interface, which is only present in Cypress 12+.

    Configuration

    📅 Schedule: Branch creation - "on the 31 day of December in 2022,on the 1 day of January in 2023,on the 28 day of January in 2023,on the 29 day of January in 2023,on the 25 day of February in 2023,on the 26 day of February in 2023,on the 25 day of March in 2023,on the 26 day of March in 2023,on the 29 day of April in 2023,on the 30 day of April in 2023,on the 27 day of May in 2023,on the 28 day of May in 2023,on the 24 day of June in 2023,on the 25 day of June in 2023,on the 29 day of July in 2023,on the 30 day of July in 2023,on the 26 day of August in 2023,on the 27 day of August in 2023,on the 30 day of September in 2023,on the 1 day of October in 2023" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 1
  • chore(deps): update js dependencies

    chore(deps): update js dependencies

    This PR contains the following updates:

    | Package | Type | Update | Change | Pending | |---|---|---|---|---| | eslint (source) | devDependencies | minor | 8.28.0 -> 8.30.0 | 8.31.0 | | mocha (source) | devDependencies | minor | 10.1.0 -> 10.2.0 | | | release-it | devDependencies | minor | 15.5.0 -> 15.6.0 | | | start-server-and-test | devDependencies | minor | 1.14.0 -> 1.15.2 | |


    Release Notes

    eslint/eslint

    v8.30.0

    Compare Source

    Features

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#​16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#​16611) (Milos Djermanovic)

    Documentation

    Chores

    v8.29.0

    Compare Source

    Features

    • 49a07c5 feat: add allowParensAfterCommentPattern option to no-extra-parens (#​16561) (Nitin Kumar)
    • e6a865d feat: prefer-named-capture-group add suggestions (#​16544) (Josh Goldberg)
    • a91332b feat: In no-invalid-regexp validate flags also for non-literal patterns (#​16583) (trosos)

    Documentation

    Chores

    mochajs/mocha

    v10.2.0

    Compare Source

    :tada: Enhancements

    :bug: Fixes

    :book: Documentation

    release-it/release-it

    v15.6.0

    Compare Source

    v15.5.1

    Compare Source

    bahmutov/start-server-and-test

    v1.15.2

    Compare Source

    Bug Fixes
    • deps: update dependency wait-on to v6.0.1 (4e33599)

    v1.15.1

    Compare Source

    Bug Fixes
    • deps: update dependency debug to v4.3.4 (9cfb60e)

    v1.15.0

    Compare Source

    Features
    • use the --expect parameter to specify HTTP response code (#​343) (17a427c)

    Configuration

    📅 Schedule: Branch creation - "on the 31 day of December in 2022,on the 1 day of January in 2023,on the 28 day of January in 2023,on the 29 day of January in 2023,on the 25 day of February in 2023,on the 26 day of February in 2023,on the 25 day of March in 2023,on the 26 day of March in 2023,on the 29 day of April in 2023,on the 30 day of April in 2023,on the 27 day of May in 2023,on the 28 day of May in 2023,on the 24 day of June in 2023,on the 25 day of June in 2023,on the 29 day of July in 2023,on the 30 day of July in 2023,on the 26 day of August in 2023,on the 27 day of August in 2023,on the 30 day of September in 2023,on the 1 day of October in 2023" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Renovate Bot.

    maintenance 
    opened by orm-RenovateBot 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    npm
    lib/package.json
    • blueimp-md5 2.19.0
    • lodash.kebabcase 4.1.1
    • node-fetch 3.2.10
    • @release-it/conventional-changelog 5.1.1
    • c8 7.12.0
    • chai 4.3.7
    • cypress 10.11.0
    • eslint 8.28.0
    • eslint-plugin-cypress 2.12.1
    • mocha 10.1.0
    • release-it 15.5.0
    • testdouble 3.16.8
    package.json
    sandbox/package.json
    • @testing-library/cypress 8.0.7
    • cypress 10.11.0
    • http-server 14.1.1
    • start-server-and-test 1.14.0
    opened by orm-RenovateBot 0
  • Add

    Add "defaultPlaybackOptions" command

    Is your feature request related to a problem? Please describe.

    In many cases, a developer will need the same playback options on all of the playback commands in a test, and it can lead to errors if the developer forgets to assign those options to a single command.

    Describe the solution you'd like

    A new command, something like cy.defaultPlaybackOptions that takes a playback options object. Since the playback options has a nested object, recording, we'd want to make sure that any recording options are not lost if only a top-level property, like minTimes, is passed in.

    Describe alternatives you've considered

    n/a

    Additional context

    n/a

    enhancement 
    opened by tvsbrent 0
  • Handle multipart form type responses

    Handle multipart form type responses

    Is your feature request related to a problem? Please describe. The behavior for multipart form responses is unknown. It probably won't work.

    Describe the solution you'd like Determine what the current behavior is and support recording/playing back form responses.

    Describe alternatives you've considered n/a

    Additional context A form will have to be added to the Sandbox app to happy path test this.

    enhancement 
    opened by tvsbrent 0
  • Cached responses cause test failures

    Cached responses cause test failures

    Describe the bug

    When the plugin is in record mode, any request that could be cached will return a 304 due to the default browser behavior. If the test is run multiple times in the same session, this will result in errors in subsequent test runs in the same session.

    To Reproduce

    1. Open up the Sandbox app spec in record-only mode.
    2. Make sure "Disable caching" is not selected in the "Network" panel of dev tools.
    3. Run the test once.
    4. It passes.
    5. Run the test again.
    6. It fails.

    Expected behavior Instead of dropping 3xx responses or throwing an error, the plugin should see if there is a response recorded for that request and return that to the browser, even if the plugin is in record only mode.

    Screenshots n/a

    Environment

    • OS: n/a
    • Cypress Version: n/a
    • Browser: n/a
    • Browser Version: n/a

    Additional context n/a

    bug 
    opened by tvsbrent 0
Releases(3.0.1)
Owner
O’Reilly Media, Inc.
O'Reilly spreads the knowledge of innovators through its technology books, online services, magazines, research, and tech conferences.
O’Reilly Media, Inc.
tap-producing test harness for node and browsers

tape tap-producing test harness for node and browsers example var test = require('tape'); test('timing test', function (t) { t.plan(2); t.eq

James Halliday 5.7k Dec 18, 2022
☕️ simple, flexible, fun javascript test framework for node.js & the browser

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️ Links Documentation Release Notes / History / Changes Code of Conduct

Mocha 21.8k Dec 30, 2022
E2E test framework for Angular apps

Protractor Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor is a Node.js program built on top of WebDrive

Angular 8.8k Jan 2, 2023
Node.js test runner that lets you develop with confidence 🚀

AVA is a test runner for Node.js with a concise API, detailed error output, embrace of new language features and process isolation that lets you devel

AVA 20.2k Jan 1, 2023
Politik Test

Politik Test Netlify Live Installation and Setup Instructions Clone down this repository. You will need node and npm installed globally on your machin

Yavuz Selim Şerifoğlu 6 Jun 13, 2021
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

?? Playwright Documentation | API reference Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit w

Microsoft 46.3k Jan 9, 2023
blanket.js is a simple code coverage library for javascript. Designed to be easy to install and use, for both browser and nodejs.

Blanket.js A seamless JavaScript code coverage library. FYI: Please note that this repo is not actively maintained If you're looking for a more active

Alex Seville 1.4k Dec 16, 2022
JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage

JSCover - A JavaScript code coverage measurement tool. JSCover is an easy-to-use JavaScript code coverage measuring tool. It is an enhanced version of

null 392 Nov 20, 2022
Simple JavaScript testing framework for browsers and node.js

A JavaScript Testing Framework Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any Ja

Jasmine 15.5k Jan 2, 2023
A Cypress plugin that generates test scripts from your interactions, a replacement Cypress Studio for Cypress v10 🖱 ⌨

DeploySentinel Cypress Recorder Plugin Create Cypress tests scripts within the Cypress test browser by simply interacting with your application, simil

DeploySentinel 13 Dec 15, 2022
Library agnostic in-process recording of http(s) requests and responses

@gr2m/http-recorder Library agnostic in-process recording of http(s) requests and responses Install npm install @gr2m/http-recorder Usage import http

Gregor Martynus 4 May 12, 2022
Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command

cypress-thenify Rationale Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command. Howev

Mikhail Bolotov 15 Oct 2, 2022
A slash commands bot using guild commands as a custom commands alternative.

hack-n-slash A slash commands bot using guild commands as a custom commands alternative. This service uses slash-create to handle slash commands and r

Junior 2 Dec 5, 2022
Employee Management System is a web application developed using Django(Backend) which manages the record of employees, their salary, attendance. publish public notices, assign works to employees, make requests to employees.

Employee_Management_System Employee Management System is a web application developed using Django(Backend) which manages the record of employees, thei

Preet Nandasana 7 Dec 16, 2022
During work. Second team project created during CodersCamp 2021/2022 by a 6-person team.

BoardMap Status: Work in progress. Work on the project started on 10-01-2021. Our Crew Mentor: Piotr Rynio Agnieszka Przybyłowska Patryk Święcicki Rad

Piotr Rynio 3 Mar 21, 2022
Personal RasPi console for my car for basic diagnostics and media playback.

mycardashpoc Personal RasPi console for my car for basic diagnostics and media playback. Integrates with OBD and MPD and serves a simple dashboard wit

Anders Evenrud 4 Jul 12, 2022
example app that creates a new player in Spotify Connect to play music from in the browse using Spotify Web Playback SDK.

Spotify Web Playback SDK Demo Requirements User must have Spotify Premium, DRM & EME supported and JavaScript enabled Web Browser. License Copyright 2

Sijey 8 Jul 20, 2022
This repository contains a basic example on how to set up and run test automation jobs with CircleCI and report results to Testmo.

CircleCI test automation example This repository contains a basic example on how to set up and run test automation jobs with CircleCI and report resul

Testmo 2 Dec 23, 2021
Supercharge Notion with custom commands to record, draw, and more ✍️

Slashy Supercharge Notion with custom commands to record, draw, and more ✨ Slashy is an open source extension that lets you create custom commands for

Alyssa X 425 Dec 28, 2022