Merge pull request #31644 from woocommerce/e2e/import-cleanup

e2e-core-test package cleanup
This commit is contained in:
Jamel Noel Reid 2022-01-17 13:08:59 -05:00 committed by GitHub
commit c9696e66b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 83 additions and 59 deletions

View File

@ -9,6 +9,36 @@
"action": "add",
"cwd": "packages/js/e2e-core-tests"
}
},
"build": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "build"
}
},
"clean": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "clean"
}
},
"compile": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "compile"
}
},
"prepare": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "prepare"
}
},
"lint": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "lint"
}
}
}
}

View File

@ -7,7 +7,6 @@ const {
verifyCheckboxIsSet,
verifyValueOfInputField,
uiUnblocked,
evalAndClick,
createOrder,
clickAndWaitForSelector,
} = require( '@woocommerce/e2e-utils' );

View File

@ -1,8 +1,6 @@
/**
* Internal dependencies
*/
const config = require( 'config' );
const {
merchant,
withRestApi,

View File

@ -7,9 +7,14 @@ const {
merchant,
uiUnblocked,
verifyAndPublish,
createSimpleProduct
createSimpleProduct,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll } = require( '@jest/globals' );
let productId;
const runProductEditDetailsTest = () => {

View File

@ -11,7 +11,7 @@ const {
setBrowserViewport,
verifyAndPublish,
waitForSelector,
waitForSelectorWithoutThrow
waitForSelectorWithoutThrow,
} = require( '@woocommerce/e2e-utils' );
const {
waitAndClick,

View File

@ -5,7 +5,7 @@
const {
merchant,
settingsPageSaveChanges,
verifyValueOfInputField
verifyValueOfInputField,
} = require( '@woocommerce/e2e-utils' );
/**

View File

@ -8,7 +8,7 @@ const {
settingsPageSaveChanges,
unsetCheckbox,
verifyCheckboxIsSet,
verifyCheckboxIsUnset
verifyCheckboxIsUnset,
} = require( '@woocommerce/e2e-utils' );
const runProductSettingsTest = () => {

View File

@ -2,6 +2,10 @@
* Internal dependencies
*/
const { merchant, withRestApi } = require('@woocommerce/e2e-utils');
/**
* External dependencies
*/
const { lorem, helpers } = require('faker');
const runAddShippingClassesTest = () => {

View File

@ -12,11 +12,7 @@ const {
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const config = require( 'config' );
const firstProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99';

View File

@ -3,7 +3,6 @@
*/
const {
shopper,
createCoupon,
createSimpleProduct,
uiUnblocked,
applyCoupon,
@ -14,11 +13,7 @@ const { getCouponId, getCouponsTable } = require( '../utils/coupons' );
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const runCartApplyCouponsTest = () => {
describe('Cart applying coupons', () => {

View File

@ -5,17 +5,13 @@ const {
shopper,
withRestApi,
createSimpleProduct,
uiUnblocked
uiUnblocked,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const config = require( 'config' );
const simpleProductName = config.get( 'products.simple.name' );

View File

@ -3,7 +3,6 @@
*/
const {
shopper,
createCoupon,
createSimpleProduct,
uiUnblocked,
applyCoupon,
@ -15,11 +14,7 @@ const { getCouponId, getCouponsTable } = require( '../utils/coupons' );
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const runCheckoutApplyCouponsTest = () => {

View File

@ -15,11 +15,7 @@
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const config = require( 'config' );
const customerBilling = config.get( 'addresses.customer.billing' );

View File

@ -13,11 +13,7 @@
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, describe, beforeAll } = require( '@jest/globals' );
const config = require('config');

View File

@ -9,6 +9,11 @@ const {
uiUnblocked,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
const config = require( 'config' );
const simpleProductName = config.get( 'products.simple.name' );
const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';

View File

@ -9,6 +9,11 @@ const {
withRestApi,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
const customerEmailAddress = 'john.doe.test@example.com';
const runMyAccountCreateAccountTest = () => {

View File

@ -9,6 +9,11 @@ const {
uiUnblocked
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
let simplePostIdValue;
let orderNum;
const config = require( 'config' );

View File

@ -6,6 +6,11 @@ const {
shopper,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe } = require( '@jest/globals' );
const pages = [
['Orders', 'my-account/orders', shopper.goToOrders],
['Downloads', 'my-account/downloads', shopper.goToDownloads],

View File

@ -10,6 +10,11 @@
deleteAllEmailLogs,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll, afterAll } = require( '@jest/globals' );
let simplePostIdValue;
let orderId;
const config = require( 'config' );
@ -17,15 +22,6 @@ const simpleProductName = config.get( 'products.simple.name' );
const customerEmail = config.get( 'addresses.customer.billing.email' );
const storeName = 'WooCommerce Core E2E Test Suite';
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const runOrderEmailReceivingTest = () => {
describe('Shopper Order Email Receiving', () => {
beforeAll(async () => {

View File

@ -11,11 +11,7 @@ const {
/**
* External dependencies
*/
const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const { it, beforeAll } = require( '@jest/globals' );
const config = require( 'config' );
const simpleProductName = config.get( 'products.simple.name' );

View File

@ -6,9 +6,13 @@ const {
createSimpleProduct,
createVariableProduct,
createGroupedProduct,
uiUnblocked
uiUnblocked,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const { it, describe, beforeAll } = require( '@jest/globals' );
const config = require( 'config' );
// Variables for simple product

View File

@ -2,9 +2,7 @@ import { GroupedProduct } from '@woocommerce/api';
import { Factory } from 'fishery';
/**
* Creates a new factory for creating variable products.
* This does not include creating product variations.
* Instead, use `variationFactory()` for that.
* Creates a new factory for creating grouped products.
*
* @param {HTTPClient} httpClient The HTTP client we will give the repository.
* @return {AsyncFactory} The factory for creating models.