Merge branch 'trunk' into add/e2e-more-variation-tests

This commit is contained in:
Rodel 2022-01-07 15:04:57 +08:00
commit fba4ddd94e
57 changed files with 66 additions and 17 deletions

View File

@ -5,6 +5,7 @@
## Added
- This package is now transpiled with Babel, which allows the usage of modern, yet compatible JS code.
- A `specs/data` folder to store page element data.
- Tests to verify that different top-level menu and their associated sub-menus load successfully.
- Test scaffolding via `npx wc-e2e install @woocommerce/e2e-core-tests`

View File

@ -21,6 +21,7 @@ const getCoreTestsRoot = () => {
return {
appRoot: coreTestsPath,
packageRoot: moduleDir,
coreTestsRoot: __dirname
};
};

View File

@ -8,13 +8,35 @@
"url": "https://github.com/woocommerce/woocommerce.git"
},
"license": "GPL-3.0+",
"main": "index.js",
"main": "build/index.js",
"module": "build-module/index.js",
"files": [
"build",
"build-module",
"test-data",
"core-tests-root.js",
"installFiles",
"CHANGELOG.md"
],
"dependencies": {
"@jest/globals": "^26.4.2",
"@wordpress/deprecated": "^3.2.3",
"config": "3.3.3",
"faker": "^5.1.0"
},
"devDependencies": {
"@babel/cli": "7.12.8",
"@babel/core": "7.12.9",
"@babel/plugin-proposal-async-generator-functions": "^7.16.4",
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
"@babel/plugin-transform-react-jsx": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.12.7",
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
"@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "^4.1.0"
},
"peerDependencies": {
"@woocommerce/api": "^0.2.0",
"@woocommerce/e2e-utils": "^0.1.6"
@ -24,7 +46,9 @@
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "./bin/build.sh",
"prepare": "pnpm run build"
"prepare": "pnpm run build",
"clean": "rm -rf ./build ./build-module",
"compile": "node ./../bin/build.js",
"build": "./bin/build.sh && pnpm run clean && pnpm run compile"
}
}

View File

@ -7,7 +7,7 @@ const {
setCheckbox,
withRestApi,
} = require( '@woocommerce/e2e-utils' );
const getCoreTestsRoot = require( '../../core-tests-root' );
const getCoreTestsRoot = require( '../../../core-tests-root' );
/**
* External dependencies
@ -17,11 +17,11 @@ const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
const path = require( 'path' );
const coreTestsPath = getCoreTestsRoot();
const filePath = path.resolve(
coreTestsPath.packageRoot,
coreTestsPath.coreTestsRoot,
'test-data/sample_products.csv'
);
const filePathOverride = path.resolve(
coreTestsPath.packageRoot,
coreTestsPath.coreTestsRoot,
'test-data/sample_products_override.csv'
);
const productNames = [

View File

@ -21,7 +21,7 @@
"pelago/emogrifier": "3.1.0",
"psr/container": "1.0.0",
"woocommerce/action-scheduler": "3.4.0",
"woocommerce/woocommerce-admin": "3.0.1",
"woocommerce/woocommerce-admin": "3.0.3",
"woocommerce/woocommerce-blocks": "6.5.1"
},
"require-dev": {

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ebdb5708b79cdb94e4b2ff5fbed40d89",
"content-hash": "fb68c78e4ab4269155c3c9613af1a22a",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@ -543,16 +543,16 @@
},
{
"name": "woocommerce/woocommerce-admin",
"version": "3.0.1",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-admin.git",
"reference": "5542e80021a43d24ab9b1d2d67083b608899835d"
"reference": "0b1abab35c62717f3121428fe7f378998ef4899c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/woocommerce-admin/zipball/5542e80021a43d24ab9b1d2d67083b608899835d",
"reference": "5542e80021a43d24ab9b1d2d67083b608899835d",
"url": "https://api.github.com/repos/woocommerce/woocommerce-admin/zipball/0b1abab35c62717f3121428fe7f378998ef4899c",
"reference": "0b1abab35c62717f3121428fe7f378998ef4899c",
"shasum": ""
},
"require": {
@ -608,9 +608,9 @@
"homepage": "https://github.com/woocommerce/woocommerce-admin",
"support": {
"issues": "https://github.com/woocommerce/woocommerce-admin/issues",
"source": "https://github.com/woocommerce/woocommerce-admin/tree/v3.0.1"
"source": "https://github.com/woocommerce/woocommerce-admin/tree/v3.0.3"
},
"time": "2021-12-30T18:38:11+00:00"
"time": "2022-01-06T22:46:17+00:00"
},
{
"name": "woocommerce/woocommerce-blocks",
@ -2926,5 +2926,5 @@
"platform-overrides": {
"php": "7.0.33"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.0.0"
}

View File

@ -73,7 +73,7 @@
},
"engines": {
"node": "^16.13.1",
"npm": "^8.1.2"
"pnpm": "^6.24.2"
},
"husky": {
"hooks": {

View File

@ -100,7 +100,18 @@ importers:
packages/js/e2e-core-tests:
specifiers:
'@babel/cli': 7.12.8
'@babel/core': 7.12.9
'@babel/plugin-proposal-async-generator-functions': ^7.16.4
'@babel/plugin-proposal-object-rest-spread': ^7.16.0
'@babel/plugin-transform-react-jsx': ^7.16.0
'@babel/plugin-transform-runtime': ^7.16.4
'@babel/polyfill': 7.12.1
'@babel/preset-env': 7.12.7
'@jest/globals': ^26.4.2
'@wordpress/babel-plugin-import-jsx-pragma': 1.1.3
'@wordpress/babel-preset-default': 3.0.2
'@wordpress/browserslist-config': ^4.1.0
'@wordpress/deprecated': ^3.2.3
config: 3.3.3
faker: ^5.1.0
@ -109,6 +120,18 @@ importers:
'@wordpress/deprecated': 3.2.3
config: 3.3.3
faker: 5.5.3
devDependencies:
'@babel/cli': 7.12.8_@babel+core@7.12.9
'@babel/core': 7.12.9
'@babel/plugin-proposal-async-generator-functions': 7.16.4_@babel+core@7.12.9
'@babel/plugin-proposal-object-rest-spread': 7.16.0_@babel+core@7.12.9
'@babel/plugin-transform-react-jsx': 7.16.0_@babel+core@7.12.9
'@babel/plugin-transform-runtime': 7.16.4_@babel+core@7.12.9
'@babel/polyfill': 7.12.1
'@babel/preset-env': 7.12.7_@babel+core@7.12.9
'@wordpress/babel-plugin-import-jsx-pragma': 1.1.3_@babel+core@7.12.9
'@wordpress/babel-preset-default': 3.0.2
'@wordpress/browserslist-config': 4.1.0
packages/js/e2e-environment:
specifiers:
@ -7663,7 +7686,7 @@ packages:
/core-js/2.6.12:
resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==}
deprecated: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
deprecated: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
requiresBuild: true
/core-js/3.19.1: