Required config from @woocommerce/e2e-environment

This commit is contained in:
jamelreid 2022-01-03 17:41:46 -05:00
parent 7284163ce5
commit 7ff7b14cb4
6 changed files with 8 additions and 9 deletions

View File

@ -19,7 +19,7 @@ const {
beforeAll, beforeAll,
} = require( '@jest/globals' ); } = require( '@jest/globals' );
const config = require('config'); const { config } = require( '@woocommerce/e2e-environment' );
const runCheckoutLoginAccountTest = () => { const runCheckoutLoginAccountTest = () => {
describe('Shopper Checkout Login Account', () => { describe('Shopper Checkout Login Account', () => {

View File

@ -6,7 +6,7 @@ const {
shopper, shopper,
createVariableProduct, createVariableProduct,
} = require( '@woocommerce/e2e-utils' ); } = require( '@woocommerce/e2e-utils' );
const config = require('config'); const { config } = require( '@woocommerce/e2e-environment' );
let variablePostIdValue; let variablePostIdValue;
@ -100,7 +100,7 @@ const runVariableProductUpdateTest = () => {
}); });
}); });
}; };
module.exports = runVariableProductUpdateTest; module.exports = runVariableProductUpdateTest;

View File

@ -1,5 +1,5 @@
import { HTTPClientFactory } from '@woocommerce/api'; import { HTTPClientFactory } from '@woocommerce/api';
const config = require( 'config' ); const { config } = require( '@woocommerce/e2e-environment' );
import { simpleProductFactory } from './factories/simple-product'; import { simpleProductFactory } from './factories/simple-product';
import { variableProductFactory } from './factories/variable-product'; import { variableProductFactory } from './factories/variable-product';
import { variationFactory } from './factories/variation'; import { variationFactory } from './factories/variation';

View File

@ -1,7 +1,7 @@
/** /**
* External dependencies * External dependencies
*/ */
const config = require( 'config' ); const { config } = require( '@woocommerce/e2e-environment' );
const baseUrl = config.get( 'url' ); const baseUrl = config.get( 'url' );
/** /**

View File

@ -1,7 +1,7 @@
/** /**
* External dependencies * External dependencies
*/ */
const config = require( 'config' ); const { config } = require( '@woocommerce/e2e-environment' );
/** /**
* Internal dependencies * Internal dependencies
@ -440,10 +440,9 @@ const merchant = {
*/ */
collapseAdminMenu: async ( collapse = true ) => { collapseAdminMenu: async ( collapse = true ) => {
const collapseButton = await page.$( '.folded #collapse-button' ); const collapseButton = await page.$( '.folded #collapse-button' );
if ( ( ! collapseButton ) == collapse ) { if ( ( ! collapse ) == collapseButton ) {
await collapseButton.click(); await collapseButton.click();
} }
}, },
}; };

View File

@ -2,7 +2,7 @@
* External dependencies * External dependencies
*/ */
const { pressKeyWithModifier } = require( '@wordpress/e2e-test-utils' ); const { pressKeyWithModifier } = require( '@wordpress/e2e-test-utils' );
const config = require( 'config' ); const { config } = require( '@woocommerce/e2e-environment' );
/** /**
* Internal dependencies * Internal dependencies