update per feedback, add spacing, remove unused function
This commit is contained in:
parent
8cbb606c7e
commit
76332ec0c8
|
@ -30,26 +30,6 @@ const VirtualProductName = 'Virtual Product Name';
|
||||||
const NonVirtualProductName = 'Non-Virtual Product Name';
|
const NonVirtualProductName = 'Non-Virtual Product Name';
|
||||||
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
|
||||||
|
|
||||||
const verifyPublishAndTrash = async () => {
|
|
||||||
// Wait for auto save
|
|
||||||
await page.waitFor( 2000 );
|
|
||||||
|
|
||||||
// Publish product
|
|
||||||
await expect( page ).toClick( '#publish' );
|
|
||||||
await page.waitForSelector( '.updated.notice', { text: 'Product published.' } );
|
|
||||||
|
|
||||||
// Verify
|
|
||||||
await expect( page ).toMatchElement( '.updated.notice', { text: 'Product published.' } );
|
|
||||||
await page.waitForSelector( 'a', { text: 'Move to Trash' } );
|
|
||||||
|
|
||||||
// Trash product
|
|
||||||
await expect( page ).toClick( 'a', { text: 'Move to Trash' } );
|
|
||||||
await page.waitForSelector( '.updated.notice', { text: '1 product moved to the Trash.' } );
|
|
||||||
|
|
||||||
// Verify
|
|
||||||
await expect( page ).toMatchElement( '.updated.notice', { text: '1 product moved to the Trash.' } );
|
|
||||||
};
|
|
||||||
|
|
||||||
const openNewProductAndVerify = async () => {
|
const openNewProductAndVerify = async () => {
|
||||||
// Go to "add product" page
|
// Go to "add product" page
|
||||||
await merchant.openNewProduct();
|
await merchant.openNewProduct();
|
||||||
|
@ -221,7 +201,7 @@ const runAddVariableProductTest = () => {
|
||||||
|
|
||||||
await page.focus('button.save-variation-changes');
|
await page.focus('button.save-variation-changes');
|
||||||
await expect(page).toClick('button.save-variation-changes', {text: 'Save changes'});
|
await expect(page).toClick('button.save-variation-changes', {text: 'Save changes'});
|
||||||
// @todo: add one or more tests to verify changes were saved
|
// @todo: https://github.com/woocommerce/woocommerce/issues/30580
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ const updateReadyPageStatus = async ( status ) => {
|
||||||
if ( getPostsResponse.data && getPostsResponse.data.length > 0 ) {
|
if ( getPostsResponse.data && getPostsResponse.data.length > 0 ) {
|
||||||
const pageId = getPostsResponse.data[0].id;
|
const pageId = getPostsResponse.data[0].id;
|
||||||
// Update the page to the new status
|
// Update the page to the new status
|
||||||
await client.put(`${wpPagesEndpoint}/${pageId}`, { 'status': status } );
|
await client.post( `${wpPagesEndpoint}/${pageId}`, { 'status': status } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue