tests for products
This commit is contained in:
parent
1b4da95e81
commit
76ef2e6264
5 changed files with 11 additions and 17 deletions
|
@ -11,7 +11,7 @@ import ProductsUtils from "../utils/productsUtils";
|
|||
import ShippingUtils from "../utils/shippingUtils";
|
||||
|
||||
// <reference types="cypress" />
|
||||
describe("User authorization", () => {
|
||||
describe("Homepage analytics", () => {
|
||||
const startsWith = "Cy-";
|
||||
|
||||
const customer = new Customer();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import faker from "faker";
|
||||
|
||||
import ProductSteps from "../../steps/productSteps";
|
||||
import { URL_LIST } from "../../url/url-list";
|
||||
import { urlList } from "../../url/urlList";
|
||||
import ChannelsUtils from "../../utils/channelsUtils";
|
||||
import FrontShopProductUtils from "../../utils/frontShop/frontShopProductUtils";
|
||||
import ProductsUtils from "../../utils/productsUtils";
|
||||
|
@ -73,7 +73,7 @@ describe("Products available in listings", () => {
|
|||
true
|
||||
)
|
||||
.then(() => {
|
||||
const productUrl = `${URL_LIST.products}${
|
||||
const productUrl = `${urlList.products}${
|
||||
productsUtils.getCreatedProduct().id
|
||||
}`;
|
||||
productSteps.updateProductIsAvailableForPurchase(productUrl, true);
|
||||
|
@ -106,7 +106,7 @@ describe("Products available in listings", () => {
|
|||
true
|
||||
)
|
||||
.then(() => {
|
||||
const productUrl = `${URL_LIST.products}${
|
||||
const productUrl = `${urlList.products}${
|
||||
productsUtils.getCreatedProduct().id
|
||||
}`;
|
||||
productSteps.updateProductIsAvailableForPurchase(productUrl, false);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import faker from "faker";
|
||||
|
||||
import ProductSteps from "../../steps/productSteps";
|
||||
import { URL_LIST } from "../../url/url-list";
|
||||
import { urlList } from "../../url/urlList";
|
||||
import ChannelsUtils from "../../utils/channelsUtils";
|
||||
import FrontShopProductUtils from "../../utils/frontShop/frontShopProductUtils";
|
||||
import ProductsUtils from "../../utils/productsUtils";
|
||||
|
||||
// <reference types="cypress" />
|
||||
describe("Publish products", () => {
|
||||
describe("Published products", () => {
|
||||
const channelsUtils = new ChannelsUtils();
|
||||
const productsUtils = new ProductsUtils();
|
||||
const productSteps = new ProductSteps();
|
||||
|
@ -55,7 +55,7 @@ describe("Publish products", () => {
|
|||
})
|
||||
.then(() => {
|
||||
const product = productsUtils.getCreatedProduct();
|
||||
const productUrl = `${URL_LIST.products}${product.id}`;
|
||||
const productUrl = `${urlList.products}${product.id}`;
|
||||
productSteps.updateProductPublish(productUrl, true);
|
||||
frontShopProductUtils.isProductVisible(
|
||||
product.id,
|
||||
|
@ -88,7 +88,7 @@ describe("Publish products", () => {
|
|||
})
|
||||
.then(() => {
|
||||
product = productsUtils.getCreatedProduct();
|
||||
const productUrl = `${URL_LIST.products}${product.id}`;
|
||||
const productUrl = `${urlList.products}${product.id}`;
|
||||
productSteps.updateProductPublish(productUrl, false);
|
||||
frontShopProductUtils.isProductVisible(
|
||||
product.id,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import faker from "faker";
|
||||
|
||||
import ProductSteps from "../../steps/productSteps";
|
||||
import { URL_LIST } from "../../url/url-list";
|
||||
import { urlList } from "../../url/urlList";
|
||||
import ChannelsUtils from "../../utils/channelsUtils";
|
||||
import FrontShopProductUtils from "../../utils/frontShop/frontShopProductUtils";
|
||||
import ProductsUtils from "../../utils/productsUtils";
|
||||
|
@ -55,7 +55,7 @@ describe("Products displayed in listings", () => {
|
|||
})
|
||||
.then(() => {
|
||||
const product = productsUtils.getCreatedProduct();
|
||||
const productUrl = `${URL_LIST.products}${product.id}`;
|
||||
const productUrl = `${urlList.products}${product.id}`;
|
||||
productSteps.updateProductVisibleInListings(productUrl);
|
||||
frontShopProductUtils.isProductVisibleInSearchResult(
|
||||
productName,
|
||||
|
@ -89,7 +89,7 @@ describe("Products displayed in listings", () => {
|
|||
})
|
||||
.then(() => {
|
||||
const product = productsUtils.getCreatedProduct();
|
||||
const productUrl = `${URL_LIST.products}${product.id}`;
|
||||
const productUrl = `${urlList.products}${product.id}`;
|
||||
productSteps.updateProductVisibleInListings(productUrl);
|
||||
frontShopProductUtils
|
||||
.isProductVisibleInSearchResult(productName, defaultChannel.slug)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
export const URL_LIST = {
|
||||
dashbord: "/",
|
||||
channels: "/channels/",
|
||||
products: "/products/",
|
||||
orders: "/orders/"
|
||||
};
|
Loading…
Reference in a new issue