
* Move theme switch to user menu * Add global channel picker * Fix picker styles * Use app channel state * Improve prop naming to indicate id vs slug * Disable picker if no reason to pick channel * Remove settings modal leftovers * Remove channel settings dialog * Remove unused props * Skip channel fetching if user is not authenticated * Remove channel selection from components * Update messages * Fix e2e tests * Remove channel picker leftover * Revert ChannelSettingsDialog deletion * Update snapshots * Update messages
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
import { LEFT_MENU_SELECTORS } from "../elements/account/left-menu/left-menu-selectors";
|
|
import { PRODUCTS_SELECTORS } from "../elements/catalog/product-selectors";
|
|
|
|
// <reference types="cypress" />
|
|
describe("Products", () => {
|
|
beforeEach(() => {
|
|
cy.clearSessionData().loginUserViaRequest();
|
|
});
|
|
|
|
it("should add new visible product", () => {
|
|
cy.visit("/")
|
|
.get(LEFT_MENU_SELECTORS.catalog)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.products)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.createProductBtn)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.productNameInput)
|
|
.click()
|
|
.type("Visible test product")
|
|
.get(PRODUCTS_SELECTORS.productTypeInput)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.autocompleteDropdown) // trying to fill autocomplete before dropdown will cause error
|
|
.get(PRODUCTS_SELECTORS.productTypeInput)
|
|
.click()
|
|
.type("Cushion")
|
|
.get(PRODUCTS_SELECTORS.categoryItem)
|
|
.should("have.length", 1)
|
|
.get(PRODUCTS_SELECTORS.firstCategoryItem)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.categoryInput)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.categoryItem)
|
|
.first()
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.channelAvailabilityItem)
|
|
.first()
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.visibleRadioBtn)
|
|
.first()
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.saveBtn)
|
|
.click()
|
|
.get(PRODUCTS_SELECTORS.confirmationMsg)
|
|
.contains("Product created");
|
|
});
|
|
});
|