tests for collections
This commit is contained in:
parent
2ea9035e9c
commit
ca5df50640
3 changed files with 10 additions and 3 deletions
|
@ -25,11 +25,14 @@ class Collections {
|
|||
edges{
|
||||
node{
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
return cy.sendRequestWithQuery(query);
|
||||
return cy
|
||||
.sendRequestWithQuery(query)
|
||||
.then(resp => resp.body.data.collections.edges);
|
||||
}
|
||||
deleteCollection(collectionId) {
|
||||
const mutation = `mutation{
|
||||
|
|
|
@ -3,7 +3,7 @@ import faker from "faker";
|
|||
|
||||
import Channels from "../apiRequests/Channels";
|
||||
import { LEFT_MENU_SELECTORS } from "../elements/account/left-menu/left-menu-selectors";
|
||||
import { PRODUCTS_SELECTORS } from "../elements/catalog/product-selectors";
|
||||
import { PRODUCTS_SELECTORS } from "../elements/catalog/products/product-selectors";
|
||||
import { ADD_CHANNEL_FORM_SELECTORS } from "../elements/channels/add-channel-form-selectors";
|
||||
import { CHANNEL_FORM_SELECTORS } from "../elements/channels/channel-form-selectors";
|
||||
import { CHANNELS_SELECTORS } from "../elements/channels/channels-selectors";
|
||||
|
|
|
@ -9,11 +9,13 @@ import { urlList } from "../url/urlList";
|
|||
import ChannelsUtils from "../utils/channelsUtils";
|
||||
import CollectionsUtils from "../utils/collectionsUtils";
|
||||
import ProductsUtils from "../utils/productsUtils";
|
||||
import ShippingUtils from "../utils/shippingUtils";
|
||||
|
||||
describe("Collections", () => {
|
||||
const channelsUtils = new ChannelsUtils();
|
||||
const productsUtils = new ProductsUtils();
|
||||
const collectionsUtils = new CollectionsUtils();
|
||||
const shippingUtils = new ShippingUtils();
|
||||
|
||||
const startsWith = "Cy-";
|
||||
const name = `${startsWith}${faker.random.number()}`;
|
||||
|
@ -23,7 +25,8 @@ describe("Collections", () => {
|
|||
before(() => {
|
||||
cy.clearSessionData().loginUserViaRequest();
|
||||
productsUtils.deleteProperProducts(startsWith);
|
||||
// collectionsUtils.deleteProperCollections(startsWith);
|
||||
collectionsUtils.deleteProperCollections(startsWith);
|
||||
shippingUtils.deleteShipping(startsWith);
|
||||
|
||||
channelsUtils
|
||||
.getDefaultChannel()
|
||||
|
@ -31,6 +34,7 @@ describe("Collections", () => {
|
|||
defaultChannel = channel;
|
||||
productsUtils.createTypeAttributeAndCategoryForProduct(name);
|
||||
})
|
||||
// .then(() => shippingUtils.createShipping(defaultChannel.id, name, ))
|
||||
.then(() => {
|
||||
const attribute = productsUtils.getAttribute();
|
||||
const productType = productsUtils.getProductType();
|
||||
|
|
Loading…
Reference in a new issue