2022-02-11 15:08:45 +00:00
|
|
|
import {
|
|
|
|
SHIPPING_ZONE_CHECKBOX,
|
|
|
|
SHIPPING_ZONE_NAME
|
|
|
|
} from "../../elements/shipping/shipping-zones-list";
|
|
|
|
import { urlList } from "../../fixtures/urlList";
|
|
|
|
|
|
|
|
export function enterAndSelectShippings(
|
|
|
|
shippingIds,
|
|
|
|
actionFunction = selectShippingZone
|
|
|
|
) {
|
2022-03-28 09:52:06 +00:00
|
|
|
cy.addAliasToGraphRequest("ShippingZones")
|
|
|
|
.visit(urlList.shippingMethods)
|
|
|
|
.findElementsAndMakeActionOnTable({
|
|
|
|
elementsGraphqlAlias: "ShippingZones",
|
|
|
|
elementsName: "shippingZones",
|
|
|
|
elementsIds: shippingIds,
|
|
|
|
actionFunction
|
2022-02-11 15:08:45 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function selectShippingZone(id) {
|
|
|
|
cy.get(SHIPPING_ZONE_CHECKBOX(id)).click();
|
|
|
|
}
|
|
|
|
|
|
|
|
export function enterShippingZone(id) {
|
|
|
|
cy.get(SHIPPING_ZONE_NAME(id)).click();
|
|
|
|
}
|