Renamed the e2e-factories package to better reflect its usage-agnostic design
This commit is contained in:
parent
5652025d28
commit
822179e4ac
|
@ -7247,7 +7247,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@woocommerce/e2e-factories": {
|
"@woocommerce/model-factories": {
|
||||||
"version": "file:tests/e2e/factories",
|
"version": "file:tests/e2e/factories",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -7901,6 +7901,7 @@
|
||||||
},
|
},
|
||||||
"@types/create-hmac": {
|
"@types/create-hmac": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-BNYNdzdhOZZQWCOpwvIll3FSvgo3e55Y2M6s/jOY6TuOCwqt3cLmQsK4tSmJ5fayDot8EG4k3+hcZagfww9JlQ==",
|
"integrity": "sha512-BNYNdzdhOZZQWCOpwvIll3FSvgo3e55Y2M6s/jOY6TuOCwqt3cLmQsK4tSmJ5fayDot8EG4k3+hcZagfww9JlQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
|
@ -7938,6 +7939,7 @@
|
||||||
},
|
},
|
||||||
"@types/jest": {
|
"@types/jest": {
|
||||||
"version": "25.2.1",
|
"version": "25.2.1",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA==",
|
"integrity": "sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-diff": "^25.2.1",
|
"jest-diff": "^25.2.1",
|
||||||
|
@ -7946,6 +7948,7 @@
|
||||||
},
|
},
|
||||||
"@types/moxios": {
|
"@types/moxios": {
|
||||||
"version": "0.4.9",
|
"version": "0.4.9",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-Sd1b24QRW2N194j2LEDPQAZK1h0TBtpN+2EIH+rERCgm38qm14JZwC7NlpE7n3jULhlCIPZBG8uNcbjF8KcCaQ==",
|
"integrity": "sha512-Sd1b24QRW2N194j2LEDPQAZK1h0TBtpN+2EIH+rERCgm38qm14JZwC7NlpE7n3jULhlCIPZBG8uNcbjF8KcCaQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"axios": "^0.19.0"
|
"axios": "^0.19.0"
|
||||||
|
@ -9443,6 +9446,7 @@
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"version": "25.5.4",
|
"version": "25.5.4",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ==",
|
"integrity": "sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/core": "^25.5.4",
|
"@jest/core": "^25.5.4",
|
||||||
|
@ -10202,6 +10206,7 @@
|
||||||
},
|
},
|
||||||
"moxios": {
|
"moxios": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha1-/A2ixlR31yXKa5Z51YNw7QxS9Ts="
|
"integrity": "sha1-/A2ixlR31yXKa5Z51YNw7QxS9Ts="
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
|
@ -11394,6 +11399,7 @@
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "25.5.0",
|
"version": "25.5.0",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-govrjbOk1UEzcJ5cX5k8X8IUtFuP3lp3mrF3ZuKtCdAOQzdeCM7qualhb/U8s8SWFwEDutOqfF5PLkJ+oaYD4w==",
|
"integrity": "sha512-govrjbOk1UEzcJ5cX5k8X8IUtFuP3lp3mrF3ZuKtCdAOQzdeCM7qualhb/U8s8SWFwEDutOqfF5PLkJ+oaYD4w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs-logger": "0.x",
|
"bs-logger": "0.x",
|
||||||
|
@ -11449,6 +11455,7 @@
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.8.3",
|
"version": "3.8.3",
|
||||||
|
"resolved": false,
|
||||||
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w=="
|
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w=="
|
||||||
},
|
},
|
||||||
"union-value": {
|
"union-value": {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "3.1.0",
|
"@typescript-eslint/eslint-plugin": "3.1.0",
|
||||||
"@typescript-eslint/parser": "3.1.0",
|
"@typescript-eslint/parser": "3.1.0",
|
||||||
"@woocommerce/e2e-environment": "file:tests/e2e/env",
|
"@woocommerce/e2e-environment": "file:tests/e2e/env",
|
||||||
"@woocommerce/e2e-factories": "file:tests/e2e/factories",
|
"@woocommerce/model-factories": "file:tests/e2e/factories",
|
||||||
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
||||||
"@wordpress/babel-preset-default": "3.0.2",
|
"@wordpress/babel-preset-default": "3.0.2",
|
||||||
"@wordpress/e2e-test-utils": "4.6.0",
|
"@wordpress/e2e-test-utils": "4.6.0",
|
||||||
|
|
|
@ -25,7 +25,6 @@ const getBabelConfig = require( './get-babel-config' );
|
||||||
* Module Constants
|
* Module Constants
|
||||||
*/
|
*/
|
||||||
const PACKAGE_DIR = process.cwd();
|
const PACKAGE_DIR = process.cwd();
|
||||||
const PACKAGE_NAME = PACKAGE_DIR.split( path.sep ).pop();
|
|
||||||
const SRC_DIR = 'src';
|
const SRC_DIR = 'src';
|
||||||
const BUILD_DIR = {
|
const BUILD_DIR = {
|
||||||
main: 'build',
|
main: 'build',
|
||||||
|
@ -126,7 +125,13 @@ function buildJsFileFor( file, silent, environment ) {
|
||||||
function buildPackage( packagePath ) {
|
function buildPackage( packagePath ) {
|
||||||
const srcDir = path.resolve( packagePath, SRC_DIR );
|
const srcDir = path.resolve( packagePath, SRC_DIR );
|
||||||
|
|
||||||
process.stdout.write( chalk.inverse( `>> Building package: ${ PACKAGE_NAME }\n` ) );
|
let packageName;
|
||||||
|
try {
|
||||||
|
packageName = require( path.resolve( PACKAGE_DIR, 'package.json' ) ).name;
|
||||||
|
} catch ( e ) {
|
||||||
|
packageName = PACKAGE_DIR.split( path.sep ).pop();
|
||||||
|
}
|
||||||
|
process.stdout.write( chalk.inverse( `>> Building package: ${ packageName }\n` ) );
|
||||||
|
|
||||||
const jsFiles = glob.sync( `${ srcDir }/**/*.js`, {
|
const jsFiles = glob.sync( `${ srcDir }/**/*.js`, {
|
||||||
ignore: [
|
ignore: [
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "@woocommerce/e2e-factories",
|
"name": "@woocommerce/model-factories",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"author": "Automattic",
|
"author": "Automattic",
|
||||||
"description": "Factories for generating test data for use in WooCommerce End-To-End tests.",
|
"description": "A simple interface for generating models of different types.",
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/master/tests/e2e/factories/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/master/tests/e2e/factories/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import { StoreOwnerFlow } from './flows';
|
import { StoreOwnerFlow } from './flows';
|
||||||
import { clickTab, uiUnblocked, verifyCheckboxIsUnset } from './index';
|
import { clickTab, uiUnblocked, verifyCheckboxIsUnset } from './index';
|
||||||
import modelRegistry from './factories';
|
import modelRegistry from './factories';
|
||||||
import { SimpleProduct } from '@woocommerce/e2e-factories';
|
import { SimpleProduct } from '@woocommerce/model-factories';
|
||||||
|
|
||||||
const config = require( 'config' );
|
const config = require( 'config' );
|
||||||
const simpleProductName = config.get( 'products.simple.name' );
|
const simpleProductName = config.get( 'products.simple.name' );
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {
|
||||||
initializeUsingBasicAuth,
|
initializeUsingBasicAuth,
|
||||||
ModelRegistry,
|
ModelRegistry,
|
||||||
registerSimpleProduct
|
registerSimpleProduct
|
||||||
} from '@woocommerce/e2e-factories';
|
} from '@woocommerce/model-factories';
|
||||||
|
|
||||||
const config = require( 'config' );
|
const config = require( 'config' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue