woocommerce/tests/e2e/core-tests/specs/merchant/wp-admin-extensions-connect...

42 lines
1.0 KiB
JavaScript
Raw Normal View History

/* eslint-disable jest/no-export, jest/no-disabled-tests */
/**
* 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();
});
it('can initiate WCCOM connection', async () => {
2021-07-29 13:52:30 +00:00
await merchant.openHelper();
// 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;