diff --git a/package-lock.json b/package-lock.json index 2307ab5..b91ed29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,20 +13,20 @@ "react-character-map": "^0.4.10" }, "devDependencies": { - "@10up/cypress-wp-utils": "^0.1.0", + "@10up/cypress-wp-utils": "^0.2.0", "@wordpress/env": "^5.3.0", "@wordpress/scripts": "23.3.0", - "cypress": "^13.1.0", + "cypress": "^13.3.1", "cypress-mochawesome-reporter": "^3.4.0", "husky": "^8.0.1", "lint-staged": "^10.0.7" } }, "node_modules/@10up/cypress-wp-utils": { - "version": "0.1.0", - "resolved": "git+ssh://git@github.com/10up/cypress-wp-utils.git#0323741d6cecc8efe2ab5f1c7e2298b4d120a4ff", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@10up/cypress-wp-utils/-/cypress-wp-utils-0.2.0.tgz", + "integrity": "sha512-5gzamtHIFojT+wx0OzSAEeVY6FVrlcVPHVFH23uExkaqQhNsJvrnpdtqtT98wAYkXg56c1qDN7Ju7ZRTaNzP5g==", "dev": true, - "license": "MIT", "engines": { "node": ">=12.0" } @@ -3317,9 +3317,10 @@ "integrity": "sha512-F0oAily9Q9QQpv9JKxKn0zMKfOo36KHCW7myYsmUyf2t0g+sBTbG3UleTPoguHdE1z3GLFr3p7/wiOio52QFjQ==" }, "node_modules/@types/node": { - "version": "18.11.15", - "dev": true, - "license": "MIT" + "version": "18.18.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.5.tgz", + "integrity": "sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==", + "dev": true }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -6916,15 +6917,15 @@ } }, "node_modules/cypress": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.1.0.tgz", - "integrity": "sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.1.tgz", + "integrity": "sha512-g4mJLZxYN+UAF2LMy3Znd4LBnUmS59Vynd81VES59RdW48Yt+QtR2cush3melOoVNz0PPbADpWr8DcUx6mif8Q==", "dev": true, "hasInstallScript": true, "dependencies": { "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^16.18.39", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -7008,12 +7009,6 @@ "node": ">=12" } }, - "node_modules/cypress/node_modules/@types/node": { - "version": "16.18.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.48.tgz", - "integrity": "sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==", - "dev": true - }, "node_modules/cypress/node_modules/commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", @@ -18695,9 +18690,10 @@ }, "dependencies": { "@10up/cypress-wp-utils": { - "version": "git+ssh://git@github.com/10up/cypress-wp-utils.git#0323741d6cecc8efe2ab5f1c7e2298b4d120a4ff", - "dev": true, - "from": "@10up/cypress-wp-utils@^0.1.0" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@10up/cypress-wp-utils/-/cypress-wp-utils-0.2.0.tgz", + "integrity": "sha512-5gzamtHIFojT+wx0OzSAEeVY6FVrlcVPHVFH23uExkaqQhNsJvrnpdtqtT98wAYkXg56c1qDN7Ju7ZRTaNzP5g==", + "dev": true }, "@ampproject/remapping": { "version": "2.2.0", @@ -20813,7 +20809,9 @@ "integrity": "sha512-F0oAily9Q9QQpv9JKxKn0zMKfOo36KHCW7myYsmUyf2t0g+sBTbG3UleTPoguHdE1z3GLFr3p7/wiOio52QFjQ==" }, "@types/node": { - "version": "18.11.15", + "version": "18.18.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.5.tgz", + "integrity": "sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==", "dev": true }, "@types/normalize-package-data": { @@ -23233,14 +23231,14 @@ } }, "cypress": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.1.0.tgz", - "integrity": "sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.1.tgz", + "integrity": "sha512-g4mJLZxYN+UAF2LMy3Znd4LBnUmS59Vynd81VES59RdW48Yt+QtR2cush3melOoVNz0PPbADpWr8DcUx6mif8Q==", "dev": true, "requires": { "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^16.18.39", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -23283,12 +23281,6 @@ "yauzl": "^2.10.0" }, "dependencies": { - "@types/node": { - "version": "16.18.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.48.tgz", - "integrity": "sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==", - "dev": true - }, "commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", diff --git a/package.json b/package.json index 9690bcf..f498a3f 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,10 @@ "cypress:run": "cypress run --config-file tests/cypress/config.js" }, "devDependencies": { - "@10up/cypress-wp-utils": "^0.1.0", + "@10up/cypress-wp-utils": "^0.2.0", "@wordpress/env": "^5.3.0", "@wordpress/scripts": "23.3.0", - "cypress": "^13.1.0", + "cypress": "^13.3.1", "cypress-mochawesome-reporter": "^3.4.0", "husky": "^8.0.1", "lint-staged": "^10.0.7" diff --git a/tests/cypress/config.js b/tests/cypress/config.js index 4bf0467..c5e1816 100644 --- a/tests/cypress/config.js +++ b/tests/cypress/config.js @@ -2,6 +2,7 @@ const { defineConfig } = require('cypress'); const { readConfig } = require('@wordpress/env/lib/config'); module.exports = defineConfig({ + chromeWebSecurity: false, fixturesFolder: 'tests/cypress/fixtures', screenshotsFolder: 'tests/cypress/screenshots', videosFolder: 'tests/cypress/videos', diff --git a/tests/cypress/e2e/insert-character-in-post.test.js b/tests/cypress/e2e/insert-character-in-post.test.js index 6577400..b97d46f 100644 --- a/tests/cypress/e2e/insert-character-in-post.test.js +++ b/tests/cypress/e2e/insert-character-in-post.test.js @@ -21,7 +21,7 @@ describe( 'Insert character in post', () => { cy.window().then( ( win ) => { const { wp } = win; - const paraBlock = wp.blocks.createBlock( + const paraBlock = wp.blocks.createBlock( 'core/paragraph', { content: 'Hello world'