Fix e2e tests due to duplicate rows when clearing customizations (#44454)
* Fix e2e tests due to duplicate rows when clearing customizations * Add changelog entry
This commit is contained in:
parent
8b4efc9c03
commit
f65a7e45a5
|
@ -6,7 +6,7 @@ import { BLOCK_THEME_WITH_TEMPLATES_SLUG } from '@woocommerce/e2e-utils';
|
|||
|
||||
const testData = {
|
||||
permalink: '/product/belt',
|
||||
templateName: 'Product: Belt',
|
||||
templateName: 'Single Product Belt',
|
||||
templatePath: 'single-product-belt',
|
||||
templateType: 'wp_template',
|
||||
};
|
||||
|
|
|
@ -373,8 +373,11 @@ export class EditorUtils {
|
|||
}
|
||||
|
||||
async revertTemplateCreation( templateName: string ) {
|
||||
const templateRow = this.page.getByRole( 'row', {
|
||||
const templateRow = this.page.getByRole( 'row' ).filter( {
|
||||
has: this.page.getByRole( 'heading', {
|
||||
name: templateName,
|
||||
exact: true,
|
||||
} ),
|
||||
} );
|
||||
templateRow.getByRole( 'button', { name: 'Actions' } ).click();
|
||||
await this.page
|
||||
|
@ -394,8 +397,11 @@ export class EditorUtils {
|
|||
}
|
||||
|
||||
async revertTemplateCustomizations( templateName: string ) {
|
||||
const templateRow = this.page.getByRole( 'row', {
|
||||
const templateRow = this.page.getByRole( 'row' ).filter( {
|
||||
has: this.page.getByRole( 'heading', {
|
||||
name: templateName,
|
||||
exact: true,
|
||||
} ),
|
||||
} );
|
||||
templateRow.getByRole( 'button', { name: 'Actions' } ).click();
|
||||
await this.page
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
Comment: Fix e2e tests due to duplicate rows when clearing customizations.
|
||||
|
Loading…
Reference in New Issue