Use more generic selectors for HPOS<>Posts compatibility (#36284)

* Use more generic search selector for edit screen.

* Use more generic heading text for post<>HPOS compat.
This commit is contained in:
Vedanshu Jain 2023-01-05 23:56:08 +05:30 committed by GitHub
parent 677896c304
commit 4c236bdc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Minor change in E2E selectory.

View File

@ -46,8 +46,8 @@ test.describe( 'Edit order', () => {
await page.goto( `wp-admin/post.php?post=${ orderId }&action=edit` );
// make sure we're on the order details page
await expect( page.locator( 'h1.components-text' ) ).toContainText(
'Edit Order'
await expect( page.locator( 'h1.wp-heading-inline' ) ).toContainText(
/Edit [oO]rder/
);
} );

View File

@ -140,7 +140,7 @@ test.describe( 'WooCommerce Orders > Search orders', () => {
test( 'can search for order by order id', async ( { page } ) => {
await page.goto( 'wp-admin/edit.php?post_type=shop_order' );
await page.fill( '#post-search-input', orderId.toString() );
await page.fill( '[type=search][name=s]', orderId.toString() );
await page.click( '#search-submit' );
await expect(
@ -153,7 +153,7 @@ test.describe( 'WooCommerce Orders > Search orders', () => {
page,
} ) => {
await page.goto( 'wp-admin/edit.php?post_type=shop_order' );
await page.fill( '#post-search-input', queries[ i ][ 0 ] );
await page.fill( '[type=search][name=s]', queries[ i ][ 0 ] );
await page.click( '#search-submit' );
await expect(