reorder admin tests to same order as home repo

This commit is contained in:
Ron Rennick 2021-08-24 14:41:47 -03:00
parent 596e378ffd
commit b22e328e86
4 changed files with 12 additions and 3 deletions

2
package-lock.json generated
View File

@ -9767,7 +9767,7 @@
}
},
"prettier": {
"version": "npm:prettier@1.19.1",
"version": "npm:wp-prettier@1.19.1",
"resolved": "https://registry.npmjs.org/wp-prettier/-/wp-prettier-1.19.1.tgz",
"integrity": "sha512-mqAC2r1NDmRjG+z3KCJ/i61tycKlmADIjxnDhQab+KBxSAGbF/W7/zwB2guy/ypIeKrrftNsIYkNZZQKf3vJcg==",
"dev": true

View File

@ -52,7 +52,12 @@ beforeAll(async () => {
// Prevent an error here causing tests to fail.
}
await trashExistingPosts();
// This sometimes returns a 401 in CI
try {
await trashExistingPosts();
} catch ( error ) {
console.log( 'Error trashing posts' );
}
await withRestApi.deleteAllProducts();
await withRestApi.deleteAllCoupons();
await withRestApi.deleteAllOrders();
@ -65,7 +70,11 @@ beforeAll(async () => {
// This is to ensure that each test ends with no user logged in.
afterAll(async () => {
// Reset the ready page to published to allow future test runs
await updateReadyPageStatus('publish');
try {
await updateReadyPageStatus('publish');
} catch ( error ) {
// Prevent an error here causing tests to fail.
}
const client = await page.target().createCDPSession();
await client.send('Network.clearBrowserCookies');