2021-04-22 10:42:50 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
const {
|
|
|
|
merchant,
|
|
|
|
} = require( '@woocommerce/e2e-utils' );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
const {
|
|
|
|
it,
|
|
|
|
describe,
|
|
|
|
beforeAll,
|
|
|
|
} = require( '@jest/globals' );
|
|
|
|
|
|
|
|
const runInitiateWccomConnectionTest = () => {
|
|
|
|
describe('Merchant > Initiate WCCOM Connection', () => {
|
|
|
|
beforeAll(async () => {
|
|
|
|
await merchant.login();
|
|
|
|
});
|
|
|
|
|
2021-08-30 20:22:23 +00:00
|
|
|
it.skip('can initiate WCCOM connection', async () => {
|
2021-11-16 13:23:21 +00:00
|
|
|
await merchant.openExtensions();
|
|
|
|
|
|
|
|
// 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' } ),
|
|
|
|
] );
|
2021-04-22 10:42:50 +00:00
|
|
|
|
|
|
|
// Click on Connect button to initiate a WCCOM connection
|
|
|
|
await Promise.all([
|
|
|
|
expect(page).toClick('.button-helper-connect'),
|
|
|
|
page.waitForNavigation({waitUntil: 'networkidle0'}),
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Verify that you see a login page for connecting WCCOM account
|
|
|
|
await expect(page).toMatchElement('div.login');
|
|
|
|
await expect(page).toMatchElement('input#usernameOrEmail');
|
|
|
|
await expect(page).toMatchElement('button.button', {text: "Continue"});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = runInitiateWccomConnectionTest;
|