From 2e129ebfd63204c68eab26913f433456fec6ef33 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Mon, 31 Jul 2023 16:28:30 -0300 Subject: [PATCH 01/20] Wait until the comments are indexed --- .../integration/features/comments.cy.js | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index 780ba506fe..f005f89a21 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -273,29 +273,49 @@ describe('Comments Feature', { tags: '@slow' }, () => { cy.visit('/'); cy.contains('#main .entry-title a', 'Test Comment').first().click(); cy.get('#comment').type('This is a anonymous comment'); - cy.get('#submit').click(); - - // start sync and test results. - cy.wpCli('wp elasticpress index') - .its('stdout') - .should('contain', `Number of comments indexed: ${defaultApprovedComments}`); + cy.get('#submit') + .click() + .then(() => { + cy.wpCli('wp elasticpress sync') + .its('stdout') + .should('contain', `Number of comments indexed: ${defaultApprovedComments}`); + }); // approve the comment cy.visitAdminPage('edit-comments.php?comment_status=moderated'); - cy.get('.approve a').first().click({ force: true }); - - // Check the number of comments. - cy.wpCli('wp elasticpress stats') - .its('stdout') - .should('contain', `Documents: ${defaultApprovedComments + 1}`); + cy.get('.approve a') + .first() + .click({ force: true }) + .then(() => { + /** + * Give Elasticsearch some time to process the post. + * + */ + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); + + cy.wpCli('wp elasticpress stats') + .its('stdout') + .should('contain', `Documents: ${defaultApprovedComments + 1}`); + }); // trash the comment cy.visitAdminPage('edit-comments.php?comment_status=approved'); - cy.get('.column-comment .trash a').first().click({ force: true }); - - cy.wpCli('wp elasticpress stats') - .its('stdout') - .should('contain', `Documents: ${defaultApprovedComments}`); + cy.get('.column-comment .trash a') + .first() + .click({ force: true }) + .then(() => { + /** + * Give Elasticsearch some time to process the post. + * + */ + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); + + cy.wpCli('wp elasticpress stats') + .its('stdout') + .should('contain', `Documents: ${defaultApprovedComments}`); + }); }); it('Can sync woocommerce reviews', () => { From f975fb2b2a42e577aea205975ffb58ba0eafa60d Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Mon, 31 Jul 2023 16:53:38 -0300 Subject: [PATCH 02/20] Remove unnecessary call to WP_CLI::runcommand --- tests/cypress/support/global-hooks.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/cypress/support/global-hooks.js b/tests/cypress/support/global-hooks.js index 537c5d57a6..803b865c54 100644 --- a/tests/cypress/support/global-hooks.js +++ b/tests/cypress/support/global-hooks.js @@ -23,9 +23,8 @@ before(() => { update_option( 'ep_feature_settings', $features ); - $index_names = WP_CLI::runcommand('elasticpress get-indices', [ 'return' => true ] ); - - echo wp_json_encode( [ 'indexNames' => json_decode( $index_names ), 'isEpIo' => $is_epio ] ); + $index_names = \\ElasticPress\\Elasticsearch::factory()->get_index_names( true ); + echo wp_json_encode( [ 'indexNames' => $index_names, 'isEpIo' => $is_epio ] ); `, ).then((wpCliResponse) => { const wpCliRespObj = JSON.parse(wpCliResponse.stdout); From 198be387c7a02075c67cff61ac2f508d50096d52 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Mon, 31 Jul 2023 16:54:45 -0300 Subject: [PATCH 03/20] Merge wp-cli calls + wait until the setup is done --- .../cypress/integration/features/facets.cy.js | 95 +++++++++++-------- 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/tests/cypress/integration/features/facets.cy.js b/tests/cypress/integration/features/facets.cy.js index 24f3cba151..6b04dfa8c6 100644 --- a/tests/cypress/integration/features/facets.cy.js +++ b/tests/cypress/integration/features/facets.cy.js @@ -5,15 +5,20 @@ describe('Facets Feature', { tags: '@slow' }, () => { * before running tests. */ before(() => { - cy.maybeEnableFeature('facets'); - cy.wpCli('elasticpress sync --setup --yes'); - cy.wpCli('post list --s="A new" --ep_integrate=false --format=ids').then( - (wpCliResponse) => { - if (wpCliResponse.stdout) { - cy.wpCli(`post delete ${wpCliResponse.stdout} --force`); - } - }, - ); + cy.wpCliEval(` + \\ElasticPress\\Features::factory()->activate_feature('facets' ); + WP_CLI::runcommand( 'elasticpress sync --setup --yes' ); + $posts = new \\WP_Query( + [ + 's' => 'A new', + 'ep_integrate' => false, + 'fields' => 'ids', + ] + ); + foreach ( $posts->posts as $post ) { + wp_delete_post( $post, true ); + } + `); }); /** @@ -257,12 +262,21 @@ describe('Facets Feature', { tags: '@slow' }, () => { it('Does not change post types being displayed', () => { cy.wpCliEval( ` - WP_CLI::runcommand( 'plugin activate cpt-and-custom-tax' ); - WP_CLI::runcommand( 'post create --post_title="A new page" --post_type="page" --post_status="publish"' ); - WP_CLI::runcommand( 'post create --post_title="A new post" --post_type="post" --post_status="publish"' ); - WP_CLI::runcommand( 'post create --post_title="A new post" --post_type="post" --post_status="publish"' ); - - // tax_input does not seem to work properly in WP-CLI. + activate_plugin( 'cpt-and-custom-tax.php' ); + wp_insert_post( + [ + 'post_title' => 'A new page', + 'post_type' => 'page', + 'post_status' => 'publish', + ] + ); + wp_insert_post( + [ + 'post_title' => 'A new post', + 'post_type' => 'post', + 'post_status' => 'publish', + ] + ); $movie_id = wp_insert_post( [ 'post_title' => 'A new movie', @@ -273,35 +287,34 @@ describe('Facets Feature', { tags: '@slow' }, () => { if ( $movie_id ) { wp_set_object_terms( $movie_id, 'action', 'genre' ); WP_CLI::runcommand( 'elasticpress sync --include=' . $movie_id ); - WP_CLI::runcommand( 'rewrite flush' ); } `, - ); - - /** - * Give Elasticsearch some time to process the post. - * - */ - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); + ).then(() => { + /** + * Give Elasticsearch some time to process the post. + * + */ + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(2000); - // Blog page - cy.visit('/'); - cy.contains('.site-content article h2', 'A new page').should('not.exist'); - cy.contains('.site-content article h2', 'A new post').should('exist'); - cy.contains('.site-content article h2', 'A new movie').should('not.exist'); - - // Specific taxonomy archive - cy.visit('/blog/genre/action/'); - cy.contains('.site-content article h2', 'A new page').should('not.exist'); - cy.contains('.site-content article h2', 'A new post').should('not.exist'); - cy.contains('.site-content article h2', 'A new movie').should('exist'); - - // Search - cy.visit('/?s=new'); - cy.contains('.site-content article h2', 'A new page').should('exist'); - cy.contains('.site-content article h2', 'A new post').should('exist'); - cy.contains('.site-content article h2', 'A new movie').should('exist'); + // Blog page + cy.visit('/'); + cy.contains('.site-content article h2', 'A new page').should('not.exist'); + cy.contains('.site-content article h2', 'A new post').should('exist'); + cy.contains('.site-content article h2', 'A new movie').should('not.exist'); + + // Specific taxonomy archive + cy.visit('/?genre=action'); + cy.contains('.site-content article h2', 'A new page').should('not.exist'); + cy.contains('.site-content article h2', 'A new post').should('not.exist'); + cy.contains('.site-content article h2', 'A new movie').should('exist'); + + // Search + cy.visit('/?s=new'); + cy.contains('.site-content article h2', 'A new page').should('exist'); + cy.contains('.site-content article h2', 'A new post').should('exist'); + cy.contains('.site-content article h2', 'A new movie').should('exist'); + }); }); describe('Facet by Meta Block', () => { From 7084587f20b318d7cd5d8179cf43fc7cc45c79a3 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 1 Aug 2023 10:31:04 -0300 Subject: [PATCH 04/20] Fix get_index_names call --- tests/cypress/support/global-hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/support/global-hooks.js b/tests/cypress/support/global-hooks.js index 803b865c54..29ba0830a8 100644 --- a/tests/cypress/support/global-hooks.js +++ b/tests/cypress/support/global-hooks.js @@ -23,7 +23,7 @@ before(() => { update_option( 'ep_feature_settings', $features ); - $index_names = \\ElasticPress\\Elasticsearch::factory()->get_index_names( true ); + $index_names = \\ElasticPress\\Elasticsearch::factory()->get_index_names( 'active' ); echo wp_json_encode( [ 'indexNames' => $index_names, 'isEpIo' => $is_epio ] ); `, ).then((wpCliResponse) => { From 2378165aeb2a795f56e86926aa0a947fcaee2c68 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 1 Aug 2023 10:55:26 -0300 Subject: [PATCH 05/20] Try to assign a term during the movie creation --- tests/cypress/integration/features/facets.cy.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/cypress/integration/features/facets.cy.js b/tests/cypress/integration/features/facets.cy.js index 6b04dfa8c6..8acea716d1 100644 --- a/tests/cypress/integration/features/facets.cy.js +++ b/tests/cypress/integration/features/facets.cy.js @@ -282,12 +282,11 @@ describe('Facets Feature', { tags: '@slow' }, () => { 'post_title' => 'A new movie', 'post_type' => 'movie', 'post_status' => 'publish', + 'tax_input' => [ + 'genre' => 'action', + ], ] ); - if ( $movie_id ) { - wp_set_object_terms( $movie_id, 'action', 'genre' ); - WP_CLI::runcommand( 'elasticpress sync --include=' . $movie_id ); - } `, ).then(() => { /** @@ -304,7 +303,7 @@ describe('Facets Feature', { tags: '@slow' }, () => { cy.contains('.site-content article h2', 'A new movie').should('not.exist'); // Specific taxonomy archive - cy.visit('/?genre=action'); + cy.visit('//blog/genre/action/'); cy.contains('.site-content article h2', 'A new page').should('not.exist'); cy.contains('.site-content article h2', 'A new post').should('not.exist'); cy.contains('.site-content article h2', 'A new movie').should('exist'); From ce7906b0e7fe38e16dcaa92fd06e2e306f0e69f5 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 1 Aug 2023 11:42:37 -0300 Subject: [PATCH 06/20] Fix url --- tests/cypress/integration/features/facets.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/features/facets.cy.js b/tests/cypress/integration/features/facets.cy.js index 8acea716d1..a80394b710 100644 --- a/tests/cypress/integration/features/facets.cy.js +++ b/tests/cypress/integration/features/facets.cy.js @@ -303,7 +303,7 @@ describe('Facets Feature', { tags: '@slow' }, () => { cy.contains('.site-content article h2', 'A new movie').should('not.exist'); // Specific taxonomy archive - cy.visit('//blog/genre/action/'); + cy.visit('/blog/genre/action/'); cy.contains('.site-content article h2', 'A new page').should('not.exist'); cy.contains('.site-content article h2', 'A new post').should('not.exist'); cy.contains('.site-content article h2', 'A new movie').should('exist'); From cf792264982b007bdbf42ce372283e463db445b3 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 1 Aug 2023 11:48:58 -0300 Subject: [PATCH 07/20] Checks it without retrying --- tests/cypress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/config.js b/tests/cypress/config.js index 51bc5a1178..8b05d1da5a 100644 --- a/tests/cypress/config.js +++ b/tests/cypress/config.js @@ -7,7 +7,7 @@ module.exports = defineConfig({ downloadsFolder: 'tests/cypress/downloads', video: false, retries: { - runMode: 1, + runMode: 0, }, elasticPressIndexTimeout: 100000, e2e: { From 92781d31fffd0790cd07f732569526c146841479 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 1 Aug 2023 12:01:25 -0300 Subject: [PATCH 08/20] set the runMode back to 1 --- tests/cypress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/config.js b/tests/cypress/config.js index 8b05d1da5a..51bc5a1178 100644 --- a/tests/cypress/config.js +++ b/tests/cypress/config.js @@ -7,7 +7,7 @@ module.exports = defineConfig({ downloadsFolder: 'tests/cypress/downloads', video: false, retries: { - runMode: 0, + runMode: 1, }, elasticPressIndexTimeout: 100000, e2e: { From 27e2ca26f83bddfeefc9db992bc3243a6d58cd5b Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 2 Aug 2023 16:35:53 -0300 Subject: [PATCH 09/20] Assign the term separately --- tests/cypress/integration/features/facets.cy.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/cypress/integration/features/facets.cy.js b/tests/cypress/integration/features/facets.cy.js index a80394b710..df9f30d170 100644 --- a/tests/cypress/integration/features/facets.cy.js +++ b/tests/cypress/integration/features/facets.cy.js @@ -277,16 +277,15 @@ describe('Facets Feature', { tags: '@slow' }, () => { 'post_status' => 'publish', ] ); + $movie_id = wp_insert_post( [ 'post_title' => 'A new movie', 'post_type' => 'movie', 'post_status' => 'publish', - 'tax_input' => [ - 'genre' => 'action', - ], ] ); + wp_set_object_terms( $movie_id, 'action', 'genre' ); `, ).then(() => { /** From e8e390b9c6abdd88e3befacc308b814892fa4f2b Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 3 Oct 2023 16:32:17 -0300 Subject: [PATCH 10/20] Flush rewrite rules during plugin activation --- .../test-plugins/cpt-and-custom-tax.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php b/tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php index 1efcbac578..9b029f42e4 100644 --- a/tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php +++ b/tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php @@ -75,3 +75,13 @@ function create_taxonomy() { register_taxonomy( 'genre', [ 'movie' ], $args ); } add_action( 'init', __NAMESPACE__ . '\\create_taxonomy' ); + +/** + * Flush rewrite rules after registering the CPT and taxonomy + */ +function rewrite_flush() { + create_post_type(); + create_taxonomy(); + flush_rewrite_rules(); +} +register_activation_hook( __FILE__, __NAMESPACE__ . '\\rewrite_flush' ); From cba2b143be802c1e46a23a5e6c6c411e2f035818 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 4 Oct 2023 13:13:01 -0300 Subject: [PATCH 11/20] Bump wait time --- tests/cypress/integration/features/comments.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index 6f98955159..7d639f9cce 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -325,7 +325,7 @@ describe('Comments Feature', { tags: '@slow' }, () => { * */ // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); + cy.wait(3000); cy.wpCli('wp elasticpress stats') .its('stdout') From 2bed5ce12c4af90fea885c26cf8cff2ad51de4ea Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 4 Oct 2023 14:28:56 -0300 Subject: [PATCH 12/20] Update Cypress --- package-lock.json | 284 ++++++++++++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 189 insertions(+), 97 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c0b2bf7e1..5767e070b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@wordpress/env": "^5.0.0", "10up-toolkit": "^4.3.1", "classnames": "^2.3.1", - "cypress": "^12.9.0", + "cypress": "^13.3.0", "cypress-file-upload": "^5.0.8", "eslint-plugin-cypress": "^2.12.1", "husky": "^8.0.3", @@ -116,12 +116,12 @@ } }, "node_modules/@4tw/cypress-drag-drop": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@4tw/cypress-drag-drop/-/cypress-drag-drop-2.2.3.tgz", - "integrity": "sha512-ADMNoELeQdcGLPjfTJ5jWupBKU3rmQAnTqaRhuEa3hQGZ6suR49Ya5SReUrwvJnfAR4pgMcnSkqLqi1F4EPuwA==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@4tw/cypress-drag-drop/-/cypress-drag-drop-2.2.5.tgz", + "integrity": "sha512-3ghTmzhOmUqeN6U3QmUnKRUxI7OMLbJA4hHUY/eS/FhWJgxbiGgcaELbolWnBAOpajPXcsNQGYEj9brd59WH6A==", "dev": true, "peerDependencies": { - "cypress": "^2.1.0 || ^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" + "cypress": "2 - 13" } }, "node_modules/@ampproject/remapping": { @@ -2313,9 +2313,9 @@ } }, "node_modules/@cypress/request": { - "version": "2.88.12", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", - "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "dependencies": { "aws-sign2": "~0.7.0", @@ -2331,7 +2331,7 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.10.3", + "qs": "6.10.4", "safe-buffer": "^5.1.2", "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", @@ -3900,9 +3900,10 @@ "peer": true }, "node_modules/@types/node": { - "version": "17.0.21", - "dev": true, - "license": "MIT" + "version": "18.18.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", + "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", + "dev": true }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -5404,16 +5405,18 @@ }, "node_modules/asn1": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } }, "node_modules/assert-plus": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8" } @@ -5485,16 +5488,18 @@ }, "node_modules/aws-sign2": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.11.0", - "dev": true, - "license": "MIT" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true }, "node_modules/axe-core": { "version": "4.6.1", @@ -5782,8 +5787,9 @@ }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } @@ -6189,8 +6195,9 @@ }, "node_modules/caseless": { "version": "0.12.0", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true }, "node_modules/catharsis": { "version": "0.9.0", @@ -6576,9 +6583,10 @@ } }, "node_modules/commander": { - "version": "5.1.0", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } @@ -7318,15 +7326,15 @@ "license": "MIT" }, "node_modules/cypress": { - "version": "12.9.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.9.0.tgz", - "integrity": "sha512-Ofe09LbHKgSqX89Iy1xen2WvpgbvNxDzsWx3mgU1mfILouELeXYGwIib3ItCwoRrRifoQwcBFmY54Vs0zw7QCg==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.0.tgz", + "integrity": "sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -7338,7 +7346,7 @@ "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", "debug": "^4.3.4", @@ -7356,12 +7364,13 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -7371,7 +7380,7 @@ "cypress": "bin/cypress" }, "engines": { - "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, "node_modules/cypress-file-upload": { @@ -7385,11 +7394,6 @@ "cypress": ">3.0.0" } }, - "node_modules/cypress/node_modules/@types/node": { - "version": "14.18.12", - "dev": true, - "license": "MIT" - }, "node_modules/cypress/node_modules/ansi-styles": { "version": "4.3.0", "dev": true, @@ -7469,9 +7473,10 @@ } }, "node_modules/cypress/node_modules/semver": { - "version": "7.3.5", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -7504,8 +7509,9 @@ }, "node_modules/dashdash": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -7973,8 +7979,9 @@ }, "node_modules/ecc-jsbn": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, - "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -9247,8 +9254,9 @@ }, "node_modules/extend": { "version": "3.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "node_modules/external-editor": { "version": "3.1.0", @@ -9303,11 +9311,12 @@ }, "node_modules/extsprintf": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" - ], - "license": "MIT" + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -9611,16 +9620,18 @@ }, "node_modules/forever-agent": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -9825,8 +9836,9 @@ }, "node_modules/getpass": { "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -10377,8 +10389,9 @@ }, "node_modules/http-signature": { "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -11154,8 +11167,9 @@ }, "node_modules/isstream": { "version": "0.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", @@ -12967,8 +12981,9 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true }, "node_modules/jsdoc": { "version": "3.6.10", @@ -13118,8 +13133,9 @@ }, "node_modules/json-schema": { "version": "0.4.0", - "dev": true, - "license": "(AFL-2.1 OR BSD-3-Clause)" + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -13134,8 +13150,9 @@ }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/json2php": { "version": "0.0.4", @@ -13168,11 +13185,12 @@ }, "node_modules/jsprim": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "engines": [ "node >=0.6.0" ], - "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -14441,10 +14459,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimist-options": { "version": "4.1.0", @@ -15263,8 +15284,9 @@ }, "node_modules/performance-now": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true }, "node_modules/picocolors": { "version": "1.0.0", @@ -16737,6 +16759,15 @@ "node": ">=4" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "dev": true, @@ -18218,8 +18249,9 @@ }, "node_modules/sshpk": { "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, - "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -19332,8 +19364,9 @@ }, "node_modules/tweetnacl": { "version": "0.14.5", - "dev": true, - "license": "Unlicense" + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -19663,11 +19696,12 @@ }, "node_modules/verror": { "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" ], - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -19676,8 +19710,9 @@ }, "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true }, "node_modules/w3c-hr-time": { "version": "1.0.2", @@ -20517,9 +20552,9 @@ } }, "@4tw/cypress-drag-drop": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@4tw/cypress-drag-drop/-/cypress-drag-drop-2.2.3.tgz", - "integrity": "sha512-ADMNoELeQdcGLPjfTJ5jWupBKU3rmQAnTqaRhuEa3hQGZ6suR49Ya5SReUrwvJnfAR4pgMcnSkqLqi1F4EPuwA==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@4tw/cypress-drag-drop/-/cypress-drag-drop-2.2.5.tgz", + "integrity": "sha512-3ghTmzhOmUqeN6U3QmUnKRUxI7OMLbJA4hHUY/eS/FhWJgxbiGgcaELbolWnBAOpajPXcsNQGYEj9brd59WH6A==", "dev": true, "requires": {} }, @@ -21982,9 +22017,9 @@ } }, "@cypress/request": { - "version": "2.88.12", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz", - "integrity": "sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -22000,7 +22035,7 @@ "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", - "qs": "~6.10.3", + "qs": "6.10.4", "safe-buffer": "^5.1.2", "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", @@ -23160,7 +23195,9 @@ "peer": true }, "@types/node": { - "version": "17.0.21", + "version": "18.18.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", + "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", "dev": true }, "@types/normalize-package-data": { @@ -24219,6 +24256,8 @@ }, "asn1": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -24226,6 +24265,8 @@ }, "assert-plus": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true }, "ast-types-flow": { @@ -24266,10 +24307,14 @@ }, "aws-sign2": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true }, "aws4": { - "version": "1.11.0", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "axe-core": { @@ -24478,6 +24523,8 @@ }, "bcrypt-pbkdf": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "requires": { "tweetnacl": "^0.14.3" @@ -24774,6 +24821,8 @@ }, "caseless": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, "catharsis": { @@ -25063,7 +25112,9 @@ } }, "commander": { - "version": "5.1.0", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, "comment-parser": { @@ -25591,14 +25642,14 @@ "version": "3.0.11" }, "cypress": { - "version": "12.9.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.9.0.tgz", - "integrity": "sha512-Ofe09LbHKgSqX89Iy1xen2WvpgbvNxDzsWx3mgU1mfILouELeXYGwIib3ItCwoRrRifoQwcBFmY54Vs0zw7QCg==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.3.0.tgz", + "integrity": "sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", + "@types/node": "^18.17.5", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", @@ -25610,7 +25661,7 @@ "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", "debug": "^4.3.4", @@ -25628,22 +25679,19 @@ "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", "yauzl": "^2.10.0" }, "dependencies": { - "@types/node": { - "version": "14.18.12", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "dev": true, @@ -25690,7 +25738,9 @@ "dev": true }, "semver": { - "version": "7.3.5", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -25718,6 +25768,8 @@ }, "dashdash": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -26058,6 +26110,8 @@ }, "ecc-jsbn": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "requires": { "jsbn": "~0.1.0", @@ -26956,6 +27010,8 @@ }, "extend": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "external-editor": { @@ -27001,6 +27057,8 @@ }, "extsprintf": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, "fast-deep-equal": { @@ -27230,10 +27288,14 @@ }, "forever-agent": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true }, "form-data": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -27374,6 +27436,8 @@ }, "getpass": { "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -27786,6 +27850,8 @@ }, "http-signature": { "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -28270,6 +28336,8 @@ }, "isstream": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, "istanbul-lib-coverage": { @@ -29598,6 +29666,8 @@ }, "jsbn": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "jsdoc": { @@ -29711,6 +29781,8 @@ }, "json-schema": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { @@ -29724,6 +29796,8 @@ }, "json-stringify-safe": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "json2php": { @@ -29748,6 +29822,8 @@ }, "jsprim": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -30615,9 +30691,9 @@ } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "minimist-options": { @@ -31203,6 +31279,8 @@ }, "performance-now": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "picocolors": { @@ -32077,6 +32155,12 @@ "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true + }, "process-nextick-args": { "version": "2.0.1", "dev": true @@ -33185,6 +33269,8 @@ }, "sshpk": { "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -34015,6 +34101,8 @@ }, "tweetnacl": { "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "type-check": { @@ -34243,6 +34331,8 @@ }, "verror": { "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -34252,6 +34342,8 @@ "dependencies": { "core-util-is": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true } } diff --git a/package.json b/package.json index 96ae7faf5c..0bd319e30c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@wordpress/env": "^5.0.0", "10up-toolkit": "^4.3.1", "classnames": "^2.3.1", - "cypress": "^12.9.0", + "cypress": "^13.3.0", "cypress-file-upload": "^5.0.8", "eslint-plugin-cypress": "^2.12.1", "husky": "^8.0.3", From ac11781ac029d34566b6204c110a250d13af6182 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 4 Oct 2023 15:34:07 -0300 Subject: [PATCH 13/20] Rearrange lines a bit --- tests/cypress/integration/features/facets.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/features/facets.cy.js b/tests/cypress/integration/features/facets.cy.js index dcceb9f7c5..c304f9e5ca 100644 --- a/tests/cypress/integration/features/facets.cy.js +++ b/tests/cypress/integration/features/facets.cy.js @@ -64,12 +64,12 @@ describe('Facets Feature', { tags: '@slow' }, () => { */ cy.get('@secondBlock').click(); cy.get('.block-editor-block-inspector select').first().select('post_tag'); + cy.intercept('/wp-json/wp/v2/block-renderer/elasticpress/facet*').as('blockPreview'); cy.get('.block-editor-block-inspector select').last().select('name/asc'); /** * Make sure it waits for the correct request. */ - cy.intercept('/wp-json/wp/v2/block-renderer/elasticpress/facet*').as('blockPreview'); cy.wait('@blockPreview'); /** From 31cc5213d15a51f57cb49c6a7426d03f749ec0ae Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 08:39:39 -0300 Subject: [PATCH 14/20] Skip WP.org translations lookup and reorder plugin activation --- .wp-env.json | 1 + .../integration/features/comments.cy.js | 2 +- .../test-mu-plugins/skip-wp-lookup.php | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php diff --git a/.wp-env.json b/.wp-env.json index bb608f9cdb..0358a0d725 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -18,6 +18,7 @@ "10up/elasticpress-proxy#develop" ], "mappings": { + "wp-content/mu-plugins/skip-wp-lookup.php": "./tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php", "wp-content/mu-plugins/unique-index-name.php": "./tests/cypress/wordpress-files/test-mu-plugins/unique-index-name.php", "wp-content/mu-plugins/disable-welcome-guide.php": "./tests/cypress/wordpress-files/test-mu-plugins/disable-welcome-guide.php", "wp-content/plugins/cpt-and-custom-tax.php": "./tests/cypress/wordpress-files/test-plugins/cpt-and-custom-tax.php", diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index 31dcc00a08..91147fe64a 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -12,8 +12,8 @@ describe('Comments Feature', { tags: '@slow' }, () => { cy.get('#comment_moderation').check(); cy.get('#comment_previously_approved').check(); cy.get('#submit').click(); - cy.maybeEnableFeature('comments'); cy.activatePlugin('show-comments-and-terms', 'wpCli'); + cy.maybeEnableFeature('comments'); }); /** diff --git a/tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php b/tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php new file mode 100644 index 0000000000..c8a9a8375b --- /dev/null +++ b/tests/cypress/wordpress-files/test-mu-plugins/skip-wp-lookup.php @@ -0,0 +1,25 @@ + [], + ]; +} + +add_filter( 'translations_api', __NAMESPACE__ . '\skip_translations_api' ); From 1ada4304c9d152d710414d754fc71e32ac76464b Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 08:50:12 -0300 Subject: [PATCH 15/20] Always refresh before getting stats --- includes/classes/Command.php | 1 + .../integration/features/comments.cy.js | 26 +++---------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/includes/classes/Command.php b/includes/classes/Command.php index 192be7b6a6..92cc4a9e69 100644 --- a/includes/classes/Command.php +++ b/includes/classes/Command.php @@ -936,6 +936,7 @@ public function stats() { $index_names_imploded = implode( ',', $index_names ); + Elasticsearch::factory()->refresh_indices(); $request = wp_remote_get( trailingslashit( Utils\get_host( true ) ) . $index_names_imploded . '/_stats/', $request_args ); if ( is_wp_error( $request ) ) { diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index 91147fe64a..c325601eff 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -306,13 +306,6 @@ describe('Comments Feature', { tags: '@slow' }, () => { .first() .click({ force: true }) .then(() => { - /** - * Give Elasticsearch some time to process the post. - * - */ - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); - cy.wpCli('wp elasticpress stats') .its('stdout') .should('contain', `Documents: ${defaultApprovedComments + 1}`); @@ -324,13 +317,6 @@ describe('Comments Feature', { tags: '@slow' }, () => { .first() .click({ force: true }) .then(() => { - /** - * Give Elasticsearch some time to process the post. - * - */ - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(3000); - cy.wpCli('wp elasticpress stats') .its('stdout') .should('contain', `Documents: ${defaultApprovedComments}`); @@ -400,15 +386,9 @@ describe('Comments Feature', { tags: '@slow' }, () => { cy.get('#comment').type('This is a anonymous comment'); cy.get('#submit').click(); - cy.wpCliEval( - ` - $comments_index = \\ElasticPress\\Indexables::factory()->get( "comment" )->get_index_name(); - WP_CLI::runcommand("elasticpress request {$comments_index}/_refresh --method=POST");`, - ).then(() => { - cy.wpCli('wp elasticpress stats') - .its('stdout') - .should('contain', `Documents: ${defaultApprovedComments + 1}`); - }); + cy.wpCli('wp elasticpress stats') + .its('stdout') + .should('contain', `Documents: ${defaultApprovedComments + 1}`); // trash the comment cy.visitAdminPage('edit-comments.php?comment_status=approved'); From f45c2998f5b7108ec5076440d7a19d5311ec6017 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 13:04:38 -0300 Subject: [PATCH 16/20] Make sure billing email is filled in --- tests/cypress/integration/features/woocommerce.cy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cypress/integration/features/woocommerce.cy.js b/tests/cypress/integration/features/woocommerce.cy.js index 043a6a8c46..83d59b0503 100644 --- a/tests/cypress/integration/features/woocommerce.cy.js +++ b/tests/cypress/integration/features/woocommerce.cy.js @@ -166,6 +166,7 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => { cy.get('#billing_city').type(userData.city); cy.get('#billing_postcode').type(userData.postCode); cy.get('#billing_phone').type(userData.phoneNumber); + cy.get('#billing_email').clearThenType(userData.email); cy.get('#place_order').click(); // ensure order is placed. From 40425704d0a6db47f4f8a01957076bd37162efbb Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 13:17:57 -0300 Subject: [PATCH 17/20] Drag to the top --- tests/cypress/integration/features/woocommerce.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/features/woocommerce.cy.js b/tests/cypress/integration/features/woocommerce.cy.js index 83d59b0503..e657c3a89c 100644 --- a/tests/cypress/integration/features/woocommerce.cy.js +++ b/tests/cypress/integration/features/woocommerce.cy.js @@ -291,7 +291,7 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => { }); cy.get('@thirdProduct') - .drag('#the-list tr:eq(0)', { force: true }) + .drag('#the-list tr:eq(0)', { target: { position: 'top' }, force: true }) .then(() => { cy.get('#the-list tr:eq(0)').should('have.id', thirdProductId); From bb200f26272d8f75592c1afaa803f525e32dc575 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 16:31:00 -0300 Subject: [PATCH 18/20] Wait for the ajax request in the second time too --- tests/cypress/integration/features/woocommerce.cy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cypress/integration/features/woocommerce.cy.js b/tests/cypress/integration/features/woocommerce.cy.js index e657c3a89c..cd9e2c1f01 100644 --- a/tests/cypress/integration/features/woocommerce.cy.js +++ b/tests/cypress/integration/features/woocommerce.cy.js @@ -290,9 +290,11 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => { thirdProductId = id; }); + cy.intercept('POST', '/wp-admin/admin-ajax.php*').as('ajaxRequest'); cy.get('@thirdProduct') .drag('#the-list tr:eq(0)', { target: { position: 'top' }, force: true }) .then(() => { + cy.wait('@ajaxRequest').its('response.statusCode').should('eq', 200); cy.get('#the-list tr:eq(0)').should('have.id', thirdProductId); cy.refreshIndex('post').then(() => { From 7b752c12b6f3f3208e3efd3ca2668529cb56d079 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 17:10:18 -0300 Subject: [PATCH 19/20] Wait for ajax requests --- tests/cypress/integration/features/comments.cy.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index c325601eff..4744232417 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -302,10 +302,12 @@ describe('Comments Feature', { tags: '@slow' }, () => { // approve the comment cy.visitAdminPage('edit-comments.php?comment_status=moderated'); + cy.intercept('POST', '/wp-admin/admin-ajax.php*').as('ajaxRequest'); cy.get('.approve a') .first() .click({ force: true }) .then(() => { + cy.wait('@ajaxRequest').its('response.statusCode').should('eq', 200); cy.wpCli('wp elasticpress stats') .its('stdout') .should('contain', `Documents: ${defaultApprovedComments + 1}`); @@ -313,10 +315,12 @@ describe('Comments Feature', { tags: '@slow' }, () => { // trash the comment cy.visitAdminPage('edit-comments.php?comment_status=approved'); + cy.intercept('POST', '/wp-admin/admin-ajax.php*').as('ajaxRequest'); cy.get('.column-comment .trash a') .first() .click({ force: true }) .then(() => { + cy.wait('@ajaxRequest').its('response.statusCode').should('eq', 200); cy.wpCli('wp elasticpress stats') .its('stdout') .should('contain', `Documents: ${defaultApprovedComments}`); From 991b6fcabce35700756b88727a46e542fed16d18 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 18 Oct 2023 20:18:30 -0300 Subject: [PATCH 20/20] Try repeating the timeout --- tests/cypress/integration/features/comments.cy.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/cypress/integration/features/comments.cy.js b/tests/cypress/integration/features/comments.cy.js index 4744232417..7d103a72b5 100644 --- a/tests/cypress/integration/features/comments.cy.js +++ b/tests/cypress/integration/features/comments.cy.js @@ -262,10 +262,16 @@ describe('Comments Feature', { tags: '@slow' }, () => { cy.get('.ep-sync-messages', { timeout: Cypress.config('elasticPressIndexTimeout') }).as( 'syncMessages', ); - cy.get('@syncMessages').should('contain.text', 'Mapping sent'); - cy.get('@syncMessages').should('contain.text', 'Sync complete'); + cy.get('@syncMessages', { timeout: Cypress.config('elasticPressIndexTimeout') }).should( + 'contain.text', + 'Mapping sent', + ); + cy.get('@syncMessages', { timeout: Cypress.config('elasticPressIndexTimeout') }).should( + 'contain.text', + 'Sync complete', + ); // check that the number of approved comments is the same as the default. - cy.get('@syncMessages').should( + cy.get('@syncMessages', { timeout: Cypress.config('elasticPressIndexTimeout') }).should( 'contain.text', `Number of comments indexed: ${defaultApprovedComments}`, );