2916 fix cypress tags (#2927)
* part one * part two * part three * part four, changes menage to manage * done
This commit is contained in:
parent
bf2a2035d3
commit
0d7af543ac
24 changed files with 112 additions and 108 deletions
|
@ -130,7 +130,7 @@ describe("As an admin I want to manage categories", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to remove product from category. TC: SALEOR_0204",
|
"should be able to remove product from category. TC: SALEOR_0204",
|
||||||
{ tags: ["@category", "@allEnv"] },
|
{ tags: ["@category", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(categoryDetailsUrl(category.id))
|
cy.visit(categoryDetailsUrl(category.id))
|
||||||
.get(CATEGORY_DETAILS.productsTab)
|
.get(CATEGORY_DETAILS.productsTab)
|
||||||
|
@ -155,7 +155,7 @@ describe("As an admin I want to manage categories", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to enter category details page. TC: SALEOR_0205",
|
"should be able to enter category details page. TC: SALEOR_0205",
|
||||||
{ tags: ["@category", "@allEnv"] },
|
{ tags: ["@category", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.categories)
|
cy.visit(urlList.categories)
|
||||||
.get(SHARED_ELEMENTS.searchInput)
|
.get(SHARED_ELEMENTS.searchInput)
|
||||||
|
@ -214,7 +214,7 @@ describe("As an admin I want to manage categories", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to delete several categories on categories list page. TC: SALEOR_0209",
|
"should be able to delete several categories on categories list page. TC: SALEOR_0209",
|
||||||
{ tags: ["@category", "@allEnv"] },
|
{ tags: ["@category", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const firstCategoryName = `${startsWith}${faker.datatype.number()}`;
|
const firstCategoryName = `${startsWith}${faker.datatype.number()}`;
|
||||||
const secondCategoryName = `${startsWith}${faker.datatype.number()}`;
|
const secondCategoryName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
|
@ -190,7 +190,7 @@ describe("As a admin I want to use enabled gift card in checkout", () => {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
xit(
|
it(
|
||||||
"should be able to enable several gift cards on gift card list page and use it in checkout. TC: SALEOR_1012",
|
"should be able to enable several gift cards on gift card list page and use it in checkout. TC: SALEOR_1012",
|
||||||
{ tags: ["@giftCard", "@allEnv"] },
|
{ tags: ["@giftCard", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
|
|
|
@ -96,7 +96,7 @@ describe("As an unlogged customer I want to order physical and digital products"
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should purchase multiple products with all product types as unlogged customer. TC: SALEOR_0404",
|
"should purchase multiple products with all product types as unlogged customer. TC: SALEOR_0404",
|
||||||
{ tags: ["@checkout", "@allEnv"] },
|
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
let checkout;
|
let checkout;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ describe("As an admin I want to create content attribute", () => {
|
||||||
attributeReferenceType.forEach(entityType => {
|
attributeReferenceType.forEach(entityType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create reference to ${entityType.type} attribute. TC:${entityType.testCase}`,
|
`should be able to create reference to ${entityType.type} attribute. TC:${entityType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeType = "REFERENCE";
|
const attributeType = "REFERENCE";
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
@ -110,7 +110,7 @@ describe("As an admin I want to create content attribute", () => {
|
||||||
attributeNumericType.forEach(numericSystemType => {
|
attributeNumericType.forEach(numericSystemType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC: ${numericSystemType.testCase}`,
|
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC: ${numericSystemType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeType = "NUMERIC";
|
const attributeType = "NUMERIC";
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
@ -135,7 +135,7 @@ describe("As an admin I want to create content attribute", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create attribute without require value TC:SALEOR_0522",
|
"should be able to create attribute without require value TC:SALEOR_0522",
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeType = "BOOLEAN";
|
const attributeType = "BOOLEAN";
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
|
@ -46,7 +46,7 @@ xdescribe("Tests for using attributes in filters", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should use attribute as filter",
|
"should use attribute as filter. TC: SALEOR_0601",
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
updateAttribute({
|
updateAttribute({
|
||||||
|
@ -63,7 +63,7 @@ xdescribe("Tests for using attributes in filters", () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should remove attribute from filters",
|
"should remove attribute from filters. TC: SALEOR_0602",
|
||||||
{ tags: ["@attribute", "@allEnv"] },
|
{ tags: ["@attribute", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
updateAttribute({
|
updateAttribute({
|
||||||
|
|
|
@ -92,7 +92,7 @@ describe("Channels", () => {
|
||||||
.get(PRODUCTS_LIST.productsNames)
|
.get(PRODUCTS_LIST.productsNames)
|
||||||
.first()
|
.first()
|
||||||
.click()
|
.click()
|
||||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(SELECT_CHANNELS_TO_ASSIGN.listOfChannels)
|
.get(SELECT_CHANNELS_TO_ASSIGN.listOfChannels)
|
||||||
.contains(randomChannel);
|
.contains(randomChannel);
|
||||||
|
|
|
@ -57,7 +57,7 @@ describe("Tests on inactive channel", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should not be possible to add products to order with inactive channel. TC: SALEOR_0706",
|
"should not be possible to add products to order with inactive channel. TC: SALEOR_0706",
|
||||||
{ tags: ["@channel", "@allEnv"] },
|
{ tags: ["@channel", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.orders)
|
cy.visit(urlList.orders)
|
||||||
.get(ORDERS_SELECTORS.createOrder)
|
.get(ORDERS_SELECTORS.createOrder)
|
||||||
|
|
|
@ -89,7 +89,7 @@ describe("Tests for customer", () => {
|
||||||
|
|
||||||
createCustomer(email, randomName).then(({ user }) => {
|
createCustomer(email, randomName).then(({ user }) => {
|
||||||
cy.visit(customerDetailsUrl(user.id))
|
cy.visit(customerDetailsUrl(user.id))
|
||||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||||
.click()
|
.click()
|
||||||
.get(CUSTOMER_DETAILS.addAddressButton)
|
.get(CUSTOMER_DETAILS.addAddressButton)
|
||||||
.click()
|
.click()
|
||||||
|
@ -113,7 +113,7 @@ describe("Tests for customer", () => {
|
||||||
|
|
||||||
createCustomer(email, randomName, address).then(({ user }) => {
|
createCustomer(email, randomName, address).then(({ user }) => {
|
||||||
cy.visit(customerDetailsUrl(user.id))
|
cy.visit(customerDetailsUrl(user.id))
|
||||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||||
.click()
|
.click()
|
||||||
.waitForProgressBarToNotExist()
|
.waitForProgressBarToNotExist()
|
||||||
.get(BUTTON_SELECTORS.showMoreButton)
|
.get(BUTTON_SELECTORS.showMoreButton)
|
||||||
|
@ -148,7 +148,7 @@ describe("Tests for customer", () => {
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.visit(customerDetailsUrl(user.id))
|
cy.visit(customerDetailsUrl(user.id))
|
||||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||||
.click()
|
.click()
|
||||||
.waitForProgressBarToNotExist()
|
.waitForProgressBarToNotExist()
|
||||||
.get(BUTTON_SELECTORS.showMoreButton)
|
.get(BUTTON_SELECTORS.showMoreButton)
|
||||||
|
@ -186,7 +186,7 @@ describe("Tests for customer", () => {
|
||||||
|
|
||||||
createCustomer(email, randomName, address).then(({ user }) => {
|
createCustomer(email, randomName, address).then(({ user }) => {
|
||||||
cy.visit(customerDetailsUrl(user.id))
|
cy.visit(customerDetailsUrl(user.id))
|
||||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||||
.click()
|
.click()
|
||||||
.get(BUTTON_SELECTORS.showMoreButton)
|
.get(BUTTON_SELECTORS.showMoreButton)
|
||||||
.should("be.enabled")
|
.should("be.enabled")
|
||||||
|
|
|
@ -85,7 +85,7 @@ describe("As an admin I want to manage attributes in product types", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to remove variant attribute from product type. TC: SALEOR_1506",
|
"should be able to remove variant attribute from product type. TC: SALEOR_1506",
|
||||||
{ tags: ["@productType", "@allEnv"] },
|
{ tags: ["@productType", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
let productType;
|
let productType;
|
||||||
|
@ -118,7 +118,7 @@ describe("As an admin I want to manage attributes in product types", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to remove product attribute from product type. TC: SALEOR_1507",
|
"should be able to remove product attribute from product type. TC: SALEOR_1507",
|
||||||
{ tags: ["@productType", "@allEnv"] },
|
{ tags: ["@productType", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
let productType;
|
let productType;
|
||||||
|
|
|
@ -41,7 +41,7 @@ xdescribe("Channels in draft orders", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"Draft order channel should be taken from global channel picker",
|
"Draft order channel should be taken from global channel picker. TC: SALEOR_2101",
|
||||||
{ tags: ["@orders", "@allEnv"] },
|
{ tags: ["@orders", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
let channelName;
|
let channelName;
|
||||||
|
@ -69,7 +69,7 @@ xdescribe("Channels in draft orders", () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"Draft order channel should be taken from global channel picker when changed",
|
"Draft order channel should be taken from global channel picker when changed. TC: SALEOR_2102",
|
||||||
{ tags: ["@orders", "@allEnv"] },
|
{ tags: ["@orders", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.homePage);
|
cy.visit(urlList.homePage);
|
||||||
|
|
|
@ -85,7 +85,7 @@ xdescribe("Draft orders", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should move draft order to orders",
|
"should move draft order to orders. TC: SALEOR_2103",
|
||||||
{ tags: ["@orders", "@allEnv"] },
|
{ tags: ["@orders", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.orders);
|
cy.visit(urlList.orders);
|
||||||
|
|
|
@ -91,7 +91,7 @@ describe("Tests for pages", () => {
|
||||||
Object.keys(attributesTypes).forEach(attributeType => {
|
Object.keys(attributesTypes).forEach(attributeType => {
|
||||||
it(
|
it(
|
||||||
`should create page with ${attributeType} attribute`,
|
`should create page with ${attributeType} attribute`,
|
||||||
{ tags: ["@pages", "@allEnv"] },
|
{ tags: ["@pages", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
const randomName = `${startsWith}${faker.datatype.number()}`;
|
const randomName = `${startsWith}${faker.datatype.number()}`;
|
||||||
const attributeValues = [attributeValuesOnPage[attributeType]];
|
const attributeValues = [attributeValuesOnPage[attributeType]];
|
||||||
|
|
|
@ -65,7 +65,7 @@ describe("Products available in listings", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should update product to available for purchase",
|
"should update product to available for purchase. TC: SALEOR_2501",
|
||||||
{ tags: ["@products", "@allEnv"] },
|
{ tags: ["@products", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
const productName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
@ -96,7 +96,7 @@ describe("Products available in listings", () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should update product to not available for purchase",
|
"should update product to not available for purchase. TC: SALEOR_2502",
|
||||||
{ tags: ["@products", "@allEnv"] },
|
{ tags: ["@products", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
const productName = `${startsWith}${faker.datatype.number()}`;
|
|
@ -48,7 +48,7 @@ describe("Products displayed in listings", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should update product to visible in listings",
|
"should update product to be visible in listings. TC: SALEOR_2505",
|
||||||
{ tags: ["@products", "@allEnv"] },
|
{ tags: ["@products", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
const productName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
@ -80,7 +80,7 @@ describe("Products displayed in listings", () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should update product to not visible in listings",
|
"should update product to not be visible in listings. TC: SALEOR_2506",
|
||||||
{ tags: ["@products", "@allEnv"] },
|
{ tags: ["@products", "@allEnv"] },
|
||||||
() => {
|
() => {
|
||||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
const productName = `${startsWith}${faker.datatype.number()}`;
|
|
@ -97,7 +97,7 @@ describe("As an admin I should be able to filter products", () => {
|
||||||
filterProductsBy.forEach(filterBy => {
|
filterProductsBy.forEach(filterBy => {
|
||||||
it(
|
it(
|
||||||
`should filter products by ${filterBy.type}. TC: ${filterBy.testCase}`,
|
`should filter products by ${filterBy.type}. TC: ${filterBy.testCase}`,
|
||||||
{ tags: ["@productsList", "@allEnv"] },
|
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.expectSkeletonIsVisible().waitForProgressBarToNotExist();
|
cy.expectSkeletonIsVisible().waitForProgressBarToNotExist();
|
||||||
selectFilterOption(filterBy.type, name);
|
selectFilterOption(filterBy.type, name);
|
||||||
|
@ -110,7 +110,7 @@ describe("As an admin I should be able to filter products", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should filter products out of stock. TC: SALEOR_2604",
|
"should filter products out of stock. TC: SALEOR_2604",
|
||||||
{ tags: ["@productsList", "@allEnv"] },
|
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.expectSkeletonIsVisible();
|
cy.expectSkeletonIsVisible();
|
||||||
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
|
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe("As an admin I should be able to manage products table", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able go to the next page on product list. TC: SALEOR_2605",
|
"should be able go to the next page on product list. TC: SALEOR_2605",
|
||||||
{ tags: ["@productsList", "@allEnv"] },
|
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.expectSkeletonIsVisible()
|
cy.expectSkeletonIsVisible()
|
||||||
.get(PRODUCTS_LIST.emptyProductRow)
|
.get(PRODUCTS_LIST.emptyProductRow)
|
||||||
|
|
|
@ -61,7 +61,10 @@ describe("Update products", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should update product", { tags: ["@products", "@allEnv"] }, () => {
|
it(
|
||||||
|
"Should update product. TC: SALEOR_2703",
|
||||||
|
{ tags: ["@products", "@allEnv", "@stable"] },
|
||||||
|
() => {
|
||||||
const updatedName = `${startsWith}${faker.random.number()}`;
|
const updatedName = `${startsWith}${faker.random.number()}`;
|
||||||
let updatedCategory;
|
let updatedCategory;
|
||||||
let updatedCollection;
|
let updatedCollection;
|
||||||
|
@ -127,10 +130,11 @@ describe("Update products", () => {
|
||||||
expectCorrectProductInformation(resp, productData);
|
expectCorrectProductInformation(resp, productData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should delete product",
|
"should delete product. TC: SALEOR_2704",
|
||||||
{ tags: ["@products", "@allEnv", "@stable"] },
|
{ tags: ["@products", "@allEnv", "@stable"] },
|
||||||
() => {
|
() => {
|
||||||
cy.clearSessionData()
|
cy.clearSessionData()
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
export const AVAILABLE_CHANNELS_FORM = {
|
export const AVAILABLE_CHANNELS_FORM = {
|
||||||
menageChannelsButton: "[data-test-id='channels-availability-manage-button']",
|
manageChannelsButton: "[data-test-id='channels-availability-manage-button']",
|
||||||
assignedChannels: "[data-test-id='expand-icon']",
|
assignedChannels: "[data-test-id='expand-icon']",
|
||||||
publishedRadioButtons: "[name*='isPublished']",
|
publishedRadioButtons: "[name*='isPublished']",
|
||||||
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
||||||
radioButtonsValueTrue: "[value='true']",
|
radioButtonsValueTrue: "[value='true']",
|
||||||
radioButtonsValueFalse: "[value='false']",
|
radioButtonsValueFalse: "[value='false']",
|
||||||
visibleInListingsButton: "[name*='visibleInListings']",
|
visibleInListingsButton: "[name*='visibleInListings']",
|
||||||
availableChannel: "[data-test-id*='channel-availability-item']"
|
availableChannel: "[data-test-id*='channel-availability-item']",
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,10 +6,10 @@ export const CUSTOMER_DETAILS = {
|
||||||
emailInput: '[name="email"]',
|
emailInput: '[name="email"]',
|
||||||
noteInput: '[name="note"]',
|
noteInput: '[name="note"]',
|
||||||
activeCheckbox: '[name="isActive"]',
|
activeCheckbox: '[name="isActive"]',
|
||||||
menageAddressesButton: '[data-test-id="manage-addresses"]',
|
manageAddressesButton: '[data-test-id="manage-addresses"]',
|
||||||
addAddressButton: '[data-test-id="add-address"]',
|
addAddressButton: '[data-test-id="add-address"]',
|
||||||
deleteAddressMenuItem: '[data-test-id="delete-address"]',
|
deleteAddressMenuItem: '[data-test-id="delete-address"]',
|
||||||
setAddressAsDefaultShipping: '[data-test-id="set-default-shipping-address"]',
|
setAddressAsDefaultShipping: '[data-test-id="set-default-shipping-address"]',
|
||||||
setAddressAsDefaultBilling: '[data-test-id="set-default-billing-address"]',
|
setAddressAsDefaultBilling: '[data-test-id="set-default-billing-address"]',
|
||||||
editAddressMenuitem: '[data-test-id="edit-address"]'
|
editAddressMenuitem: '[data-test-id="edit-address"]',
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ export function createCollection(collectionName, isPublished, channel) {
|
||||||
.click()
|
.click()
|
||||||
.get(COLLECTION_SELECTORS.nameInput)
|
.get(COLLECTION_SELECTORS.nameInput)
|
||||||
.type(collectionName)
|
.type(collectionName)
|
||||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||||
.click();
|
.click();
|
||||||
|
|
|
@ -135,7 +135,7 @@ export function selectChannelForVariantAndFillUpPrices({
|
||||||
.get(BUTTON_SELECTORS.back)
|
.get(BUTTON_SELECTORS.back)
|
||||||
.click()
|
.click()
|
||||||
.waitForProgressBarToNotBeVisible()
|
.waitForProgressBarToNotBeVisible()
|
||||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||||
.should("be.visible");
|
.should("be.visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,27 +16,27 @@ export function updateProductIsAvailableForPurchase(
|
||||||
? valueTrue
|
? valueTrue
|
||||||
: valueFalse;
|
: valueFalse;
|
||||||
const availableForPurchaseSelector = `${AVAILABLE_CHANNELS_FORM.availableForPurchaseRadioButtons}${isAvailableForPurchaseSelector}`;
|
const availableForPurchaseSelector = `${AVAILABLE_CHANNELS_FORM.availableForPurchaseRadioButtons}${isAvailableForPurchaseSelector}`;
|
||||||
updateProductMenageInChannel(productUrl, availableForPurchaseSelector);
|
updateProductManageInChannel(productUrl, availableForPurchaseSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateProductPublish(productUrl, isPublished) {
|
export function updateProductPublish(productUrl, isPublished) {
|
||||||
const isPublishedSelector = isPublished ? valueTrue : valueFalse;
|
const isPublishedSelector = isPublished ? valueTrue : valueFalse;
|
||||||
const publishedSelector = `${AVAILABLE_CHANNELS_FORM.publishedRadioButtons}${isPublishedSelector}`;
|
const publishedSelector = `${AVAILABLE_CHANNELS_FORM.publishedRadioButtons}${isPublishedSelector}`;
|
||||||
updateProductMenageInChannel(productUrl, publishedSelector);
|
updateProductManageInChannel(productUrl, publishedSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateProductVisibleInListings(productUrl) {
|
export function updateProductVisibleInListings(productUrl) {
|
||||||
updateProductMenageInChannel(
|
updateProductManageInChannel(
|
||||||
productUrl,
|
productUrl,
|
||||||
AVAILABLE_CHANNELS_FORM.visibleInListingsButton,
|
AVAILABLE_CHANNELS_FORM.visibleInListingsButton,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateProductMenageInChannel(productUrl, menageSelector) {
|
function updateProductManageInChannel(productUrl, manageSelector) {
|
||||||
cy.visit(productUrl)
|
cy.visit(productUrl)
|
||||||
.get(AVAILABLE_CHANNELS_FORM.assignedChannels)
|
.get(AVAILABLE_CHANNELS_FORM.assignedChannels)
|
||||||
.click()
|
.click()
|
||||||
.get(menageSelector)
|
.get(manageSelector)
|
||||||
.click()
|
.click()
|
||||||
.waitForProgressBarToNotBeVisible()
|
.waitForProgressBarToNotBeVisible()
|
||||||
.addAliasToGraphRequest("ProductChannelListingUpdate")
|
.addAliasToGraphRequest("ProductChannelListingUpdate")
|
||||||
|
|
|
@ -87,7 +87,7 @@ export function selectChannelInHeader(channelName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function selectChannelInDetailsPages(channelName) {
|
export function selectChannelInDetailsPages(channelName) {
|
||||||
cy.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
cy.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||||
.click();
|
.click();
|
||||||
|
@ -107,7 +107,7 @@ export function selectChannelInDetailsPages(channelName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function selectChannelVariantInDetailsPage(channelName, attributeName) {
|
export function selectChannelVariantInDetailsPage(channelName, attributeName) {
|
||||||
cy.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton).click();
|
cy.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton).click();
|
||||||
const channelsNames = Array.isArray(channelName)
|
const channelsNames = Array.isArray(channelName)
|
||||||
? channelName
|
? channelName
|
||||||
: [channelName];
|
: [channelName];
|
||||||
|
|
Loading…
Reference in a new issue