Skip to content

Commit

Permalink
chore: upgrade Cypress to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
haideralsh committed Sep 25, 2023
1 parent 5ab22a3 commit 5602b99
Show file tree
Hide file tree
Showing 25 changed files with 312 additions and 335 deletions.
15 changes: 15 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'cypress'

export default defineConfig({
projectId: 'cr35kv',
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:9999',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
})
5 changes: 0 additions & 5 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ Cypress.Commands.add("isNotInViewport", (element) => {
});
});

Cypress.Commands.add("paste", ({ destinationSelector, pastePayload, pasteType = "text/plain" }) {
Cypress.Commands.add("paste", ({ destinationSelector, pastePayload, pasteType }) => {
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event
cy.get(destinationSelector).then((destination) => {
const pasteEvent = Object.assign(new Event("paste", { bubbles: true, cancelable: true }), {
clipboardData: {
getData: (type = pasteType) => pastePayload,
getData: (type = "text/plain") => pastePayload,
},
});
destination[0].dispatchEvent(pasteEvent);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"babel-preset-react": "6.24.1",
"chromatic": "^6.0.6",
"concurrently": "^5.2.0",
"cypress": "^4.0.0",
"cypress": "^13.2.0",
"cypress-enter-plugin": "^1.0.1",
"cypress-plugin-tab": "^1.0.1",
"enzyme": "3.11.0",
Expand Down
Loading

0 comments on commit 5602b99

Please sign in to comment.