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",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -7901,6 +7901,7 @@
|
|||
},
|
||||
"@types/create-hmac": {
|
||||
"version": "1.1.0",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-BNYNdzdhOZZQWCOpwvIll3FSvgo3e55Y2M6s/jOY6TuOCwqt3cLmQsK4tSmJ5fayDot8EG4k3+hcZagfww9JlQ==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
|
@ -7938,6 +7939,7 @@
|
|||
},
|
||||
"@types/jest": {
|
||||
"version": "25.2.1",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA==",
|
||||
"requires": {
|
||||
"jest-diff": "^25.2.1",
|
||||
|
@ -7946,6 +7948,7 @@
|
|||
},
|
||||
"@types/moxios": {
|
||||
"version": "0.4.9",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-Sd1b24QRW2N194j2LEDPQAZK1h0TBtpN+2EIH+rERCgm38qm14JZwC7NlpE7n3jULhlCIPZBG8uNcbjF8KcCaQ==",
|
||||
"requires": {
|
||||
"axios": "^0.19.0"
|
||||
|
@ -9443,6 +9446,7 @@
|
|||
},
|
||||
"jest": {
|
||||
"version": "25.5.4",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ==",
|
||||
"requires": {
|
||||
"@jest/core": "^25.5.4",
|
||||
|
@ -10202,6 +10206,7 @@
|
|||
},
|
||||
"moxios": {
|
||||
"version": "0.4.0",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-/A2ixlR31yXKa5Z51YNw7QxS9Ts="
|
||||
},
|
||||
"ms": {
|
||||
|
@ -11394,6 +11399,7 @@
|
|||
},
|
||||
"ts-jest": {
|
||||
"version": "25.5.0",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-govrjbOk1UEzcJ5cX5k8X8IUtFuP3lp3mrF3ZuKtCdAOQzdeCM7qualhb/U8s8SWFwEDutOqfF5PLkJ+oaYD4w==",
|
||||
"requires": {
|
||||
"bs-logger": "0.x",
|
||||
|
@ -11449,6 +11455,7 @@
|
|||
},
|
||||
"typescript": {
|
||||
"version": "3.8.3",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w=="
|
||||
},
|
||||
"union-value": {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "3.1.0",
|
||||
"@typescript-eslint/parser": "3.1.0",
|
||||
"@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-preset-default": "3.0.2",
|
||||
"@wordpress/e2e-test-utils": "4.6.0",
|
||||
|
|
|
@ -25,7 +25,6 @@ const getBabelConfig = require( './get-babel-config' );
|
|||
* Module Constants
|
||||
*/
|
||||
const PACKAGE_DIR = process.cwd();
|
||||
const PACKAGE_NAME = PACKAGE_DIR.split( path.sep ).pop();
|
||||
const SRC_DIR = 'src';
|
||||
const BUILD_DIR = {
|
||||
main: 'build',
|
||||
|
@ -126,7 +125,13 @@ function buildJsFileFor( file, silent, environment ) {
|
|||
function buildPackage( packagePath ) {
|
||||
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`, {
|
||||
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",
|
||||
"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",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { StoreOwnerFlow } from './flows';
|
||||
import { clickTab, uiUnblocked, verifyCheckboxIsUnset } from './index';
|
||||
import modelRegistry from './factories';
|
||||
import { SimpleProduct } from '@woocommerce/e2e-factories';
|
||||
import { SimpleProduct } from '@woocommerce/model-factories';
|
||||
|
||||
const config = require( 'config' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
initializeUsingBasicAuth,
|
||||
ModelRegistry,
|
||||
registerSimpleProduct
|
||||
} from '@woocommerce/e2e-factories';
|
||||
} from '@woocommerce/model-factories';
|
||||
|
||||
const config = require( 'config' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue