Merge branch 'trunk' into fix/31469
This commit is contained in:
commit
2a066286e4
|
@ -13,10 +13,10 @@ jobs:
|
|||
steps:
|
||||
- name: Create dirs.
|
||||
run: |
|
||||
mkdir -p code/woocommerce
|
||||
mkdir -p package/woocommerce
|
||||
mkdir -p tmp/woocommerce
|
||||
mkdir -p node_modules
|
||||
mkdir -p code/woocommerce
|
||||
mkdir -p package/woocommerce
|
||||
mkdir -p tmp/woocommerce
|
||||
mkdir -p node_modules
|
||||
|
||||
- name: Checkout code.
|
||||
uses: actions/checkout@v2
|
||||
|
@ -32,10 +32,10 @@ jobs:
|
|||
pnpm nx composer-install-no-dev woocommerce
|
||||
pnpm nx build-assets woocommerce
|
||||
pnpm install jest
|
||||
|
||||
|
||||
- name: Run smoke test.
|
||||
working-directory: package/woocommerce/plugins/woocommerce
|
||||
if: steps.installation.outcome == 'success'
|
||||
if: always()
|
||||
env:
|
||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: Post Smoke tests results comment on PR
|
||||
if: always()
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
env:
|
||||
TITLE: 'Smoke Test Results'
|
||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||
with:
|
||||
|
@ -66,7 +66,7 @@ jobs:
|
|||
|
||||
- name: Run E2E tests.
|
||||
working-directory: package/woocommerce/plugins/woocommerce
|
||||
if: steps.installation.outcome == 'success'
|
||||
if: always()
|
||||
env:
|
||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||
|
@ -86,7 +86,7 @@ jobs:
|
|||
- name: Post E2E tests results comment on PR
|
||||
if: always()
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
env:
|
||||
TITLE: 'E2E Test Results'
|
||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||
with:
|
||||
|
@ -96,7 +96,7 @@ jobs:
|
|||
await script({github, context})
|
||||
|
||||
- name: Remove label from pull request.
|
||||
if: "${{ contains(github.event.pull_request.labels.*.name, 'run: smoke tests') }}"
|
||||
if: always() && ${{ contains(github.event.label.name, format( 'run{0} smoke tests', ':') ) }}
|
||||
uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Unreleased
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed the node-config dependency
|
||||
|
||||
## Fixed
|
||||
- Moved `merchant.login()` out of `beforeAll()` block and into test body for retried runs.
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
"dependencies": {
|
||||
"@jest/globals": "^26.4.2",
|
||||
"@wordpress/deprecated": "^3.2.3",
|
||||
"config": "3.3.3",
|
||||
"faker": "^5.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@woocommerce/api": "^0.2.0",
|
||||
"@woocommerce/e2e-utils": "^0.1.6"
|
||||
"@woocommerce/e2e-utils": "^0.1.6",
|
||||
"@woocommerce/e2e-environment": "^0.2.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -12,7 +12,7 @@ const {
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
import deprecated from '@wordpress/deprecated';
|
||||
const {
|
||||
it,
|
||||
|
|
|
@ -6,7 +6,7 @@ const { HTTPClientFactory, Coupon } = require( '@woocommerce/api' );
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const { it, describe, beforeAll } = require( '@jest/globals' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ const { HTTPClientFactory, ExternalProduct } = require( '@woocommerce/api' );
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const { it, describe, beforeAll } = require( '@jest/globals' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@ const {
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const { it, describe, beforeAll } = require( '@jest/globals' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ const { HTTPClientFactory, Order } = require( '@woocommerce/api' );
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const { it, describe, beforeAll } = require( '@jest/globals' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ const { HTTPClientFactory } = require( '@woocommerce/api' );
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const { it, describe, beforeAll } = require( '@jest/globals' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,7 @@ const { HTTPClientFactory, VariableProduct, ProductVariation } = require( '@wooc
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const {
|
||||
it,
|
||||
describe,
|
||||
|
|
|
@ -11,8 +11,8 @@ const {
|
|||
utils,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const discountedPrice = simpleProductPrice - 5.00;
|
||||
|
||||
const couponDialogMessage = 'Enter a coupon code to apply. Discounts are applied to line totals, before taxes.';
|
||||
|
|
|
@ -9,9 +9,9 @@ const {
|
|||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
// TODO create a function for the logic below getConfigSimpleProduct(), see: https://github.com/woocommerce/woocommerce/issues/29072
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const simpleProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99';
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
|
||||
const runMerchantOrdersCustomerPaymentPage = () => {
|
||||
let orderId;
|
||||
|
|
|
@ -9,10 +9,10 @@ const {
|
|||
deleteAllEmailLogs,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const customerEmail = config.get( 'addresses.customer.billing.email' );
|
||||
const adminEmail = config.has( 'users.admin.email' ) ? config.get( 'users.admin.email' ) : 'admin@woocommercecoree2etestsuite.com';
|
||||
const storeName = 'WooCommerce Core E2E Test Suite';
|
||||
const adminEmail = config.get( 'users.admin.email', 'admin@woocommercecoree2etestsuite.com' );
|
||||
const storeName = config.get( 'storeName', 'WooCommerce Core E2E Test Suite' );
|
||||
|
||||
let orderId;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ const {
|
|||
withRestApi,
|
||||
AdminEdit,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const {
|
||||
HTTPClientFactory,
|
||||
VariableProduct,
|
||||
|
|
|
@ -12,8 +12,8 @@ const {
|
|||
clickAndWaitForSelector,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
|
||||
const runRefundOrderTest = () => {
|
||||
describe('WooCommerce Orders > Refund an order', () => {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
|
||||
const {
|
||||
merchant,
|
||||
withRestApi,
|
||||
|
|
|
@ -24,11 +24,11 @@ const {
|
|||
it,
|
||||
describe,
|
||||
} = require( '@jest/globals' );
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
const VirtualProductName = 'Virtual Product Name';
|
||||
const NonVirtualProductName = 'Non-Virtual Product Name';
|
||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
|
||||
const openNewProductAndVerify = async () => {
|
||||
// Go to "add product" page
|
||||
|
|
|
@ -8,9 +8,9 @@ const {
|
|||
createSimpleProduct
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
|
||||
const runProductSearchTest = () => {
|
||||
describe('Products > Search and View a product', () => {
|
||||
|
|
|
@ -21,8 +21,8 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const simpleProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99';
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const california = 'state:US:CA';
|
||||
const sanFranciscoZIP = '94107';
|
||||
const shippingZoneNameUS = 'US with Flat rate';
|
||||
|
|
|
@ -18,8 +18,8 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const firstProductPrice = config.has( 'products.simple.price' ) ? config.get( 'products.simple.price' ) : '9.99';
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const firstProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const secondProductPrice = '4.99';
|
||||
const fourProductPrice = firstProductPrice * 4;
|
||||
var twoProductsPrice = (+firstProductPrice) + (+secondProductPrice);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
afterAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
|
||||
const runCartRedirectionTest = () => {
|
||||
|
|
|
@ -17,9 +17,9 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const singleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const twoProductPrice = singleProductPrice * 2;
|
||||
|
||||
const runCartPageTest = () => {
|
||||
|
|
|
@ -21,7 +21,7 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const customerBilling = config.get( 'addresses.customer.billing' );
|
||||
|
||||
const runCheckoutCreateAccountTest = () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require('config');
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
const runCheckoutLoginAccountTest = () => {
|
||||
describe('Shopper Checkout Login Account', () => {
|
||||
|
|
|
@ -9,9 +9,9 @@ const {
|
|||
uiUnblocked,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const singleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const twoProductPrice = singleProductPrice * 2;
|
||||
const threeProductPrice = singleProductPrice * 3;
|
||||
const fourProductPrice = singleProductPrice * 4;
|
||||
|
|
|
@ -11,7 +11,7 @@ const {
|
|||
|
||||
let simplePostIdValue;
|
||||
let orderNum;
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
|
||||
const runMyAccountPayOrderTest = () => {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
let simplePostIdValue;
|
||||
let orderId;
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const customerEmail = config.get( 'addresses.customer.billing.email' );
|
||||
const storeName = 'WooCommerce Core E2E Test Suite';
|
||||
|
|
|
@ -17,11 +17,11 @@ const {
|
|||
beforeAll,
|
||||
} = require( '@jest/globals' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
const singleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const singleProductPrice2 = config.has('products.simple.price') ? '1' + singleProductPrice : '19.99';
|
||||
const singleProductPrice3 = config.has('products.simple.price') ? '2' + singleProductPrice : '29.99';
|
||||
const singleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const singleProductPrice2 = '1' + singleProductPrice;
|
||||
const singleProductPrice3 = '2' + singleProductPrice;
|
||||
const clothing = 'Clothing';
|
||||
const audio = 'Audio';
|
||||
const hardware = 'Hardware';
|
||||
|
|
|
@ -9,7 +9,7 @@ const {
|
|||
uiUnblocked
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
// Variables for simple product
|
||||
const simpleProductName = config.get( 'products.simple.name' );
|
||||
|
@ -20,7 +20,7 @@ const defaultVariableProduct = config.get( 'products.variable' );
|
|||
let variableProductId;
|
||||
|
||||
// Variables for grouped product
|
||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||
const simpleProductPrice = config.get( 'products.simple.price', '9.99' );
|
||||
const simple1 = {
|
||||
name: simpleProductName + ' 1',
|
||||
regularPrice: simpleProductPrice
|
||||
|
|
|
@ -6,7 +6,7 @@ const {
|
|||
shopper,
|
||||
createVariableProduct,
|
||||
} = require( '@woocommerce/e2e-utils' );
|
||||
const config = require('config');
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
let variablePostIdValue;
|
||||
|
||||
|
@ -100,7 +100,7 @@ const runVariableProductUpdateTest = () => {
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
module.exports = runVariableProductUpdateTest;
|
||||
|
|
|
@ -6,10 +6,15 @@
|
|||
|
||||
## Added
|
||||
|
||||
- Added a `config` export to the `@woocommerce/e2e-environment` package that has all data and methods of the [config](https://github.com/lorenwest/node-config) package
|
||||
- it provides its own `get()` method that accepts an optional default parameter to be used if the property is not found in the config file.
|
||||
|
||||
## Added
|
||||
|
||||
- Added `post-results-to-github-pr.js` to post smoke test results to a GitHub PR.
|
||||
- Added jest flags to generate a json test report
|
||||
- Added more entries to `default.json`
|
||||
|
||||
|
||||
## Added
|
||||
|
||||
- Added `await` for every call to `shopper.logout`
|
||||
|
|
|
@ -98,6 +98,22 @@ The E2E environment has the following methods to let us control Jest's overall b
|
|||
E2E_RETRY_TIMES=2 pnpx wc-e2e test:e2e
|
||||
```
|
||||
|
||||
### Default Environment Configurations
|
||||
|
||||
The E2E environment exports a config object which provides all the functionality of the [config](https://www.npmjs.com/package/config) package along with extending the `get` method to accept an optional second argument that will be used if the property is not found in the config file.
|
||||
|
||||
```js
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
// 'users.admin.email' doesn't exist
|
||||
const adminEmail = config.get( 'users.admin.email', 'admin@woocommercecoree2etestsuite.com' );
|
||||
|
||||
console.log( adminEmail );
|
||||
// admin@woocommercecoree2etestsuite.com
|
||||
```
|
||||
|
||||
**Note**: If the default parameter is not found and no optional parameter is provided, an error will be thrown.
|
||||
|
||||
#### Test Screenshots
|
||||
|
||||
The test sequencer provides a screenshot function for test failures. To enable screenshots on test failure use
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* External Dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
|
||||
/**
|
||||
* Since the 'config' object is not extensible, we create an empty 'e2eConfig' object and map
|
||||
* its prototype to the 'config' object. This allows us to extend the new 'e2eConfig' object
|
||||
* while still having access to all the data and methods of 'config'
|
||||
*/
|
||||
const e2eConfig = Object.create( config );
|
||||
|
||||
/**
|
||||
*
|
||||
* @param property { string } - the property to be fetched from the config file
|
||||
* @param defaultValue { string | number | boolean | null } - default value if 'property' is not found
|
||||
* @returns { string | number | boolean }
|
||||
* @throws Error
|
||||
*/
|
||||
e2eConfig.get = ( property, defaultValue = null ) => {
|
||||
if ( config.has( property ) ) {
|
||||
return config.get( property );
|
||||
} else if ( defaultValue ) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
`Configuration property "${ property }" is not defined and no defaultValue has been provided`
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = e2eConfig;
|
|
@ -1,6 +1,7 @@
|
|||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
const config = require('./config');
|
||||
const jestConfig = require( './jest.config' );
|
||||
const jestPuppeteerConfig = require( './jest-puppeteer.config' );
|
||||
const jestobjectConfig = require('./jest-object.config');
|
||||
|
@ -12,6 +13,7 @@ const {
|
|||
} = require( './use-config' );
|
||||
|
||||
module.exports = {
|
||||
config,
|
||||
jestConfig,
|
||||
...jestobjectConfig,
|
||||
jestPuppeteerConfig,
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
# Unreleased
|
||||
## Changes
|
||||
|
||||
- Removed node-config dependency
|
||||
- Added @woocommerce/e2e-environment peerDependency
|
||||
- Updated the package to use the custom node-config object from @woocommerce/e2e-environment
|
||||
|
||||
## Fixed
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
"@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50",
|
||||
"@wordpress/deprecated": "^3.2.3",
|
||||
"@wordpress/e2e-test-utils": "^4.16.1",
|
||||
"config": "3.3.3",
|
||||
"faker": "^5.1.0",
|
||||
"fishery": "^1.2.0"
|
||||
},
|
||||
|
@ -35,7 +34,8 @@
|
|||
"eslint": "^8.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@woocommerce/api": "^0.2.0"
|
||||
"@woocommerce/api": "^0.2.0",
|
||||
"@woocommerce/e2e-environment": "^0.2.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { HTTPClientFactory } from '@woocommerce/api';
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
import { simpleProductFactory } from './factories/simple-product';
|
||||
import { variableProductFactory } from './factories/variable-product';
|
||||
import { variationFactory } from './factories/variation';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
const baseUrl = config.get( 'url' );
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -440,10 +440,9 @@ const merchant = {
|
|||
*/
|
||||
collapseAdminMenu: async ( collapse = true ) => {
|
||||
const collapseButton = await page.$( '.folded #collapse-button' );
|
||||
if ( ( ! collapseButton ) == collapse ) {
|
||||
if ( ( ! collapse ) == collapseButton ) {
|
||||
await collapseButton.click();
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
const { pressKeyWithModifier } = require( '@wordpress/e2e-test-utils' );
|
||||
const config = require( 'config' );
|
||||
const { config } = require( '@woocommerce/e2e-environment' );
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -102,12 +102,10 @@ importers:
|
|||
specifiers:
|
||||
'@jest/globals': ^26.4.2
|
||||
'@wordpress/deprecated': ^3.2.3
|
||||
config: 3.3.3
|
||||
faker: ^5.1.0
|
||||
dependencies:
|
||||
'@jest/globals': 26.6.2
|
||||
'@wordpress/deprecated': 3.2.3
|
||||
config: 3.3.3
|
||||
faker: 5.5.3
|
||||
|
||||
packages/js/e2e-environment:
|
||||
|
@ -195,7 +193,6 @@ importers:
|
|||
'@wordpress/browserslist-config': ^4.1.0
|
||||
'@wordpress/deprecated': ^3.2.3
|
||||
'@wordpress/e2e-test-utils': ^4.16.1
|
||||
config: 3.3.3
|
||||
eslint: ^8.1.0
|
||||
faker: ^5.1.0
|
||||
fishery: ^1.2.0
|
||||
|
@ -203,7 +200,6 @@ importers:
|
|||
'@automattic/puppeteer-utils': github.com/Automattic/puppeteer-utils/0f3ec50
|
||||
'@wordpress/deprecated': 3.2.3
|
||||
'@wordpress/e2e-test-utils': 4.16.1_jest@27.3.1
|
||||
config: 3.3.3
|
||||
faker: 5.5.3
|
||||
fishery: 1.4.0
|
||||
devDependencies:
|
||||
|
@ -7549,6 +7545,7 @@ packages:
|
|||
engines: {node: '>= 6.0.0'}
|
||||
dependencies:
|
||||
json5: 2.2.0
|
||||
dev: true
|
||||
|
||||
/config/3.3.6:
|
||||
resolution: {integrity: sha512-Hj5916C5HFawjYJat1epbyY2PlAgLpBtDUlr0MxGLgo3p5+7kylyvnRY18PqJHgnNWXcdd0eWDemT7eYWuFgwg==}
|
||||
|
|
Loading…
Reference in New Issue