From d41fbc7ff238f239d6d117a3b4efeb711958f235 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Tue, 28 Apr 2020 17:14:11 -0300 Subject: [PATCH] update folder structure, use WordPress 5.4 --- .gitignore | 8 ++--- .travis.yml | 9 ++--- docker-compose.yaml | 6 ++-- package-lock.json | 33 +++++++++++++++++-- package.json | 2 +- tests/e2e-env/docker/wordpress/Dockerfile | 1 - tests/{e2e-tests => e2e}/README.md | 0 tests/{e2e-tests => e2e}/config/default.json | 0 .../config/jest-custom-sequencer.js | 0 .../config/jest-puppeteer.config.js | 0 .../{e2e-tests => e2e}/config/jest.config.js | 0 tests/{e2e-env => e2e}/config/test:e2e.json | 0 tests/{e2e-tests => e2e}/docker/initialize.sh | 0 tests/{e2e-env => e2e/env}/.env | 0 tests/{e2e-env => e2e/env}/.eslintrc.js | 0 tests/{e2e-env => e2e/env}/.npmrc | 0 tests/{e2e-env => e2e/env}/.travis.yml | 0 tests/{e2e-env => e2e/env}/CHANGELOG.md | 0 tests/{e2e-env => e2e/env}/README.md | 8 ++--- tests/{e2e-env => e2e/env}/babel.config.js | 0 .../env}/bin/before-script-CI.sh | 0 .../env}/bin/docker-compose.js | 2 +- .../env}/bin/e2e-test-integration.js | 4 +-- .../env}/bin/install-wp-tests.sh | 0 .../env}/bin/wait-for-build.sh | 0 .../{e2e-env => e2e/env}/config/default.json | 0 .../{e2e-env => e2e/env}/config/env.setup.js | 0 .../env}/config/jest-custom-sequencer.js | 0 .../env}/config/jest-puppeteer.config.js | 0 .../env}/config/jest-puppeteer.dev.config.js | 0 .../env}/config/jest.config.js | 2 +- .../{e2e-env => e2e/env}/config/jest.setup.js | 2 +- .../env}/config/test:e2e.json | 0 .../{e2e-env => e2e/env}/docker-compose.yaml | 0 tests/e2e/env/docker/wordpress/Dockerfile | 1 + .../env}/docker/wp-cli/Dockerfile | 0 .../env}/docker/wp-cli/entrypoint.sh | 0 .../env}/docker/wp-cli/wait-for-it.sh | 0 tests/{e2e-env => e2e/env}/index.js | 0 tests/{e2e-env => e2e/env}/package.json | 0 tests/{e2e-env => e2e/env}/utils/app-root.js | 8 ++--- tests/{e2e-env => e2e/env}/utils/index.js | 0 tests/{e2e-env => e2e/env}/webpack-alias.js | 2 +- .../activate-and-setup/setup-wizard.test.js | 0 .../specs/front-end/front-end-cart.test.js | 0 .../front-end/front-end-checkout.test.js | 0 .../front-end/front-end-my-account.test.js | 0 .../front-end-single-product.test.js | 0 .../wp-admin/wp-admin-coupon-new.test.js | 0 .../specs/wp-admin/wp-admin-order-new.test.js | 0 .../wp-admin/wp-admin-product-new.test.js | 0 .../wp-admin-settings-general.test.js | 0 .../wp-admin-settings-product.test.js | 0 .../wp-admin/wp-admin-settings-tax.test.js | 0 tests/{e2e-tests => e2e}/utils/components.js | 0 tests/{e2e-tests => e2e}/utils/flows.js | 0 tests/{e2e-tests => e2e}/utils/index.js | 0 57 files changed, 59 insertions(+), 29 deletions(-) delete mode 100644 tests/e2e-env/docker/wordpress/Dockerfile rename tests/{e2e-tests => e2e}/README.md (100%) rename tests/{e2e-tests => e2e}/config/default.json (100%) rename tests/{e2e-tests => e2e}/config/jest-custom-sequencer.js (100%) rename tests/{e2e-tests => e2e}/config/jest-puppeteer.config.js (100%) rename tests/{e2e-tests => e2e}/config/jest.config.js (100%) rename tests/{e2e-env => e2e}/config/test:e2e.json (100%) rename tests/{e2e-tests => e2e}/docker/initialize.sh (100%) rename tests/{e2e-env => e2e/env}/.env (100%) rename tests/{e2e-env => e2e/env}/.eslintrc.js (100%) rename tests/{e2e-env => e2e/env}/.npmrc (100%) rename tests/{e2e-env => e2e/env}/.travis.yml (100%) rename tests/{e2e-env => e2e/env}/CHANGELOG.md (100%) rename tests/{e2e-env => e2e/env}/README.md (91%) rename tests/{e2e-env => e2e/env}/babel.config.js (100%) rename tests/{e2e-env => e2e/env}/bin/before-script-CI.sh (100%) rename tests/{e2e-env => e2e/env}/bin/docker-compose.js (95%) rename tests/{e2e-env => e2e/env}/bin/e2e-test-integration.js (91%) rename tests/{e2e-env => e2e/env}/bin/install-wp-tests.sh (100%) rename tests/{e2e-env => e2e/env}/bin/wait-for-build.sh (100%) rename tests/{e2e-env => e2e/env}/config/default.json (100%) rename tests/{e2e-env => e2e/env}/config/env.setup.js (100%) rename tests/{e2e-env => e2e/env}/config/jest-custom-sequencer.js (100%) rename tests/{e2e-env => e2e/env}/config/jest-puppeteer.config.js (100%) rename tests/{e2e-env => e2e/env}/config/jest-puppeteer.dev.config.js (100%) rename tests/{e2e-env => e2e/env}/config/jest.config.js (93%) rename tests/{e2e-env => e2e/env}/config/jest.setup.js (99%) rename tests/{e2e-tests => e2e/env}/config/test:e2e.json (100%) rename tests/{e2e-env => e2e/env}/docker-compose.yaml (100%) create mode 100644 tests/e2e/env/docker/wordpress/Dockerfile rename tests/{e2e-env => e2e/env}/docker/wp-cli/Dockerfile (100%) rename tests/{e2e-env => e2e/env}/docker/wp-cli/entrypoint.sh (100%) rename tests/{e2e-env => e2e/env}/docker/wp-cli/wait-for-it.sh (100%) rename tests/{e2e-env => e2e/env}/index.js (100%) rename tests/{e2e-env => e2e/env}/package.json (100%) rename tests/{e2e-env => e2e/env}/utils/app-root.js (61%) rename tests/{e2e-env => e2e/env}/utils/index.js (100%) rename tests/{e2e-env => e2e/env}/webpack-alias.js (76%) rename tests/{e2e-tests => e2e}/specs/activate-and-setup/setup-wizard.test.js (100%) rename tests/{e2e-tests => e2e}/specs/front-end/front-end-cart.test.js (100%) rename tests/{e2e-tests => e2e}/specs/front-end/front-end-checkout.test.js (100%) rename tests/{e2e-tests => e2e}/specs/front-end/front-end-my-account.test.js (100%) rename tests/{e2e-tests => e2e}/specs/front-end/front-end-single-product.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-coupon-new.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-order-new.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-product-new.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-settings-general.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-settings-product.test.js (100%) rename tests/{e2e-tests => e2e}/specs/wp-admin/wp-admin-settings-tax.test.js (100%) rename tests/{e2e-tests => e2e}/utils/components.js (100%) rename tests/{e2e-tests => e2e}/utils/flows.js (100%) rename tests/{e2e-tests => e2e}/utils/index.js (100%) diff --git a/.gitignore b/.gitignore index 4a049bd4d19..98eda2aff7c 100644 --- a/.gitignore +++ b/.gitignore @@ -42,10 +42,10 @@ tests/cli/vendor # Unit tests /tmp /tests/bin/tmp -/tests/e2e-tests/config/local-*.json -/tests/e2e-tests/config/local.json -/tests/e2e-tests/docker -/tests/e2e-env/docker/wp-cli/initialize.sh +/tests/e2e/config/local-*.json +/tests/e2e/config/local.json +/tests/e2e/docker +/tests/e2e/env/docker/wp-cli/initialize.sh # Logs /logs diff --git a/.travis.yml b/.travis.yml index 54f576227cb..0d8ac31bf83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,13 +41,14 @@ matrix: php: 7.4 env: WP_VERSION=latest WP_MULTISITE=0 script: - - bash tests/e2e-env/bin/before-script-CI.sh + - bash tests/e2e/env/bin/before-script-CI.sh - composer require wp-cli/i18n-command + - npm install - npm run build - - npm explore @woocommerce/e2e-env -- npm run docker:up - - npm explore @woocommerce/e2e-env -- npm run test:e2e + - npm run docker:up + - npm run test:e2e after_script: - - npm explore @woocommerce/e2e-env -- npm run docker:down + - npm run docker:down - name: "Unit tests code coverage" php: 7.4 env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1 diff --git a/docker-compose.yaml b/docker-compose.yaml index cbb25e81840..f2625a55260 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,10 +5,10 @@ services: wordpress-www: volumes: # This path is relative to the first config file - # which is in tests/e2e-env or node_modules/@woocommerce/e2e-env - - "../../:/var/www/html/wp-content/plugins/woocommerce" + # which is in tests/e2e/env or node_modules/@woocommerce/e2e-env + - "../../../:/var/www/html/wp-content/plugins/woocommerce" wordpress-cli: volumes: - - "../../:/var/www/html/wp-content/plugins/woocommerce" + - "../../../:/var/www/html/wp-content/plugins/woocommerce" diff --git a/package-lock.json b/package-lock.json index b0547d9c98e..db45df45dd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "woocommerce", - "version": "4.0.0", + "version": "4.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5006,7 +5006,7 @@ } }, "@woocommerce/e2e-env": { - "version": "file:tests/e2e-env", + "version": "file:tests/e2e/env", "dev": true }, "@wordpress/e2e-test-utils": { @@ -18277,6 +18277,18 @@ "requires": { "buffer": "^5.4.3", "whatwg-url-without-unicode": "8.0.0-1" + }, + "dependencies": { + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } } }, "read-pkg": { @@ -22431,6 +22443,23 @@ "webidl-conversions": "^4.0.2" } }, + "whatwg-url-without-unicode": { + "version": "8.0.0-1", + "resolved": "https://registry.npmjs.org/whatwg-url-without-unicode/-/whatwg-url-without-unicode-8.0.0-1.tgz", + "integrity": "sha512-0Uy8mjsG5O8Y53327XL+ZqsrMdxO1CL/6m840SmW5iyRWFvU2zlxS2RzpD3pFFVKYOKCmsKn5JKzWxQ+bImnWA==", + "dev": true, + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/package.json b/package.json index 0fe0ed2d973..0042addca01 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@babel/preset-env": "7.9.0", "@babel/register": "7.9.0", "@jest/test-sequencer": "^25.0.0", - "@woocommerce/e2e-env": "file:tests/e2e-env", + "@woocommerce/e2e-env": "file:tests/e2e/env", "@wordpress/e2e-test-utils": "4.3.1", "autoprefixer": "9.7.5", "babel-eslint": "10.1.0", diff --git a/tests/e2e-env/docker/wordpress/Dockerfile b/tests/e2e-env/docker/wordpress/Dockerfile deleted file mode 100644 index 4a132d9acbe..00000000000 --- a/tests/e2e-env/docker/wordpress/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM wordpress:latest diff --git a/tests/e2e-tests/README.md b/tests/e2e/README.md similarity index 100% rename from tests/e2e-tests/README.md rename to tests/e2e/README.md diff --git a/tests/e2e-tests/config/default.json b/tests/e2e/config/default.json similarity index 100% rename from tests/e2e-tests/config/default.json rename to tests/e2e/config/default.json diff --git a/tests/e2e-tests/config/jest-custom-sequencer.js b/tests/e2e/config/jest-custom-sequencer.js similarity index 100% rename from tests/e2e-tests/config/jest-custom-sequencer.js rename to tests/e2e/config/jest-custom-sequencer.js diff --git a/tests/e2e-tests/config/jest-puppeteer.config.js b/tests/e2e/config/jest-puppeteer.config.js similarity index 100% rename from tests/e2e-tests/config/jest-puppeteer.config.js rename to tests/e2e/config/jest-puppeteer.config.js diff --git a/tests/e2e-tests/config/jest.config.js b/tests/e2e/config/jest.config.js similarity index 100% rename from tests/e2e-tests/config/jest.config.js rename to tests/e2e/config/jest.config.js diff --git a/tests/e2e-env/config/test:e2e.json b/tests/e2e/config/test:e2e.json similarity index 100% rename from tests/e2e-env/config/test:e2e.json rename to tests/e2e/config/test:e2e.json diff --git a/tests/e2e-tests/docker/initialize.sh b/tests/e2e/docker/initialize.sh similarity index 100% rename from tests/e2e-tests/docker/initialize.sh rename to tests/e2e/docker/initialize.sh diff --git a/tests/e2e-env/.env b/tests/e2e/env/.env similarity index 100% rename from tests/e2e-env/.env rename to tests/e2e/env/.env diff --git a/tests/e2e-env/.eslintrc.js b/tests/e2e/env/.eslintrc.js similarity index 100% rename from tests/e2e-env/.eslintrc.js rename to tests/e2e/env/.eslintrc.js diff --git a/tests/e2e-env/.npmrc b/tests/e2e/env/.npmrc similarity index 100% rename from tests/e2e-env/.npmrc rename to tests/e2e/env/.npmrc diff --git a/tests/e2e-env/.travis.yml b/tests/e2e/env/.travis.yml similarity index 100% rename from tests/e2e-env/.travis.yml rename to tests/e2e/env/.travis.yml diff --git a/tests/e2e-env/CHANGELOG.md b/tests/e2e/env/CHANGELOG.md similarity index 100% rename from tests/e2e-env/CHANGELOG.md rename to tests/e2e/env/CHANGELOG.md diff --git a/tests/e2e-env/README.md b/tests/e2e/env/README.md similarity index 91% rename from tests/e2e-env/README.md rename to tests/e2e/env/README.md index 86a0508d870..0389a1bceec 100644 --- a/tests/e2e-env/README.md +++ b/tests/e2e/env/README.md @@ -84,7 +84,7 @@ module.exports = { }; ``` -**NOTE:** Your project's Jest config file is expected to found at: `tests/e2e-tests/config/jest.config.js`. +**NOTE:** Your project's Jest config file is expected to found at: `tests/e2e/config/jest.config.js`. ### Webpack Config @@ -109,14 +109,14 @@ module.exports = { The E2E environment will look for a `docker-compose.yaml` file in your project root. This will be combined with the base Docker config in the package. This is where you'll map your local project files into the Docker container(s). ```yaml -version: '3.3' +version: '3.7' services: wordpress-www: volumes: # This path is relative to the first config file - # which is in node_modules/@woocommerce/e2e-env + # which is in node_modules/@woocommerce/e2e/env - "../../../:/var/www/html/wp-content/plugins/your-project-here" wordpress-cli: @@ -126,7 +126,7 @@ services: #### Docker Container Initialization Script -You can provide an initialization script that will run in the WP-CLI Docker container. Place an executable file at `tests/e2e-tests/docker/initialize.sh` in your project and it will be copied into the container and executed. While you can run any commands you wish, the intent here is to use WP-CLI to set up your testing environment. E.g.: +You can provide an initialization script that will run in the WP-CLI Docker container. Place an executable file at `tests/e2e/docker/initialize.sh` in your project and it will be copied into the container and executed. While you can run any commands you wish, the intent here is to use WP-CLI to set up your testing environment. E.g.: ``` #!/bin/bash diff --git a/tests/e2e-env/babel.config.js b/tests/e2e/env/babel.config.js similarity index 100% rename from tests/e2e-env/babel.config.js rename to tests/e2e/env/babel.config.js diff --git a/tests/e2e-env/bin/before-script-CI.sh b/tests/e2e/env/bin/before-script-CI.sh similarity index 100% rename from tests/e2e-env/bin/before-script-CI.sh rename to tests/e2e/env/bin/before-script-CI.sh diff --git a/tests/e2e-env/bin/docker-compose.js b/tests/e2e/env/bin/docker-compose.js similarity index 95% rename from tests/e2e-env/bin/docker-compose.js rename to tests/e2e/env/bin/docker-compose.js index 1505795fa4a..48c823ac7c5 100755 --- a/tests/e2e-env/bin/docker-compose.js +++ b/tests/e2e/env/bin/docker-compose.js @@ -39,7 +39,7 @@ if ( appPath ) { if ( 'up' === command ) { // Look for an initialization script in the dependent app. - const appInitFile = path.resolve( appPath, 'tests/e2e-tests/docker/initialize.sh' ); + const appInitFile = path.resolve( appPath, 'tests/e2e/docker/initialize.sh' ); // If found, copy it into the wp-cli Docker context so // it gets picked up by the entrypoint script. diff --git a/tests/e2e-env/bin/e2e-test-integration.js b/tests/e2e/env/bin/e2e-test-integration.js similarity index 91% rename from tests/e2e-env/bin/e2e-test-integration.js rename to tests/e2e/env/bin/e2e-test-integration.js index 4d74ad88fa5..06eba495250 100755 --- a/tests/e2e-env/bin/e2e-test-integration.js +++ b/tests/e2e/env/bin/e2e-test-integration.js @@ -19,7 +19,7 @@ const nodeConfigDirs = [ if ( appPath ) { nodeConfigDirs.unshift( - path.resolve( appPath, 'tests/e2e-tests/config' ) + path.resolve( appPath, 'tests/e2e/config' ) ); } @@ -55,7 +55,7 @@ let configPath = path.resolve( __dirname, '../config/jest.config.js' ); // Look for a Jest config in the dependent app's path. if ( appPath ) { - const appConfig = path.resolve( appPath, 'tests/e2e-tests/config/jest.config.js' ); + const appConfig = path.resolve( appPath, 'tests/e2e/config/jest.config.js' ); if ( fs.existsSync( appConfig ) ) { configPath = appConfig; diff --git a/tests/e2e-env/bin/install-wp-tests.sh b/tests/e2e/env/bin/install-wp-tests.sh similarity index 100% rename from tests/e2e-env/bin/install-wp-tests.sh rename to tests/e2e/env/bin/install-wp-tests.sh diff --git a/tests/e2e-env/bin/wait-for-build.sh b/tests/e2e/env/bin/wait-for-build.sh similarity index 100% rename from tests/e2e-env/bin/wait-for-build.sh rename to tests/e2e/env/bin/wait-for-build.sh diff --git a/tests/e2e-env/config/default.json b/tests/e2e/env/config/default.json similarity index 100% rename from tests/e2e-env/config/default.json rename to tests/e2e/env/config/default.json diff --git a/tests/e2e-env/config/env.setup.js b/tests/e2e/env/config/env.setup.js similarity index 100% rename from tests/e2e-env/config/env.setup.js rename to tests/e2e/env/config/env.setup.js diff --git a/tests/e2e-env/config/jest-custom-sequencer.js b/tests/e2e/env/config/jest-custom-sequencer.js similarity index 100% rename from tests/e2e-env/config/jest-custom-sequencer.js rename to tests/e2e/env/config/jest-custom-sequencer.js diff --git a/tests/e2e-env/config/jest-puppeteer.config.js b/tests/e2e/env/config/jest-puppeteer.config.js similarity index 100% rename from tests/e2e-env/config/jest-puppeteer.config.js rename to tests/e2e/env/config/jest-puppeteer.config.js diff --git a/tests/e2e-env/config/jest-puppeteer.dev.config.js b/tests/e2e/env/config/jest-puppeteer.dev.config.js similarity index 100% rename from tests/e2e-env/config/jest-puppeteer.dev.config.js rename to tests/e2e/env/config/jest-puppeteer.dev.config.js diff --git a/tests/e2e-env/config/jest.config.js b/tests/e2e/env/config/jest.config.js similarity index 93% rename from tests/e2e-env/config/jest.config.js rename to tests/e2e/env/config/jest.config.js index f9a638f1d3f..6834682256e 100644 --- a/tests/e2e-env/config/jest.config.js +++ b/tests/e2e/env/config/jest.config.js @@ -7,7 +7,7 @@ module.exports = { moduleNameMapper: { '@woocommerce/e2e-tests/(.*)': - '/node_modules/woocommerce/tests/e2e-tests/$1', + '/node_modules/woocommerce/tests/e2e/$1', }, preset: 'jest-puppeteer', diff --git a/tests/e2e-env/config/jest.setup.js b/tests/e2e/env/config/jest.setup.js similarity index 99% rename from tests/e2e-env/config/jest.setup.js rename to tests/e2e/env/config/jest.setup.js index 45356fa2d37..f3f69aefde9 100644 --- a/tests/e2e-env/config/jest.setup.js +++ b/tests/e2e/env/config/jest.setup.js @@ -19,7 +19,7 @@ let jestTimeoutInMilliSeconds = 30000; // Use `await jestPuppeteer.debug()` in test code to pause execution. if ( process.env.JEST_PUPPETEER_CONFIG === - 'tests/e2e-tests/config/jest-puppeteer.dev.config.js' + 'tests/e2e/config/jest-puppeteer.dev.config.js' ) { jestTimeoutInMilliSeconds = 120000; } diff --git a/tests/e2e-tests/config/test:e2e.json b/tests/e2e/env/config/test:e2e.json similarity index 100% rename from tests/e2e-tests/config/test:e2e.json rename to tests/e2e/env/config/test:e2e.json diff --git a/tests/e2e-env/docker-compose.yaml b/tests/e2e/env/docker-compose.yaml similarity index 100% rename from tests/e2e-env/docker-compose.yaml rename to tests/e2e/env/docker-compose.yaml diff --git a/tests/e2e/env/docker/wordpress/Dockerfile b/tests/e2e/env/docker/wordpress/Dockerfile new file mode 100644 index 00000000000..8d927f52ee7 --- /dev/null +++ b/tests/e2e/env/docker/wordpress/Dockerfile @@ -0,0 +1 @@ +FROM wordpress:5.4 diff --git a/tests/e2e-env/docker/wp-cli/Dockerfile b/tests/e2e/env/docker/wp-cli/Dockerfile similarity index 100% rename from tests/e2e-env/docker/wp-cli/Dockerfile rename to tests/e2e/env/docker/wp-cli/Dockerfile diff --git a/tests/e2e-env/docker/wp-cli/entrypoint.sh b/tests/e2e/env/docker/wp-cli/entrypoint.sh similarity index 100% rename from tests/e2e-env/docker/wp-cli/entrypoint.sh rename to tests/e2e/env/docker/wp-cli/entrypoint.sh diff --git a/tests/e2e-env/docker/wp-cli/wait-for-it.sh b/tests/e2e/env/docker/wp-cli/wait-for-it.sh similarity index 100% rename from tests/e2e-env/docker/wp-cli/wait-for-it.sh rename to tests/e2e/env/docker/wp-cli/wait-for-it.sh diff --git a/tests/e2e-env/index.js b/tests/e2e/env/index.js similarity index 100% rename from tests/e2e-env/index.js rename to tests/e2e/env/index.js diff --git a/tests/e2e-env/package.json b/tests/e2e/env/package.json similarity index 100% rename from tests/e2e-env/package.json rename to tests/e2e/env/package.json diff --git a/tests/e2e-env/utils/app-root.js b/tests/e2e/env/utils/app-root.js similarity index 61% rename from tests/e2e-env/utils/app-root.js rename to tests/e2e/env/utils/app-root.js index f0a681796aa..2df91149a23 100644 --- a/tests/e2e-env/utils/app-root.js +++ b/tests/e2e/env/utils/app-root.js @@ -2,15 +2,15 @@ const path = require( 'path' ); const getAppRoot = () => { // Figure out where we're installed. - // Typically will be in node_modules/, but WooCommerce Admin - // uses a local file path (packages/e2e-env). + // Typically will be in node_modules/, but WooCommerce + // uses a local file path (tests/e2e/env). let appPath = false; const moduleDir = path.dirname( require.resolve( '@woocommerce/e2e-env' ) ); if ( -1 < moduleDir.indexOf( 'node_modules' ) ) { appPath = moduleDir.split( 'node_modules' )[ 0 ]; - } else if ( -1 < moduleDir.indexOf( 'tests/e2e-env' ) ) { - appPath = moduleDir.split( 'tests/e2e-env' )[ 0 ]; + } else if ( -1 < moduleDir.indexOf( 'tests/e2e/env' ) ) { + appPath = moduleDir.split( 'tests/e2e/env' )[ 0 ]; } return appPath; diff --git a/tests/e2e-env/utils/index.js b/tests/e2e/env/utils/index.js similarity index 100% rename from tests/e2e-env/utils/index.js rename to tests/e2e/env/utils/index.js diff --git a/tests/e2e-env/webpack-alias.js b/tests/e2e/env/webpack-alias.js similarity index 76% rename from tests/e2e-env/webpack-alias.js rename to tests/e2e/env/webpack-alias.js index e1716f8ae1e..3c9d404cc68 100644 --- a/tests/e2e-env/webpack-alias.js +++ b/tests/e2e/env/webpack-alias.js @@ -6,6 +6,6 @@ const path = require( 'path' ); module.exports = { '@woocommerce/e2e-tests': path.resolve( __dirname, - 'node_modules/woocommerce/tests/e2e-tests' + 'node_modules/woocommerce/tests/e2e' ), }; diff --git a/tests/e2e-tests/specs/activate-and-setup/setup-wizard.test.js b/tests/e2e/specs/activate-and-setup/setup-wizard.test.js similarity index 100% rename from tests/e2e-tests/specs/activate-and-setup/setup-wizard.test.js rename to tests/e2e/specs/activate-and-setup/setup-wizard.test.js diff --git a/tests/e2e-tests/specs/front-end/front-end-cart.test.js b/tests/e2e/specs/front-end/front-end-cart.test.js similarity index 100% rename from tests/e2e-tests/specs/front-end/front-end-cart.test.js rename to tests/e2e/specs/front-end/front-end-cart.test.js diff --git a/tests/e2e-tests/specs/front-end/front-end-checkout.test.js b/tests/e2e/specs/front-end/front-end-checkout.test.js similarity index 100% rename from tests/e2e-tests/specs/front-end/front-end-checkout.test.js rename to tests/e2e/specs/front-end/front-end-checkout.test.js diff --git a/tests/e2e-tests/specs/front-end/front-end-my-account.test.js b/tests/e2e/specs/front-end/front-end-my-account.test.js similarity index 100% rename from tests/e2e-tests/specs/front-end/front-end-my-account.test.js rename to tests/e2e/specs/front-end/front-end-my-account.test.js diff --git a/tests/e2e-tests/specs/front-end/front-end-single-product.test.js b/tests/e2e/specs/front-end/front-end-single-product.test.js similarity index 100% rename from tests/e2e-tests/specs/front-end/front-end-single-product.test.js rename to tests/e2e/specs/front-end/front-end-single-product.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-coupon-new.test.js b/tests/e2e/specs/wp-admin/wp-admin-coupon-new.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-coupon-new.test.js rename to tests/e2e/specs/wp-admin/wp-admin-coupon-new.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-order-new.test.js b/tests/e2e/specs/wp-admin/wp-admin-order-new.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-order-new.test.js rename to tests/e2e/specs/wp-admin/wp-admin-order-new.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-product-new.test.js b/tests/e2e/specs/wp-admin/wp-admin-product-new.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-product-new.test.js rename to tests/e2e/specs/wp-admin/wp-admin-product-new.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-settings-general.test.js b/tests/e2e/specs/wp-admin/wp-admin-settings-general.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-settings-general.test.js rename to tests/e2e/specs/wp-admin/wp-admin-settings-general.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-settings-product.test.js b/tests/e2e/specs/wp-admin/wp-admin-settings-product.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-settings-product.test.js rename to tests/e2e/specs/wp-admin/wp-admin-settings-product.test.js diff --git a/tests/e2e-tests/specs/wp-admin/wp-admin-settings-tax.test.js b/tests/e2e/specs/wp-admin/wp-admin-settings-tax.test.js similarity index 100% rename from tests/e2e-tests/specs/wp-admin/wp-admin-settings-tax.test.js rename to tests/e2e/specs/wp-admin/wp-admin-settings-tax.test.js diff --git a/tests/e2e-tests/utils/components.js b/tests/e2e/utils/components.js similarity index 100% rename from tests/e2e-tests/utils/components.js rename to tests/e2e/utils/components.js diff --git a/tests/e2e-tests/utils/flows.js b/tests/e2e/utils/flows.js similarity index 100% rename from tests/e2e-tests/utils/flows.js rename to tests/e2e/utils/flows.js diff --git a/tests/e2e-tests/utils/index.js b/tests/e2e/utils/index.js similarity index 100% rename from tests/e2e-tests/utils/index.js rename to tests/e2e/utils/index.js