add Customers page E2E test (https://github.com/woocommerce/woocommerce-admin/pull/7645)
This commit is contained in:
parent
5fb4fb51a9
commit
09a285cb52
|
@ -1,5 +1,7 @@
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- Add Customers to analytics pages tested #7573
|
||||||
|
|
||||||
# 0.1.1
|
# 0.1.1
|
||||||
|
|
||||||
- Allow packages to be built in isolation. #7286
|
- Allow packages to be built in isolation. #7286
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
/**
|
||||||
|
* Internal dependencies
|
||||||
|
*/
|
||||||
|
import { Analytics } from './Analytics';
|
||||||
|
|
||||||
|
export class Customers extends Analytics {
|
||||||
|
// The analytics pages are `analytics-{slug}`.
|
||||||
|
url = 'wp-admin/admin.php?page=wc-admin&path=%2Fcustomers';
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import { Analytics } from '../../pages/Analytics';
|
import { Analytics } from '../../pages/Analytics';
|
||||||
|
import { Customers } from '../../pages/Customers';
|
||||||
import { Login } from '../../pages/Login';
|
import { Login } from '../../pages/Login';
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
@ -10,6 +11,7 @@ const { afterAll, beforeAll, describe, it } = require( '@jest/globals' );
|
||||||
const testAdminAnalyticsPages = () => {
|
const testAdminAnalyticsPages = () => {
|
||||||
describe( 'Analytics pages', () => {
|
describe( 'Analytics pages', () => {
|
||||||
const analyticsPage = new Analytics( page );
|
const analyticsPage = new Analytics( page );
|
||||||
|
const customersPage = new Customers( page );
|
||||||
const login = new Login( page );
|
const login = new Login( page );
|
||||||
|
|
||||||
beforeAll( async () => {
|
beforeAll( async () => {
|
||||||
|
@ -73,6 +75,11 @@ const testAdminAnalyticsPages = () => {
|
||||||
await analyticsPage.navigateToSection( 'settings' );
|
await analyticsPage.navigateToSection( 'settings' );
|
||||||
await analyticsPage.isDisplayed();
|
await analyticsPage.isDisplayed();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
it( 'A user can view the customers page without it crashing', async () => {
|
||||||
|
await customersPage.navigate();
|
||||||
|
await customersPage.isDisplayed();
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue