A few fixes for API daily test execution (#40180)

* Make check conditional

* Changelog

* Refactor based on PR feedback

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
This commit is contained in:
Jonathan Lane 2023-10-05 23:25:15 -07:00 committed by GitHub
parent 5c7698a9ad
commit 76cc38d7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
A few fixes for API daily test flakiness

View File

@ -171,7 +171,8 @@ test.describe.serial( 'Shipping zones API tests', () => {
const putResponseStateOnlyJSON = await putResponseStateOnly.json();
await expect( putResponseStateOnly.status() ).toEqual( 200 );
await expect( putResponseStateOnlyJSON ).toHaveLength(0);
// running on external hosts, this can be 0 or 1
expect([0, 1]).toContain(putResponseStateOnlyJSON.length);
} );