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(
|
||||
"should be able to remove product from category. TC: SALEOR_0204",
|
||||
{ tags: ["@category", "@allEnv"] },
|
||||
{ tags: ["@category", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.visit(categoryDetailsUrl(category.id))
|
||||
.get(CATEGORY_DETAILS.productsTab)
|
||||
|
@ -155,7 +155,7 @@ describe("As an admin I want to manage categories", () => {
|
|||
|
||||
it(
|
||||
"should be able to enter category details page. TC: SALEOR_0205",
|
||||
{ tags: ["@category", "@allEnv"] },
|
||||
{ tags: ["@category", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.visit(urlList.categories)
|
||||
.get(SHARED_ELEMENTS.searchInput)
|
||||
|
@ -214,7 +214,7 @@ describe("As an admin I want to manage categories", () => {
|
|||
|
||||
it(
|
||||
"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 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",
|
||||
{ tags: ["@giftCard", "@allEnv"] },
|
||||
() => {
|
||||
|
|
|
@ -96,7 +96,7 @@ describe("As an unlogged customer I want to order physical and digital products"
|
|||
|
||||
it(
|
||||
"should purchase multiple products with all product types as unlogged customer. TC: SALEOR_0404",
|
||||
{ tags: ["@checkout", "@allEnv"] },
|
||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
let checkout;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ describe("As an admin I want to create content attribute", () => {
|
|||
attributeReferenceType.forEach(entityType => {
|
||||
it(
|
||||
`should be able to create reference to ${entityType.type} attribute. TC:${entityType.testCase}`,
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeType = "REFERENCE";
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
@ -110,7 +110,7 @@ describe("As an admin I want to create content attribute", () => {
|
|||
attributeNumericType.forEach(numericSystemType => {
|
||||
it(
|
||||
`should be able to create numeric ${numericSystemType.unitSystem} attribute. TC: ${numericSystemType.testCase}`,
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeType = "NUMERIC";
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
@ -135,7 +135,7 @@ describe("As an admin I want to create content attribute", () => {
|
|||
|
||||
it(
|
||||
"should be able to create attribute without require value TC:SALEOR_0522",
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const attributeType = "BOOLEAN";
|
||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
|
|
@ -46,7 +46,7 @@ xdescribe("Tests for using attributes in filters", () => {
|
|||
});
|
||||
|
||||
it(
|
||||
"should use attribute as filter",
|
||||
"should use attribute as filter. TC: SALEOR_0601",
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
() => {
|
||||
updateAttribute({
|
||||
|
@ -63,7 +63,7 @@ xdescribe("Tests for using attributes in filters", () => {
|
|||
);
|
||||
|
||||
it(
|
||||
"should remove attribute from filters",
|
||||
"should remove attribute from filters. TC: SALEOR_0602",
|
||||
{ tags: ["@attribute", "@allEnv"] },
|
||||
() => {
|
||||
updateAttribute({
|
||||
|
|
|
@ -92,7 +92,7 @@ describe("Channels", () => {
|
|||
.get(PRODUCTS_LIST.productsNames)
|
||||
.first()
|
||||
.click()
|
||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||
.click()
|
||||
.get(SELECT_CHANNELS_TO_ASSIGN.listOfChannels)
|
||||
.contains(randomChannel);
|
||||
|
|
|
@ -57,7 +57,7 @@ describe("Tests on inactive channel", () => {
|
|||
|
||||
it(
|
||||
"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)
|
||||
.get(ORDERS_SELECTORS.createOrder)
|
||||
|
|
|
@ -89,7 +89,7 @@ describe("Tests for customer", () => {
|
|||
|
||||
createCustomer(email, randomName).then(({ user }) => {
|
||||
cy.visit(customerDetailsUrl(user.id))
|
||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
||||
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||
.click()
|
||||
.get(CUSTOMER_DETAILS.addAddressButton)
|
||||
.click()
|
||||
|
@ -113,7 +113,7 @@ describe("Tests for customer", () => {
|
|||
|
||||
createCustomer(email, randomName, address).then(({ user }) => {
|
||||
cy.visit(customerDetailsUrl(user.id))
|
||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
||||
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||
.click()
|
||||
.waitForProgressBarToNotExist()
|
||||
.get(BUTTON_SELECTORS.showMoreButton)
|
||||
|
@ -148,7 +148,7 @@ describe("Tests for customer", () => {
|
|||
})
|
||||
.then(() => {
|
||||
cy.visit(customerDetailsUrl(user.id))
|
||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
||||
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||
.click()
|
||||
.waitForProgressBarToNotExist()
|
||||
.get(BUTTON_SELECTORS.showMoreButton)
|
||||
|
@ -186,7 +186,7 @@ describe("Tests for customer", () => {
|
|||
|
||||
createCustomer(email, randomName, address).then(({ user }) => {
|
||||
cy.visit(customerDetailsUrl(user.id))
|
||||
.get(CUSTOMER_DETAILS.menageAddressesButton)
|
||||
.get(CUSTOMER_DETAILS.manageAddressesButton)
|
||||
.click()
|
||||
.get(BUTTON_SELECTORS.showMoreButton)
|
||||
.should("be.enabled")
|
||||
|
|
|
@ -85,7 +85,7 @@ describe("As an admin I want to manage attributes in product types", () => {
|
|||
|
||||
it(
|
||||
"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()}`;
|
||||
let productType;
|
||||
|
@ -118,7 +118,7 @@ describe("As an admin I want to manage attributes in product types", () => {
|
|||
|
||||
it(
|
||||
"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()}`;
|
||||
let productType;
|
||||
|
|
|
@ -41,7 +41,7 @@ xdescribe("Channels in draft orders", () => {
|
|||
});
|
||||
|
||||
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"] },
|
||||
() => {
|
||||
let channelName;
|
||||
|
@ -69,7 +69,7 @@ xdescribe("Channels in draft orders", () => {
|
|||
);
|
||||
|
||||
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"] },
|
||||
() => {
|
||||
cy.visit(urlList.homePage);
|
||||
|
|
|
@ -85,7 +85,7 @@ xdescribe("Draft orders", () => {
|
|||
});
|
||||
|
||||
it(
|
||||
"should move draft order to orders",
|
||||
"should move draft order to orders. TC: SALEOR_2103",
|
||||
{ tags: ["@orders", "@allEnv"] },
|
||||
() => {
|
||||
cy.visit(urlList.orders);
|
||||
|
|
|
@ -91,7 +91,7 @@ describe("Tests for pages", () => {
|
|||
Object.keys(attributesTypes).forEach(attributeType => {
|
||||
it(
|
||||
`should create page with ${attributeType} attribute`,
|
||||
{ tags: ["@pages", "@allEnv"] },
|
||||
{ tags: ["@pages", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
const randomName = `${startsWith}${faker.datatype.number()}`;
|
||||
const attributeValues = [attributeValuesOnPage[attributeType]];
|
||||
|
|
|
@ -65,7 +65,7 @@ describe("Products available in listings", () => {
|
|||
});
|
||||
|
||||
it(
|
||||
"should update product to available for purchase",
|
||||
"should update product to available for purchase. TC: SALEOR_2501",
|
||||
{ tags: ["@products", "@allEnv"] },
|
||||
() => {
|
||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
@ -96,7 +96,7 @@ describe("Products available in listings", () => {
|
|||
);
|
||||
|
||||
it(
|
||||
"should update product to not available for purchase",
|
||||
"should update product to not available for purchase. TC: SALEOR_2502",
|
||||
{ tags: ["@products", "@allEnv"] },
|
||||
() => {
|
||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
|
@ -48,7 +48,7 @@ describe("Products displayed in listings", () => {
|
|||
});
|
||||
|
||||
it(
|
||||
"should update product to visible in listings",
|
||||
"should update product to be visible in listings. TC: SALEOR_2505",
|
||||
{ tags: ["@products", "@allEnv"] },
|
||||
() => {
|
||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
||||
|
@ -80,7 +80,7 @@ describe("Products displayed in listings", () => {
|
|||
);
|
||||
|
||||
it(
|
||||
"should update product to not visible in listings",
|
||||
"should update product to not be visible in listings. TC: SALEOR_2506",
|
||||
{ tags: ["@products", "@allEnv"] },
|
||||
() => {
|
||||
const productName = `${startsWith}${faker.datatype.number()}`;
|
|
@ -97,7 +97,7 @@ describe("As an admin I should be able to filter products", () => {
|
|||
filterProductsBy.forEach(filterBy => {
|
||||
it(
|
||||
`should filter products by ${filterBy.type}. TC: ${filterBy.testCase}`,
|
||||
{ tags: ["@productsList", "@allEnv"] },
|
||||
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.expectSkeletonIsVisible().waitForProgressBarToNotExist();
|
||||
selectFilterOption(filterBy.type, name);
|
||||
|
@ -110,7 +110,7 @@ describe("As an admin I should be able to filter products", () => {
|
|||
|
||||
it(
|
||||
"should filter products out of stock. TC: SALEOR_2604",
|
||||
{ tags: ["@productsList", "@allEnv"] },
|
||||
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.expectSkeletonIsVisible();
|
||||
const productOutOfStock = `${startsWith}${faker.datatype.number()}`;
|
||||
|
|
|
@ -17,7 +17,7 @@ describe("As an admin I should be able to manage products table", () => {
|
|||
|
||||
it(
|
||||
"should be able go to the next page on product list. TC: SALEOR_2605",
|
||||
{ tags: ["@productsList", "@allEnv"] },
|
||||
{ tags: ["@productsList", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.expectSkeletonIsVisible()
|
||||
.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()}`;
|
||||
let updatedCategory;
|
||||
let updatedCollection;
|
||||
|
@ -127,10 +130,11 @@ describe("Update products", () => {
|
|||
expectCorrectProductInformation(resp, productData);
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it(
|
||||
"should delete product",
|
||||
"should delete product. TC: SALEOR_2704",
|
||||
{ tags: ["@products", "@allEnv", "@stable"] },
|
||||
() => {
|
||||
cy.clearSessionData()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
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']",
|
||||
publishedRadioButtons: "[name*='isPublished']",
|
||||
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
||||
radioButtonsValueTrue: "[value='true']",
|
||||
radioButtonsValueFalse: "[value='false']",
|
||||
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"]',
|
||||
noteInput: '[name="note"]',
|
||||
activeCheckbox: '[name="isActive"]',
|
||||
menageAddressesButton: '[data-test-id="manage-addresses"]',
|
||||
manageAddressesButton: '[data-test-id="manage-addresses"]',
|
||||
addAddressButton: '[data-test-id="add-address"]',
|
||||
deleteAddressMenuItem: '[data-test-id="delete-address"]',
|
||||
setAddressAsDefaultShipping: '[data-test-id="set-default-shipping-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()
|
||||
.get(COLLECTION_SELECTORS.nameInput)
|
||||
.type(collectionName)
|
||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||
.click()
|
||||
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||
.click();
|
||||
|
|
|
@ -135,7 +135,7 @@ export function selectChannelForVariantAndFillUpPrices({
|
|||
.get(BUTTON_SELECTORS.back)
|
||||
.click()
|
||||
.waitForProgressBarToNotBeVisible()
|
||||
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||
.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||
.should("be.visible");
|
||||
}
|
||||
|
||||
|
|
|
@ -16,27 +16,27 @@ export function updateProductIsAvailableForPurchase(
|
|||
? valueTrue
|
||||
: valueFalse;
|
||||
const availableForPurchaseSelector = `${AVAILABLE_CHANNELS_FORM.availableForPurchaseRadioButtons}${isAvailableForPurchaseSelector}`;
|
||||
updateProductMenageInChannel(productUrl, availableForPurchaseSelector);
|
||||
updateProductManageInChannel(productUrl, availableForPurchaseSelector);
|
||||
}
|
||||
|
||||
export function updateProductPublish(productUrl, isPublished) {
|
||||
const isPublishedSelector = isPublished ? valueTrue : valueFalse;
|
||||
const publishedSelector = `${AVAILABLE_CHANNELS_FORM.publishedRadioButtons}${isPublishedSelector}`;
|
||||
updateProductMenageInChannel(productUrl, publishedSelector);
|
||||
updateProductManageInChannel(productUrl, publishedSelector);
|
||||
}
|
||||
|
||||
export function updateProductVisibleInListings(productUrl) {
|
||||
updateProductMenageInChannel(
|
||||
updateProductManageInChannel(
|
||||
productUrl,
|
||||
AVAILABLE_CHANNELS_FORM.visibleInListingsButton,
|
||||
);
|
||||
}
|
||||
|
||||
function updateProductMenageInChannel(productUrl, menageSelector) {
|
||||
function updateProductManageInChannel(productUrl, manageSelector) {
|
||||
cy.visit(productUrl)
|
||||
.get(AVAILABLE_CHANNELS_FORM.assignedChannels)
|
||||
.click()
|
||||
.get(menageSelector)
|
||||
.get(manageSelector)
|
||||
.click()
|
||||
.waitForProgressBarToNotBeVisible()
|
||||
.addAliasToGraphRequest("ProductChannelListingUpdate")
|
||||
|
|
|
@ -87,7 +87,7 @@ export function selectChannelInHeader(channelName) {
|
|||
}
|
||||
|
||||
export function selectChannelInDetailsPages(channelName) {
|
||||
cy.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||
cy.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton)
|
||||
.click()
|
||||
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||
.click();
|
||||
|
@ -107,7 +107,7 @@ export function selectChannelInDetailsPages(channelName) {
|
|||
}
|
||||
|
||||
export function selectChannelVariantInDetailsPage(channelName, attributeName) {
|
||||
cy.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton).click();
|
||||
cy.get(AVAILABLE_CHANNELS_FORM.manageChannelsButton).click();
|
||||
const channelsNames = Array.isArray(channelName)
|
||||
? channelName
|
||||
: [channelName];
|
||||
|
|
Loading…
Reference in a new issue