diff --git a/circle.yml b/circle.yml index 6966d8f3b0f..d15a99c006c 100644 --- a/circle.yml +++ b/circle.yml @@ -1256,9 +1256,8 @@ jobs: - test-binary-against-repo: repo: cypress-example-recipes command: npm run test:ci - # https://github.com/cypress-io/cypress-example-recipes/pull/501 - pull_request_id: 501 - folder: examples/unit-testing__lit-element + pull_request_id: 503 + folder: examples/stubbing-spying__window-fetch "test-binary-against-kitchensink": <<: *defaults @@ -1569,11 +1568,11 @@ linux-workflow: &linux-workflow - build-binary - build-npm-package - test-binary-against-recipe-pull-request: - name: Shadow DOM recipe + name: Test fetch polyfill filters: branches: only: - - pull/7469 + - polyfill-fetch requires: - build-binary - build-npm-package diff --git a/cli/schema/cypress.schema.json b/cli/schema/cypress.schema.json index c0906227a57..f68a30ee6c1 100644 --- a/cli/schema/cypress.schema.json +++ b/cli/schema/cypress.schema.json @@ -237,7 +237,12 @@ "experimentalShadowDomSupport": { "type": "boolean", "default": false, - "description": "Enables shadow DOM support. Adds the `cy.shadow()` command and the `includeShadowDom` option to some DOM commands." + "description": "Enables shadow DOM support. Adds the `cy.shadow()` command and the `ignoreShadowBoundaries` option to some DOM commands." + }, + "experimentalFetchPolyfill": { + "type": "boolean", + "default": false, + "description": "Polyfills `window.fetch` to enable Network spying and stubbing" } } } diff --git a/packages/driver/README.md b/packages/driver/README.md index 64a6ee6c5a4..61245b2eeca 100644 --- a/packages/driver/README.md +++ b/packages/driver/README.md @@ -44,6 +44,13 @@ In the browser localStorage.debug = "cypress:driver" ``` +## Patches + +- `sinon` +- `unfetch` to polyfill `fetch`. Added constructor function to point XMLHttpRequest to the application under test window. + +Note: when creating a patch, make sure there is no `package-lock.json` file! Also rename the patch to have ".dev.patch" extension. +