Update e2e tests.
This commit is contained in:
parent
8fdcaa0b55
commit
3ffc3de4c5
|
@ -22,13 +22,7 @@ const runInitiateWccomConnectionTest = () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can initiate WCCOM connection', async () => {
|
it('can initiate WCCOM connection', async () => {
|
||||||
await merchant.openExtensions();
|
await merchant.openHelper();
|
||||||
|
|
||||||
// Click on a tab to choose WooCommerce Subscriptions extension
|
|
||||||
await Promise.all([
|
|
||||||
expect(page).toClick('a.nav-tab', {text: "WooCommerce.com Subscriptions"}),
|
|
||||||
page.waitForNavigation({waitUntil: 'networkidle0'}),
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Click on Connect button to initiate a WCCOM connection
|
// Click on Connect button to initiate a WCCOM connection
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|
|
@ -41,6 +41,7 @@ export const WP_ADMIN_ANALYTICS_PAGES = WP_ADMIN_WC_HOME + '&path=%2Fanalytics%2
|
||||||
export const WP_ADMIN_WC_SETTINGS = WP_ADMIN_PLUGIN_PAGE + 'wc-settings&tab=';
|
export const WP_ADMIN_WC_SETTINGS = WP_ADMIN_PLUGIN_PAGE + 'wc-settings&tab=';
|
||||||
export const WP_ADMIN_NEW_SHIPPING_ZONE = WP_ADMIN_WC_SETTINGS + 'shipping&zone_id=new';
|
export const WP_ADMIN_NEW_SHIPPING_ZONE = WP_ADMIN_WC_SETTINGS + 'shipping&zone_id=new';
|
||||||
export const WP_ADMIN_WC_EXTENSIONS = WP_ADMIN_PLUGIN_PAGE + 'wc-addons';
|
export const WP_ADMIN_WC_EXTENSIONS = WP_ADMIN_PLUGIN_PAGE + 'wc-addons';
|
||||||
|
export const WP_ADMIN_WC_HELPER = WP_ADMIN_PLUGIN_PAGE + 'wc-addons§ion=helper';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shop pages.
|
* Shop pages.
|
||||||
|
|
|
@ -21,6 +21,7 @@ const {
|
||||||
WP_ADMIN_WC_HOME,
|
WP_ADMIN_WC_HOME,
|
||||||
WP_ADMIN_WC_SETTINGS,
|
WP_ADMIN_WC_SETTINGS,
|
||||||
WP_ADMIN_WC_EXTENSIONS,
|
WP_ADMIN_WC_EXTENSIONS,
|
||||||
|
WP_ADMIN_WC_HELPER,
|
||||||
WP_ADMIN_NEW_SHIPPING_ZONE,
|
WP_ADMIN_NEW_SHIPPING_ZONE,
|
||||||
WP_ADMIN_ANALYTICS_PAGES,
|
WP_ADMIN_ANALYTICS_PAGES,
|
||||||
WP_ADMIN_ALL_USERS_VIEW,
|
WP_ADMIN_ALL_USERS_VIEW,
|
||||||
|
@ -134,6 +135,12 @@ const merchant = {
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
openHelper: async () => {
|
||||||
|
await page.goto( WP_ADMIN_WC_HELPER, {
|
||||||
|
waitUntil: 'networkidle0',
|
||||||
|
} );
|
||||||
|
},
|
||||||
|
|
||||||
runSetupWizard: async () => {
|
runSetupWizard: async () => {
|
||||||
const setupWizard = IS_RETEST_MODE ? WP_ADMIN_SETUP_WIZARD : WP_ADMIN_WC_HOME;
|
const setupWizard = IS_RETEST_MODE ? WP_ADMIN_SETUP_WIZARD : WP_ADMIN_WC_HOME;
|
||||||
await page.goto( setupWizard, {
|
await page.goto( setupWizard, {
|
||||||
|
|
Loading…
Reference in New Issue