add backbone unblocking
This commit is contained in:
parent
b1c6337c49
commit
4208207e9c
|
@ -14,7 +14,7 @@ import {
|
|||
setCheckbox,
|
||||
unsetCheckbox,
|
||||
evalAndClick,
|
||||
clearAndFillInput,
|
||||
backboneUnblocked,
|
||||
} from './page-utils';
|
||||
import factories from './factories';
|
||||
|
||||
|
@ -437,7 +437,7 @@ const addProductToOrder = async ( orderId, productName ) => {
|
|||
await expect( page ).toClick( 'li[aria-selected="true"]' );
|
||||
await page.click( '.wc-backbone-modal-content #btn-ok' );
|
||||
|
||||
await uiUnblocked();
|
||||
await backboneUnblocked();
|
||||
|
||||
// Verify the product we added shows as a line item now
|
||||
await expect( page ).toMatchElement( '.wc-order-item-name', { text: productName } );
|
||||
|
|
|
@ -82,6 +82,13 @@ export const uiUnblocked = async () => {
|
|||
await page.waitForFunction( () => ! Boolean( document.querySelector( '.blockUI' ) ) );
|
||||
};
|
||||
|
||||
/**
|
||||
* Wait for backbone blocking to end.
|
||||
*/
|
||||
export const backboneUnblocked = async () => {
|
||||
await page.waitForFunction( () => ! Boolean( document.querySelector( '.wc-backbone-modal' ) ) );
|
||||
};
|
||||
|
||||
/**
|
||||
* Publish, verify that item was published. Trash, verify that item was trashed.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue