update api-core-tests to handle extenstions that add shipping (#37239)
This commit is contained in:
parent
185cd3dcaa
commit
e74abeffe4
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: update
|
||||||
|
|
||||||
|
Update playwright api-core-tests to handle cases where extensions add to shipping methods
|
|
@ -135,7 +135,7 @@ test.describe('Payment Gateways API tests', () => {
|
||||||
"default": "",
|
"default": "",
|
||||||
"tip": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
|
"tip": "If COD is only available for certain methods, set it up here. Leave blank to enable for all methods.",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"options": {
|
"options": expect.objectContaining({
|
||||||
"Flat rate": {
|
"Flat rate": {
|
||||||
"flat_rate": "Any "Flat rate" method"
|
"flat_rate": "Any "Flat rate" method"
|
||||||
},
|
},
|
||||||
|
@ -145,7 +145,7 @@ test.describe('Payment Gateways API tests', () => {
|
||||||
"Local pickup": {
|
"Local pickup": {
|
||||||
"local_pickup": "Any "Local pickup" method"
|
"local_pickup": "Any "Local pickup" method"
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
"enable_for_virtual": {
|
"enable_for_virtual": {
|
||||||
"id": "enable_for_virtual",
|
"id": "enable_for_virtual",
|
||||||
|
|
|
@ -66,7 +66,7 @@ test.describe('Shipping methods API tests', () => {
|
||||||
const responseJSON = await response.json();
|
const responseJSON = await response.json();
|
||||||
expect(response.status()).toEqual(200);
|
expect(response.status()).toEqual(200);
|
||||||
expect(Array.isArray(responseJSON)).toBe(true);
|
expect(Array.isArray(responseJSON)).toBe(true);
|
||||||
expect(responseJSON.length).toEqual(3);
|
expect(responseJSON.length).toBeGreaterThanOrEqual(3);
|
||||||
expect(responseJSON[0].id).toEqual("flat_rate");
|
expect(responseJSON[0].id).toEqual("flat_rate");
|
||||||
expect(responseJSON[1].id).toEqual("free_shipping");
|
expect(responseJSON[1].id).toEqual("free_shipping");
|
||||||
expect(responseJSON[2].id).toEqual("local_pickup");
|
expect(responseJSON[2].id).toEqual("local_pickup");
|
||||||
|
|
Loading…
Reference in New Issue