Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation
This commit is contained in:
commit
fc3abed23d
51 changed files with 842 additions and 214 deletions
|
@ -27,6 +27,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Use default sort for search products list - #997 by @orzechdev
|
- Use default sort for search products list - #997 by @orzechdev
|
||||||
- Update CollectionBulkDelete error type - #1030 by @d-wysocki
|
- Update CollectionBulkDelete error type - #1030 by @d-wysocki
|
||||||
- Remove mailing settings - #1027 by @dominik-zeglen
|
- Remove mailing settings - #1027 by @dominik-zeglen
|
||||||
|
- Update schema to contain email plugin changes - #1029 by @dominik-zeglen
|
||||||
- Unconfirmed order manipulation - #967 by @tomaszszymanski129
|
- Unconfirmed order manipulation - #967 by @tomaszszymanski129
|
||||||
|
|
||||||
# 2.11.1
|
# 2.11.1
|
||||||
|
|
|
@ -132,7 +132,12 @@ export function createVariant({
|
||||||
return cy.sendRequestWithQuery(mutation);
|
return cy.sendRequestWithQuery(mutation);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createTypeProduct(name, attributeId, slug = name) {
|
export function createTypeProduct(
|
||||||
|
name,
|
||||||
|
attributeId,
|
||||||
|
hasVariants = true,
|
||||||
|
slug = name
|
||||||
|
) {
|
||||||
const mutation = `mutation{
|
const mutation = `mutation{
|
||||||
productTypeCreate(input: {
|
productTypeCreate(input: {
|
||||||
name: "${name}"
|
name: "${name}"
|
||||||
|
@ -140,6 +145,7 @@ export function createTypeProduct(name, attributeId, slug = name) {
|
||||||
isShippingRequired: true
|
isShippingRequired: true
|
||||||
productAttributes: "${attributeId}"
|
productAttributes: "${attributeId}"
|
||||||
variantAttributes: "${attributeId}"
|
variantAttributes: "${attributeId}"
|
||||||
|
hasVariants: ${hasVariants}
|
||||||
}){
|
}){
|
||||||
productErrors{
|
productErrors{
|
||||||
field
|
field
|
||||||
|
|
4
cypress/elements/catalog/products/price-list.js
Normal file
4
cypress/elements/catalog/products/price-list.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
export const PRICE_LIST = {
|
||||||
|
priceInput: "[name*='channel-price']",
|
||||||
|
costPriceInput: "[name*='channel-costPrice']"
|
||||||
|
};
|
16
cypress/elements/catalog/products/product-details.js
Normal file
16
cypress/elements/catalog/products/product-details.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
export const PRODUCT_DETAILS = {
|
||||||
|
productNameInput: "[name='name']",
|
||||||
|
productTypeInput: "[data-test='product-type']",
|
||||||
|
categoryInput: "[data-test='category']",
|
||||||
|
categoryItem: "[data-test='singleautocomplete-select-option']",
|
||||||
|
collectionInput: "[data-test='collections']",
|
||||||
|
autocompleteDropdown: "[data-test='autocomplete-dropdown']",
|
||||||
|
firstCategoryItem: "#downshift-0-item-0",
|
||||||
|
visibleRadioBtn: "[name='isPublished']",
|
||||||
|
confirmationMsg: "[data-test='notification-success']",
|
||||||
|
channelAvailabilityItem: "[data-test='channel-availability-item']",
|
||||||
|
addVariantsButton: "[data-test*='button-add-variant']",
|
||||||
|
descriptionInput: "[data-test-id='description']",
|
||||||
|
ratingInput: "[name='rating']",
|
||||||
|
skuInput: "[name='sku']"
|
||||||
|
};
|
|
@ -1,33 +0,0 @@
|
||||||
export const PRODUCTS_SELECTORS = {
|
|
||||||
productsList: "[data-test-id][data-test='id']",
|
|
||||||
products: "[data-test='submenu-item-label'][data-test-id='products']",
|
|
||||||
createProductBtn: "[data-test='add-product']",
|
|
||||||
productNameInput: "[name='name']",
|
|
||||||
productTypeInput: "[data-test='product-type']",
|
|
||||||
categoryInput: "[data-test='category']",
|
|
||||||
categoryItem: "[data-test='singleautocomplete-select-option']",
|
|
||||||
autocompleteDropdown: "[data-test='autocomplete-dropdown']",
|
|
||||||
firstCategoryItem: "#downshift-0-item-0",
|
|
||||||
visibleRadioBtn: "[name='isPublished']",
|
|
||||||
saveBtn: "[data-test='button-bar-confirm']",
|
|
||||||
confirmationMsg: "[data-test='notification-success']",
|
|
||||||
channelAvailabilityItem: "[data-test='channel-availability-item']",
|
|
||||||
searchProducts: "[placeholder='Search Products...']",
|
|
||||||
availableManageButton:
|
|
||||||
"[data-test-id='channels-availiability-manage-button']",
|
|
||||||
channelsAvailabilityForm:
|
|
||||||
"[data-test-id='manage-products-channels-availiability-list']",
|
|
||||||
channelAvailabilityColumn:
|
|
||||||
"[data-test='availability'][data-test-availability='true']",
|
|
||||||
channelAvailabilityList: "ul[role='menu']",
|
|
||||||
goBackButton: "[data-test-id='app-header-back-button']",
|
|
||||||
assignedChannels: "[data-test='channel-availability-item']",
|
|
||||||
publishedRadioButton: "[role=radiogroup]",
|
|
||||||
addVariantsButton: "[data-test*='button-add-variant']",
|
|
||||||
publishedRadioButtons: "[name*='isPublished']",
|
|
||||||
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
|
||||||
radioButtonsValueTrue: "[value='true']",
|
|
||||||
radioButtonsValueFalse: "[value='false']",
|
|
||||||
visibleInListingsButton: "[name*='visibleInListings']",
|
|
||||||
emptyProductRow: "[class*='Skeleton']"
|
|
||||||
};
|
|
6
cypress/elements/catalog/products/products-list.js
Normal file
6
cypress/elements/catalog/products/products-list.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
export const PRODUCTS_LIST = {
|
||||||
|
productsList: "[data-test-id][data-test='id']",
|
||||||
|
createProductBtn: "[data-test='add-product']",
|
||||||
|
searchProducts: "[placeholder='Search Products...']",
|
||||||
|
emptyProductRow: "[class*='Skeleton']"
|
||||||
|
};
|
|
@ -2,8 +2,6 @@ export const VARIANTS_SELECTORS = {
|
||||||
attributeCheckbox: "[name*='value:']",
|
attributeCheckbox: "[name*='value:']",
|
||||||
valueContainer: "[data-test-id='value-container']",
|
valueContainer: "[data-test-id='value-container']",
|
||||||
nextButton: "[class*='MuiButton-containedPrimary']",
|
nextButton: "[class*='MuiButton-containedPrimary']",
|
||||||
priceInput: "[name*='channel-price']",
|
|
||||||
costPriceInput: "[name*='channel-costPrice']",
|
|
||||||
warehouseCheckboxes: "[name*='warehouse:']",
|
warehouseCheckboxes: "[name*='warehouse:']",
|
||||||
skuInput: "input[class*='MuiInputBase'][type='text']",
|
skuInput: "input[class*='MuiInputBase'][type='text']",
|
||||||
attributeSelector: "[data-test='attribute-value']",
|
attributeSelector: "[data-test='attribute-value']",
|
10
cypress/elements/channels/available-channels-form.js
Normal file
10
cypress/elements/channels/available-channels-form.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
export const AVAILABLE_CHANNELS_FORM = {
|
||||||
|
menageChannelsButton: "[data-test-id='channels-availiability-manage-button']",
|
||||||
|
assignedChannels: "[data-test='channel-availability-item']",
|
||||||
|
publishedRadioButtons: "[name*='isPublished']",
|
||||||
|
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
||||||
|
radioButtonsValueTrue: "[value='true']",
|
||||||
|
radioButtonsValueFalse: "[value='false']",
|
||||||
|
visibleInListingsButton: "[name*='visibleInListings']",
|
||||||
|
availableChannel: "[data-test='channel-availability-item']"
|
||||||
|
};
|
|
@ -1,10 +0,0 @@
|
||||||
export const MENAGE_CHANNEL_AVAILABILITY_FORM = {
|
|
||||||
channelsMenageButton: "[data-test-id='channels-availiability-manage-button']",
|
|
||||||
allChannelsCheckbox: "[name='allChannels']",
|
|
||||||
channelRow: "[data-test-id='channel-row']",
|
|
||||||
channelCheckbox: "[class*='MuiCheckbox']",
|
|
||||||
channelsAvailabilityItem: "[data-test='channel-availability-item']",
|
|
||||||
publishedCheckbox: "[name='isPublished']",
|
|
||||||
radioButtonsValueTrue: "[value='true']",
|
|
||||||
radioButtonsValueFalse: "[value='false']"
|
|
||||||
};
|
|
|
@ -1,17 +0,0 @@
|
||||||
export const MENAGE_CHANNEL_AVAILABILITY = {
|
|
||||||
availableManageButton:
|
|
||||||
"[data-test-id='channels-availiability-manage-button']",
|
|
||||||
channelsAvailabilityForm:
|
|
||||||
"[data-test-id='manage-products-channels-availiability-list']",
|
|
||||||
channelAvailabilityColumn:
|
|
||||||
"[data-test='availability'][data-test-availability='true']",
|
|
||||||
channelAvailabilityList: "ul[role='menu']",
|
|
||||||
assignedChannels: "[data-test='channel-availability-item']",
|
|
||||||
publishedRadioButtons: "[name*='isPublished']",
|
|
||||||
availableForPurchaseRadioButtons: "[name*='isAvailableForPurchase']",
|
|
||||||
radioButtonsValueTrue: "[value='true']",
|
|
||||||
radioButtonsValueFalse: "[value='false']",
|
|
||||||
visibleInListingsButton: "[name*='visibleInListings']",
|
|
||||||
allChannelsInput: "[name='allChannels']",
|
|
||||||
dialog: "[role='dialog']"
|
|
||||||
};
|
|
8
cypress/elements/channels/select-channels-to-assign.js
Normal file
8
cypress/elements/channels/select-channels-to-assign.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
export const SELECT_CHANNELS_TO_ASSIGN = {
|
||||||
|
listOfChannels:
|
||||||
|
"[data-test-id='manage-products-channels-availiability-list']",
|
||||||
|
allChannelsCheckbox: "[name='allChannels']",
|
||||||
|
selectChannelsForm: "[role='dialog']",
|
||||||
|
channelRow: "[data-test-id='channel-row']",
|
||||||
|
channelCheckbox: "[class*='MuiCheckbox']"
|
||||||
|
};
|
|
@ -2,5 +2,7 @@ export const BUTTON_SELECTORS = {
|
||||||
back: '[data-test="back"]',
|
back: '[data-test="back"]',
|
||||||
submit: '[data-test="submit"]',
|
submit: '[data-test="submit"]',
|
||||||
confirm: '[data-test="button-bar-confirm"]',
|
confirm: '[data-test="button-bar-confirm"]',
|
||||||
checkbox: "[type='checkbox']"
|
goBackButton: "[data-test-id='app-header-back-button']",
|
||||||
|
checkbox: "[type='checkbox']",
|
||||||
|
selectOption: "[data-test*='select-option']"
|
||||||
};
|
};
|
||||||
|
|
8
cypress/elements/shared/metadata/metadata-form.js
Normal file
8
cypress/elements/shared/metadata/metadata-form.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
export const METADATA_FORM = {
|
||||||
|
metadataForm: "[data-test='metadataEditor'][data-test-is-private='false']",
|
||||||
|
privateMetadataForm:
|
||||||
|
"[data-test='metadataEditor'][data-test-is-private='true']",
|
||||||
|
addFieldButton: "[data-test='addField']",
|
||||||
|
nameInput: "[name*='name']",
|
||||||
|
valueField: "[name*='value']"
|
||||||
|
};
|
6
cypress/elements/shared/seo/seo-form-selectors.js
Normal file
6
cypress/elements/shared/seo/seo-form-selectors.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
export const SEO_FORM = {
|
||||||
|
editSeoSettings: "[data-test-id='edit-seo']",
|
||||||
|
slugInput: "[name='slug']",
|
||||||
|
titleInput: "[name='seoTitle']",
|
||||||
|
descriptionInput: "[name='seoDescription']"
|
||||||
|
};
|
|
@ -3,10 +3,12 @@ import faker from "faker";
|
||||||
|
|
||||||
import { createChannel } from "../apiRequests/Channels";
|
import { createChannel } from "../apiRequests/Channels";
|
||||||
import { LEFT_MENU_SELECTORS } from "../elements/account/left-menu/left-menu-selectors";
|
import { LEFT_MENU_SELECTORS } from "../elements/account/left-menu/left-menu-selectors";
|
||||||
import { PRODUCTS_SELECTORS } from "../elements/catalog/products/product-selectors";
|
import { PRODUCTS_LIST } from "../elements/catalog/products/products-list";
|
||||||
import { ADD_CHANNEL_FORM_SELECTORS } from "../elements/channels/add-channel-form-selectors";
|
import { ADD_CHANNEL_FORM_SELECTORS } from "../elements/channels/add-channel-form-selectors";
|
||||||
|
import { AVAILABLE_CHANNELS_FORM } from "../elements/channels/available-channels-form";
|
||||||
import { CHANNEL_FORM_SELECTORS } from "../elements/channels/channel-form-selectors";
|
import { CHANNEL_FORM_SELECTORS } from "../elements/channels/channel-form-selectors";
|
||||||
import { CHANNELS_SELECTORS } from "../elements/channels/channels-selectors";
|
import { CHANNELS_SELECTORS } from "../elements/channels/channels-selectors";
|
||||||
|
import { SELECT_CHANNELS_TO_ASSIGN } from "../elements/channels/select-channels-to-assign";
|
||||||
import { CONFIGURATION_SELECTORS } from "../elements/configuration/configuration-selectors";
|
import { CONFIGURATION_SELECTORS } from "../elements/configuration/configuration-selectors";
|
||||||
import { HEADER_SELECTORS } from "../elements/header/header-selectors";
|
import { HEADER_SELECTORS } from "../elements/header/header-selectors";
|
||||||
import { DRAFT_ORDER_SELECTORS } from "../elements/orders/draft-order-selectors";
|
import { DRAFT_ORDER_SELECTORS } from "../elements/orders/draft-order-selectors";
|
||||||
|
@ -65,12 +67,12 @@ describe("Channels", () => {
|
||||||
cy.addAliasToGraphRequest("InitialProductFilterData");
|
cy.addAliasToGraphRequest("InitialProductFilterData");
|
||||||
cy.visit(urlList.products);
|
cy.visit(urlList.products);
|
||||||
cy.wait("@InitialProductFilterData");
|
cy.wait("@InitialProductFilterData");
|
||||||
cy.get(PRODUCTS_SELECTORS.productsList)
|
cy.get(PRODUCTS_LIST.productsList)
|
||||||
.first()
|
.first()
|
||||||
.click()
|
.click()
|
||||||
.get(PRODUCTS_SELECTORS.availableManageButton)
|
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(PRODUCTS_SELECTORS.channelsAvailabilityForm)
|
.get(SELECT_CHANNELS_TO_ASSIGN.listOfChannels)
|
||||||
.contains(randomChannel);
|
.contains(randomChannel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
import { urlList } from "../url/urlList";
|
import { urlList } from "../url/urlList";
|
||||||
import * as channelsUtils from "../utils/channelsUtils";
|
import * as channelsUtils from "../utils/channelsUtils";
|
||||||
import { deleteCollectionsStartsWith } from "../utils/collectionsUtils";
|
import { deleteCollectionsStartsWith } from "../utils/collectionsUtils";
|
||||||
import * as productsUtils from "../utils/productsUtils";
|
import * as productsUtils from "../utils/products/productsUtils";
|
||||||
import { deleteShippingStartsWith } from "../utils/shippingUtils";
|
import { deleteShippingStartsWith } from "../utils/shippingUtils";
|
||||||
import {
|
import {
|
||||||
isCollectionVisible,
|
isCollectionVisible,
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
import { urlList } from "../../url/urlList";
|
import { urlList } from "../../url/urlList";
|
||||||
import * as channelsUtils from "../../utils/channelsUtils";
|
import * as channelsUtils from "../../utils/channelsUtils";
|
||||||
import { deleteSalesStartsWith } from "../../utils/discounts/salesUtils";
|
import { deleteSalesStartsWith } from "../../utils/discounts/salesUtils";
|
||||||
import * as productsUtils from "../../utils/productsUtils";
|
import * as productsUtils from "../../utils/products/productsUtils";
|
||||||
import {
|
import {
|
||||||
createShipping,
|
createShipping,
|
||||||
deleteShippingStartsWith
|
deleteShippingStartsWith
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { urlList } from "../../url/urlList";
|
||||||
import * as channelsUtils from "../../utils/channelsUtils";
|
import * as channelsUtils from "../../utils/channelsUtils";
|
||||||
import { deleteVouchersStartsWith } from "../../utils/discounts/vouchersUtils";
|
import { deleteVouchersStartsWith } from "../../utils/discounts/vouchersUtils";
|
||||||
import { createCheckoutWithVoucher } from "../../utils/ordersUtils";
|
import { createCheckoutWithVoucher } from "../../utils/ordersUtils";
|
||||||
import * as productsUtils from "../../utils/productsUtils";
|
import * as productsUtils from "../../utils/products/productsUtils";
|
||||||
import {
|
import {
|
||||||
createShipping,
|
createShipping,
|
||||||
deleteShippingStartsWith
|
deleteShippingStartsWith
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
createReadyToFulfillOrder,
|
createReadyToFulfillOrder,
|
||||||
createWaitingForCaptureOrder
|
createWaitingForCaptureOrder
|
||||||
} from "../../utils/ordersUtils";
|
} from "../../utils/ordersUtils";
|
||||||
import * as productsUtils from "../../utils/productsUtils";
|
import * as productsUtils from "../../utils/products/productsUtils";
|
||||||
import * as shippingUtils from "../../utils/shippingUtils";
|
import * as shippingUtils from "../../utils/shippingUtils";
|
||||||
|
|
||||||
// <reference types="cypress" />
|
// <reference types="cypress" />
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { selectChannelInPicker } from "../../steps/channelsSteps";
|
||||||
import { finalizeDraftOrder } from "../../steps/draftOrderSteps";
|
import { finalizeDraftOrder } from "../../steps/draftOrderSteps";
|
||||||
import { urlList } from "../../url/urlList";
|
import { urlList } from "../../url/urlList";
|
||||||
import { getDefaultChannel } from "../../utils/channelsUtils";
|
import { getDefaultChannel } from "../../utils/channelsUtils";
|
||||||
import * as productsUtils from "../../utils/productsUtils";
|
import * as productsUtils from "../../utils/products/productsUtils";
|
||||||
import {
|
import {
|
||||||
createShipping,
|
createShipping,
|
||||||
deleteShippingStartsWith
|
deleteShippingStartsWith
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { finalizeDraftOrder } from "../../steps/draftOrderSteps";
|
||||||
import { urlList } from "../../url/urlList";
|
import { urlList } from "../../url/urlList";
|
||||||
import { getDefaultChannel } from "../../utils/channelsUtils";
|
import { getDefaultChannel } from "../../utils/channelsUtils";
|
||||||
import { createOrder } from "../../utils/ordersUtils";
|
import { createOrder } from "../../utils/ordersUtils";
|
||||||
import * as productsUtils from "../../utils/productsUtils";
|
import * as productsUtils from "../../utils/products/productsUtils";
|
||||||
import {
|
import {
|
||||||
createShipping,
|
createShipping,
|
||||||
deleteShippingStartsWith
|
deleteShippingStartsWith
|
||||||
|
|
123
cypress/integration/products/createProduct.js
Normal file
123
cypress/integration/products/createProduct.js
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
// <reference types="cypress" />
|
||||||
|
import faker from "faker";
|
||||||
|
|
||||||
|
import { PRODUCT_DETAILS } from "../../elements/catalog/products/product-details";
|
||||||
|
import { PRODUCTS_LIST } from "../../elements/catalog/products/products-list";
|
||||||
|
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
|
||||||
|
import { metadataForms } from "../../steps/catalog/metadataSteps";
|
||||||
|
import {
|
||||||
|
fillUpPriceList,
|
||||||
|
priceInputLists
|
||||||
|
} from "../../steps/catalog/products/priceList";
|
||||||
|
import { fillUpCommonFieldsForProductType } from "../../steps/catalog/products/productSteps";
|
||||||
|
import { selectChannelInDetailsPages } from "../../steps/channelsSteps";
|
||||||
|
import { urlList } from "../../url/urlList";
|
||||||
|
import {
|
||||||
|
expectCorrectProductInformation,
|
||||||
|
expectCorrectProductVariantInformation
|
||||||
|
} from "../../utils/products/checkProductInfo";
|
||||||
|
import * as productUtils from "../../utils/products/productsUtils";
|
||||||
|
|
||||||
|
describe("Create product", () => {
|
||||||
|
const startsWith = "Cy-";
|
||||||
|
const name = `${startsWith}${faker.random.number()}`;
|
||||||
|
const generalInfo = {
|
||||||
|
name: `${startsWith}${faker.random.number()}`,
|
||||||
|
description: faker.lorem.sentence(),
|
||||||
|
rating: 2
|
||||||
|
};
|
||||||
|
const seo = {
|
||||||
|
title: "testTitle",
|
||||||
|
description: generalInfo.description
|
||||||
|
};
|
||||||
|
const metadata = {
|
||||||
|
public: {
|
||||||
|
metadataForm: metadataForms.public,
|
||||||
|
name: "metadataName",
|
||||||
|
value: "metadataValue"
|
||||||
|
},
|
||||||
|
private: {
|
||||||
|
metadataForm: metadataForms.private,
|
||||||
|
name: "privateMetadataName",
|
||||||
|
value: "privateMetadataValue"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let attribute;
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
productUtils.deleteProductsStartsWith(startsWith);
|
||||||
|
productUtils.createAttribute(name).then(attributeResp => {
|
||||||
|
attribute = attributeResp;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
cy.visit(urlList.products)
|
||||||
|
.get(PRODUCTS_LIST.createProductBtn)
|
||||||
|
.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should create product with variants", () => {
|
||||||
|
const randomName = `${startsWith}${faker.random.number()}`;
|
||||||
|
productUtils.createTypeProduct(randomName, attribute.id);
|
||||||
|
seo.slug = randomName;
|
||||||
|
const productData = {
|
||||||
|
generalInfo,
|
||||||
|
seo,
|
||||||
|
metadata,
|
||||||
|
productOrganization: { productType: randomName },
|
||||||
|
attribute
|
||||||
|
};
|
||||||
|
fillUpCommonFieldsForProductType(productData).then(
|
||||||
|
productOrgResp => (productData.productOrganization = productOrgResp)
|
||||||
|
);
|
||||||
|
cy.addAliasToGraphRequest("ProductDetails");
|
||||||
|
cy.get(BUTTON_SELECTORS.confirm).click();
|
||||||
|
cy.wait("@ProductDetails");
|
||||||
|
cy.get(PRODUCT_DETAILS.confirmationMsg).should("be.visible");
|
||||||
|
cy.get("@ProductDetails")
|
||||||
|
.its("response.body")
|
||||||
|
.then(resp => {
|
||||||
|
const productResp = resp.find(element => element.data.product).data
|
||||||
|
.product;
|
||||||
|
expectCorrectProductInformation(productResp, productData);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
it("should create product without variants", () => {
|
||||||
|
const prices = { sellingPrice: 6, costPrice: 3 };
|
||||||
|
const randomName = `${startsWith}${faker.random.number()}`;
|
||||||
|
seo.slug = randomName;
|
||||||
|
productUtils.createTypeProduct(randomName, attribute.id, false);
|
||||||
|
const productData = {
|
||||||
|
generalInfo,
|
||||||
|
seo,
|
||||||
|
metadata,
|
||||||
|
productOrganization: { productType: randomName },
|
||||||
|
attribute
|
||||||
|
};
|
||||||
|
fillUpCommonFieldsForProductType(productData).then(
|
||||||
|
productOrgResp => (productData.productOrganization = productOrgResp)
|
||||||
|
);
|
||||||
|
selectChannelInDetailsPages();
|
||||||
|
fillUpPriceList(prices.sellingPrice);
|
||||||
|
fillUpPriceList(prices.costPrice, priceInputLists.costPrice);
|
||||||
|
cy.get(PRODUCT_DETAILS.skuInput).type(randomName);
|
||||||
|
cy.addAliasToGraphRequest("ProductDetails");
|
||||||
|
cy.get(BUTTON_SELECTORS.confirm).click();
|
||||||
|
cy.wait("@ProductDetails");
|
||||||
|
cy.get(PRODUCT_DETAILS.confirmationMsg).should("be.visible");
|
||||||
|
cy.get("@ProductDetails")
|
||||||
|
.its("response.body")
|
||||||
|
.then(resp => {
|
||||||
|
const productResp = resp.find(element => element.data.product).data
|
||||||
|
.product;
|
||||||
|
expectCorrectProductInformation(productResp, productData);
|
||||||
|
expectCorrectProductVariantInformation(
|
||||||
|
productResp.variants,
|
||||||
|
randomName,
|
||||||
|
prices
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,10 +1,10 @@
|
||||||
import faker from "faker";
|
import faker from "faker";
|
||||||
|
|
||||||
import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails";
|
import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails";
|
||||||
import { updateProductIsAvailableForPurchase } from "../../../steps/products/productSteps";
|
import { updateProductIsAvailableForPurchase } from "../../../steps/catalog/products/productSteps";
|
||||||
import { productDetailsUrl } from "../../../url/urlList";
|
import { productDetailsUrl } from "../../../url/urlList";
|
||||||
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
||||||
import * as productsUtils from "../../../utils/productsUtils";
|
import * as productsUtils from "../../../utils/products/productsUtils";
|
||||||
import * as shippingUtils from "../../../utils/shippingUtils";
|
import * as shippingUtils from "../../../utils/shippingUtils";
|
||||||
import { isProductAvailableForPurchase } from "../../../utils/storeFront/storeFrontProductUtils";
|
import { isProductAvailableForPurchase } from "../../../utils/storeFront/storeFrontProductUtils";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import faker from "faker";
|
import faker from "faker";
|
||||||
|
|
||||||
import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails";
|
import { getProductDetails } from "../../../apiRequests/storeFront/ProductDetails";
|
||||||
import { updateProductPublish } from "../../../steps/products/productSteps";
|
import { updateProductPublish } from "../../../steps/catalog/products/productSteps";
|
||||||
import { productDetailsUrl } from "../../../url/urlList";
|
import { productDetailsUrl } from "../../../url/urlList";
|
||||||
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
||||||
import * as productsUtils from "../../../utils/productsUtils";
|
import * as productsUtils from "../../../utils/products/productsUtils";
|
||||||
import { isProductVisible } from "../../../utils/storeFront/storeFrontProductUtils";
|
import { isProductVisible } from "../../../utils/storeFront/storeFrontProductUtils";
|
||||||
|
|
||||||
// <reference types="cypress" />
|
// <reference types="cypress" />
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import faker from "faker";
|
import faker from "faker";
|
||||||
|
|
||||||
import { searchInShop } from "../../../apiRequests/storeFront/Search";
|
import { searchInShop } from "../../../apiRequests/storeFront/Search";
|
||||||
import { updateProductVisibleInListings } from "../../../steps/products/productSteps";
|
import { updateProductVisibleInListings } from "../../../steps/catalog/products/productSteps";
|
||||||
import { productDetailsUrl } from "../../../url/urlList";
|
import { productDetailsUrl } from "../../../url/urlList";
|
||||||
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
import { getDefaultChannel } from "../../../utils/channelsUtils";
|
||||||
import * as productsUtils from "../../../utils/productsUtils";
|
import * as productsUtils from "../../../utils/products/productsUtils";
|
||||||
import { isProductVisibleInSearchResult } from "../../../utils/storeFront/storeFrontProductUtils";
|
import { isProductVisibleInSearchResult } from "../../../utils/storeFront/storeFrontProductUtils";
|
||||||
|
|
||||||
// <reference types="cypress" />
|
// <reference types="cypress" />
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
// <reference types="cypress" />
|
|
||||||
import { PRODUCTS_SELECTORS } from "../../elements/catalog/products/product-selectors";
|
|
||||||
import { urlList } from "../../url/urlList";
|
|
||||||
|
|
||||||
describe("Products", () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.clearSessionData().loginUserViaRequest();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should add new visible product", () => {
|
|
||||||
cy.visit(urlList.products)
|
|
||||||
.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");
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -8,13 +8,13 @@ import {
|
||||||
import {
|
import {
|
||||||
createFirstVariant,
|
createFirstVariant,
|
||||||
createVariant
|
createVariant
|
||||||
} from "../../steps/products/VariantsSteps";
|
} from "../../steps/catalog/products/VariantsSteps";
|
||||||
import { urlList } from "../../url/urlList";
|
import { urlList } from "../../url/urlList";
|
||||||
import {
|
import {
|
||||||
deleteChannelsStartsWith,
|
deleteChannelsStartsWith,
|
||||||
getDefaultChannel
|
getDefaultChannel
|
||||||
} from "../../utils/channelsUtils";
|
} from "../../utils/channelsUtils";
|
||||||
import * as productUtils from "../../utils/productsUtils";
|
import * as productUtils from "../../utils/products/productsUtils";
|
||||||
import * as shippingUtils from "../../utils/shippingUtils";
|
import * as shippingUtils from "../../utils/shippingUtils";
|
||||||
import { getProductVariants } from "../../utils/storeFront/storeFrontProductUtils";
|
import { getProductVariants } from "../../utils/storeFront/storeFrontProductUtils";
|
||||||
|
|
||||||
|
|
18
cypress/steps/catalog/metadataSteps.js
Normal file
18
cypress/steps/catalog/metadataSteps.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import { METADATA_FORM } from "../../elements/shared/metadata/metadata-form";
|
||||||
|
|
||||||
|
export const metadataForms = {
|
||||||
|
private: METADATA_FORM.privateMetadataForm,
|
||||||
|
public: METADATA_FORM.metadataForm
|
||||||
|
};
|
||||||
|
|
||||||
|
export function addMetadataField({ metadataForm, name, value }) {
|
||||||
|
cy.get(metadataForm)
|
||||||
|
.find(METADATA_FORM.addFieldButton)
|
||||||
|
.click()
|
||||||
|
.get(metadataForm)
|
||||||
|
.find(METADATA_FORM.nameInput)
|
||||||
|
.type(name)
|
||||||
|
.get(metadataForm)
|
||||||
|
.find(METADATA_FORM.valueField)
|
||||||
|
.type(value);
|
||||||
|
}
|
|
@ -1,18 +1,17 @@
|
||||||
import { PRODUCTS_SELECTORS } from "../../elements/catalog/products/product-selectors";
|
import { PRICE_LIST } from "../../../elements/catalog/products/price-list";
|
||||||
import { VARIANTS_SELECTORS } from "../../elements/catalog/variants-selectors";
|
import { PRODUCT_DETAILS } from "../../../elements/catalog/products/product-details";
|
||||||
|
import { VARIANTS_SELECTORS } from "../../../elements/catalog/products/variants-selectors";
|
||||||
|
import { fillUpPriceList } from "./priceList";
|
||||||
|
|
||||||
export function createFirstVariant({ sku, warehouseId, price, attribute }) {
|
export function createFirstVariant({ sku, warehouseId, price, attribute }) {
|
||||||
cy.get(PRODUCTS_SELECTORS.addVariantsButton).click();
|
cy.get(PRODUCT_DETAILS.addVariantsButton).click();
|
||||||
cy.get(VARIANTS_SELECTORS.valueContainer)
|
cy.get(VARIANTS_SELECTORS.valueContainer)
|
||||||
.contains(attribute)
|
.contains(attribute)
|
||||||
.find(VARIANTS_SELECTORS.attributeCheckbox)
|
.find(VARIANTS_SELECTORS.attributeCheckbox)
|
||||||
.click()
|
.click()
|
||||||
.get(VARIANTS_SELECTORS.nextButton)
|
.get(VARIANTS_SELECTORS.nextButton)
|
||||||
.click()
|
.click();
|
||||||
.get(VARIANTS_SELECTORS.priceInput)
|
fillUpPriceList(price);
|
||||||
.each($priceInput => {
|
|
||||||
cy.wrap($priceInput).type(price);
|
|
||||||
});
|
|
||||||
cy.get(`[name*='${warehouseId}']`)
|
cy.get(`[name*='${warehouseId}']`)
|
||||||
.click()
|
.click()
|
||||||
.get(VARIANTS_SELECTORS.nextButton)
|
.get(VARIANTS_SELECTORS.nextButton)
|
||||||
|
@ -30,16 +29,16 @@ export function createVariant({
|
||||||
price,
|
price,
|
||||||
costPrice = price
|
costPrice = price
|
||||||
}) {
|
}) {
|
||||||
cy.get(PRODUCTS_SELECTORS.addVariantsButton)
|
cy.get(PRODUCT_DETAILS.addVariantsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(VARIANTS_SELECTORS.attributeSelector)
|
.get(VARIANTS_SELECTORS.attributeSelector)
|
||||||
.click()
|
.click()
|
||||||
.get(VARIANTS_SELECTORS.attributeOption)
|
.get(VARIANTS_SELECTORS.attributeOption)
|
||||||
.contains(attributeName)
|
.contains(attributeName)
|
||||||
.click()
|
.click()
|
||||||
.get(VARIANTS_SELECTORS.priceInput)
|
.get(PRICE_LIST.priceInput)
|
||||||
.type(price)
|
.type(price)
|
||||||
.get(VARIANTS_SELECTORS.costPriceInput)
|
.get(PRICE_LIST.costPriceInput)
|
||||||
.type(costPrice)
|
.type(costPrice)
|
||||||
.get(VARIANTS_SELECTORS.skuInputInAddVariant)
|
.get(VARIANTS_SELECTORS.skuInputInAddVariant)
|
||||||
.type(sku)
|
.type(sku)
|
14
cypress/steps/catalog/products/priceList.js
Normal file
14
cypress/steps/catalog/products/priceList.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { PRICE_LIST } from "../../../elements/catalog/products/price-list";
|
||||||
|
|
||||||
|
export const priceInputLists = {
|
||||||
|
sellingPrice: PRICE_LIST.priceInput,
|
||||||
|
costPrice: PRICE_LIST.costPriceInput
|
||||||
|
};
|
||||||
|
export function fillUpPriceList(
|
||||||
|
price = 1,
|
||||||
|
priceTypeInput = priceInputLists.sellingPrice
|
||||||
|
) {
|
||||||
|
cy.get(priceTypeInput).each($priceInput => {
|
||||||
|
cy.wrap($priceInput).type(price);
|
||||||
|
});
|
||||||
|
}
|
85
cypress/steps/catalog/products/productSteps.js
Normal file
85
cypress/steps/catalog/products/productSteps.js
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
import { PRODUCT_DETAILS } from "../../../elements/catalog/products/product-details";
|
||||||
|
import { AVAILABLE_CHANNELS_FORM } from "../../../elements/channels/available-channels-form";
|
||||||
|
import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors";
|
||||||
|
import { fillAutocompleteSelect } from "../../shared/autocompleteSelect";
|
||||||
|
import { addMetadataField } from "../metadataSteps";
|
||||||
|
import { editSeoSettings } from "../seoSteps";
|
||||||
|
|
||||||
|
const valueTrue = AVAILABLE_CHANNELS_FORM.radioButtonsValueTrue;
|
||||||
|
const valueFalse = AVAILABLE_CHANNELS_FORM.radioButtonsValueFalse;
|
||||||
|
|
||||||
|
export function updateProductIsAvailableForPurchase(
|
||||||
|
productUrl,
|
||||||
|
isAvailableForPurchase
|
||||||
|
) {
|
||||||
|
const isAvailableForPurchaseSelector = isAvailableForPurchase
|
||||||
|
? valueTrue
|
||||||
|
: valueFalse;
|
||||||
|
const availableForPurchaseSelector = `${AVAILABLE_CHANNELS_FORM.availableForPurchaseRadioButtons}${isAvailableForPurchaseSelector}`;
|
||||||
|
updateProductMenageInChannel(productUrl, availableForPurchaseSelector);
|
||||||
|
}
|
||||||
|
export function updateProductPublish(productUrl, isPublished) {
|
||||||
|
const isPublishedSelector = isPublished ? valueTrue : valueFalse;
|
||||||
|
const publishedSelector = `${AVAILABLE_CHANNELS_FORM.publishedRadioButtons}${isPublishedSelector}`;
|
||||||
|
updateProductMenageInChannel(productUrl, publishedSelector);
|
||||||
|
}
|
||||||
|
export function updateProductVisibleInListings(productUrl) {
|
||||||
|
updateProductMenageInChannel(
|
||||||
|
productUrl,
|
||||||
|
AVAILABLE_CHANNELS_FORM.visibleInListingsButton
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function updateProductMenageInChannel(productUrl, menageSelector) {
|
||||||
|
cy.visit(productUrl)
|
||||||
|
.get(AVAILABLE_CHANNELS_FORM.assignedChannels)
|
||||||
|
.click()
|
||||||
|
.get(menageSelector)
|
||||||
|
.click();
|
||||||
|
cy.addAliasToGraphRequest("ProductChannelListingUpdate");
|
||||||
|
cy.get(BUTTON_SELECTORS.confirm)
|
||||||
|
.click()
|
||||||
|
.wait("@ProductChannelListingUpdate");
|
||||||
|
}
|
||||||
|
export function fillUpCommonFieldsForProductType({
|
||||||
|
generalInfo,
|
||||||
|
seo,
|
||||||
|
metadata,
|
||||||
|
productOrganization
|
||||||
|
}) {
|
||||||
|
fillUpProductGeneralInfo(generalInfo);
|
||||||
|
editSeoSettings(seo);
|
||||||
|
addMetadataField(metadata.public);
|
||||||
|
addMetadataField(metadata.private);
|
||||||
|
return fillUpProductOrganization(productOrganization).then(
|
||||||
|
productOrgResp => productOrgResp
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export function fillUpProductGeneralInfo({ name, description, rating }) {
|
||||||
|
cy.get(PRODUCT_DETAILS.productNameInput)
|
||||||
|
.click()
|
||||||
|
.type(name)
|
||||||
|
.get(PRODUCT_DETAILS.descriptionInput)
|
||||||
|
.type(description)
|
||||||
|
.get(PRODUCT_DETAILS.ratingInput)
|
||||||
|
.type(rating);
|
||||||
|
}
|
||||||
|
export function fillUpProductOrganization({
|
||||||
|
productType,
|
||||||
|
category,
|
||||||
|
collection
|
||||||
|
}) {
|
||||||
|
const organization = {};
|
||||||
|
return fillAutocompleteSelect(PRODUCT_DETAILS.productTypeInput, productType)
|
||||||
|
.then(selected => {
|
||||||
|
organization.productType = selected;
|
||||||
|
fillAutocompleteSelect(PRODUCT_DETAILS.categoryInput, category);
|
||||||
|
})
|
||||||
|
.then(selected => {
|
||||||
|
organization.category = selected;
|
||||||
|
fillAutocompleteSelect(PRODUCT_DETAILS.collectionInput, collection);
|
||||||
|
})
|
||||||
|
.then(selected => {
|
||||||
|
organization.collection = selected;
|
||||||
|
return organization;
|
||||||
|
});
|
||||||
|
}
|
11
cypress/steps/catalog/seoSteps.js
Normal file
11
cypress/steps/catalog/seoSteps.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import { SEO_FORM } from "../../elements/shared/seo/seo-form-selectors";
|
||||||
|
export function editSeoSettings({ slug, title, description }) {
|
||||||
|
cy.get(SEO_FORM.editSeoSettings)
|
||||||
|
.click()
|
||||||
|
.get(SEO_FORM.slugInput)
|
||||||
|
.type(slug)
|
||||||
|
.get(SEO_FORM.titleInput)
|
||||||
|
.type(title)
|
||||||
|
.get(SEO_FORM.descriptionInput)
|
||||||
|
.type(description, { delay: 0 });
|
||||||
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
import { ADD_CHANNEL_FORM_SELECTORS } from "../elements/channels/add-channel-form-selectors";
|
import { ADD_CHANNEL_FORM_SELECTORS } from "../elements/channels/add-channel-form-selectors";
|
||||||
|
import { AVAILABLE_CHANNELS_FORM } from "../elements/channels/available-channels-form";
|
||||||
import { CHANNEL_FORM_SELECTORS } from "../elements/channels/channel-form-selectors";
|
import { CHANNEL_FORM_SELECTORS } from "../elements/channels/channel-form-selectors";
|
||||||
import { CHANNELS_SELECTORS } from "../elements/channels/channels-selectors";
|
import { CHANNELS_SELECTORS } from "../elements/channels/channels-selectors";
|
||||||
import { MENAGE_CHANNEL_AVAILABILITY } from "../elements/channels/menage-channel-availability";
|
import { SELECT_CHANNELS_TO_ASSIGN } from "../elements/channels/select-channels-to-assign";
|
||||||
import { HEADER_SELECTORS } from "../elements/header/header-selectors";
|
import { HEADER_SELECTORS } from "../elements/header/header-selectors";
|
||||||
import { BUTTON_SELECTORS } from "../elements/shared/button-selectors";
|
import { BUTTON_SELECTORS } from "../elements/shared/button-selectors";
|
||||||
|
|
||||||
|
@ -39,14 +40,21 @@ export function selectChannelInHeader(channelName) {
|
||||||
.click();
|
.click();
|
||||||
}
|
}
|
||||||
export function selectChannelInDetailsPages(channelName) {
|
export function selectChannelInDetailsPages(channelName) {
|
||||||
cy.get(MENAGE_CHANNEL_AVAILABILITY.availableManageButton)
|
cy.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY.allChannelsInput)
|
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||||
.click()
|
.click();
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY.channelsAvailabilityForm)
|
if (channelName) {
|
||||||
|
cy.get(SELECT_CHANNELS_TO_ASSIGN.listOfChannels)
|
||||||
.contains(channelName)
|
.contains(channelName)
|
||||||
.click()
|
.click();
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY.dialog)
|
} else {
|
||||||
|
cy.get(SELECT_CHANNELS_TO_ASSIGN.channelRow)
|
||||||
|
.first()
|
||||||
|
.find(SELECT_CHANNELS_TO_ASSIGN.channelCheckbox)
|
||||||
|
.click();
|
||||||
|
}
|
||||||
|
cy.get(SELECT_CHANNELS_TO_ASSIGN.selectChannelsForm)
|
||||||
.find(BUTTON_SELECTORS.submit)
|
.find(BUTTON_SELECTORS.submit)
|
||||||
.click();
|
.click();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,30 @@
|
||||||
import { COLLECTION_SELECTORS } from "../elements/catalog/collection-selectors";
|
import { COLLECTION_SELECTORS } from "../elements/catalog/collection-selectors";
|
||||||
import { ASSIGN_PRODUCTS_SELECTORS } from "../elements/catalog/products/assign-products-selectors";
|
import { ASSIGN_PRODUCTS_SELECTORS } from "../elements/catalog/products/assign-products-selectors";
|
||||||
import { MENAGE_CHANNEL_AVAILABILITY_FORM } from "../elements/channels/menage-channel-availability-form";
|
import { AVAILABLE_CHANNELS_FORM } from "../elements/channels/available-channels-form";
|
||||||
|
import { SELECT_CHANNELS_TO_ASSIGN } from "../elements/channels/select-channels-to-assign";
|
||||||
import { BUTTON_SELECTORS } from "../elements/shared/button-selectors";
|
import { BUTTON_SELECTORS } from "../elements/shared/button-selectors";
|
||||||
|
|
||||||
export function createCollection(collectionName, isPublished, channel) {
|
export function createCollection(collectionName, isPublished, channel) {
|
||||||
const publishedSelector = isPublished
|
const publishedSelector = isPublished
|
||||||
? MENAGE_CHANNEL_AVAILABILITY_FORM.radioButtonsValueTrue
|
? AVAILABLE_CHANNELS_FORM.radioButtonsValueTrue
|
||||||
: MENAGE_CHANNEL_AVAILABILITY_FORM.radioButtonsValueFalse;
|
: AVAILABLE_CHANNELS_FORM.radioButtonsValueFalse;
|
||||||
|
|
||||||
cy.get(COLLECTION_SELECTORS.createCollectionButton)
|
cy.get(COLLECTION_SELECTORS.createCollectionButton)
|
||||||
.click()
|
.click()
|
||||||
.get(COLLECTION_SELECTORS.nameInput)
|
.get(COLLECTION_SELECTORS.nameInput)
|
||||||
.type(collectionName)
|
.type(collectionName)
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY_FORM.channelsMenageButton)
|
.get(AVAILABLE_CHANNELS_FORM.menageChannelsButton)
|
||||||
.click()
|
.click()
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY_FORM.allChannelsCheckbox)
|
.get(SELECT_CHANNELS_TO_ASSIGN.allChannelsCheckbox)
|
||||||
.click();
|
.click();
|
||||||
cy.contains(MENAGE_CHANNEL_AVAILABILITY_FORM.channelRow, channel.name)
|
cy.contains(SELECT_CHANNELS_TO_ASSIGN.channelRow, channel.name)
|
||||||
.find(MENAGE_CHANNEL_AVAILABILITY_FORM.channelCheckbox)
|
.find(SELECT_CHANNELS_TO_ASSIGN.channelCheckbox)
|
||||||
.click()
|
.click()
|
||||||
.get(BUTTON_SELECTORS.submit)
|
.get(BUTTON_SELECTORS.submit)
|
||||||
.click()
|
.click()
|
||||||
.get(MENAGE_CHANNEL_AVAILABILITY_FORM.channelsAvailabilityItem)
|
.get(AVAILABLE_CHANNELS_FORM.availableChannel)
|
||||||
.click()
|
.click()
|
||||||
.get(
|
.get(`${AVAILABLE_CHANNELS_FORM.publishedRadioButtons}${publishedSelector}`)
|
||||||
`${MENAGE_CHANNEL_AVAILABILITY_FORM.publishedCheckbox}${publishedSelector}`
|
|
||||||
)
|
|
||||||
.click();
|
.click();
|
||||||
cy.addAliasToGraphRequest("CreateCollection");
|
cy.addAliasToGraphRequest("CreateCollection");
|
||||||
cy.get(COLLECTION_SELECTORS.saveButton).click();
|
cy.get(COLLECTION_SELECTORS.saveButton).click();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ASSIGN_PRODUCTS_SELECTORS } from "../../elements/catalog/assign-products";
|
import { ASSIGN_PRODUCTS_SELECTORS } from "../../elements/catalog/products/assign-products";
|
||||||
import { SALES_SELECTORS } from "../../elements/discounts/sales";
|
import { SALES_SELECTORS } from "../../elements/discounts/sales";
|
||||||
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
|
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
|
||||||
import { formatDate } from "../../support/formatDate";
|
import { formatDate } from "../../support/formatDate";
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
import { PRODUCTS_SELECTORS } from "../../elements/catalog/products/product-selectors";
|
|
||||||
|
|
||||||
const valueTrue = PRODUCTS_SELECTORS.radioButtonsValueTrue;
|
|
||||||
const valueFalse = PRODUCTS_SELECTORS.radioButtonsValueFalse;
|
|
||||||
|
|
||||||
export function updateProductIsAvailableForPurchase(
|
|
||||||
productUrl,
|
|
||||||
isAvailableForPurchase
|
|
||||||
) {
|
|
||||||
const isAvailableForPurchaseSelector = isAvailableForPurchase
|
|
||||||
? valueTrue
|
|
||||||
: valueFalse;
|
|
||||||
const availableForPurchaseSelector = `${PRODUCTS_SELECTORS.availableForPurchaseRadioButtons}${isAvailableForPurchaseSelector}`;
|
|
||||||
updateProductMenageInChannel(productUrl, availableForPurchaseSelector);
|
|
||||||
}
|
|
||||||
export function updateProductPublish(productUrl, isPublished) {
|
|
||||||
const isPublishedSelector = isPublished ? valueTrue : valueFalse;
|
|
||||||
const publishedSelector = `${PRODUCTS_SELECTORS.publishedRadioButtons}${isPublishedSelector}`;
|
|
||||||
updateProductMenageInChannel(productUrl, publishedSelector);
|
|
||||||
}
|
|
||||||
export function updateProductVisibleInListings(productUrl) {
|
|
||||||
updateProductMenageInChannel(
|
|
||||||
productUrl,
|
|
||||||
PRODUCTS_SELECTORS.visibleInListingsButton
|
|
||||||
);
|
|
||||||
}
|
|
||||||
function updateProductMenageInChannel(productUrl, menageSelector) {
|
|
||||||
cy.visit(productUrl)
|
|
||||||
.get(PRODUCTS_SELECTORS.assignedChannels)
|
|
||||||
.click()
|
|
||||||
.get(menageSelector)
|
|
||||||
.click();
|
|
||||||
cy.addAliasToGraphRequest("ProductChannelListingUpdate");
|
|
||||||
cy.get(PRODUCTS_SELECTORS.saveBtn)
|
|
||||||
.click()
|
|
||||||
.wait("@ProductChannelListingUpdate");
|
|
||||||
}
|
|
22
cypress/steps/shared/autocompleteSelect.js
Normal file
22
cypress/steps/shared/autocompleteSelect.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
|
||||||
|
|
||||||
|
export function fillAutocompleteSelect(selectSelector, option) {
|
||||||
|
cy.get(selectSelector)
|
||||||
|
.click()
|
||||||
|
.get(BUTTON_SELECTORS.selectOption)
|
||||||
|
.should("be.visible");
|
||||||
|
if (option) {
|
||||||
|
cy.get(selectSelector).type(option);
|
||||||
|
cy.contains(BUTTON_SELECTORS.selectOption, option).click();
|
||||||
|
cy.wrap(option).as("option");
|
||||||
|
} else {
|
||||||
|
cy.get(BUTTON_SELECTORS.selectOption)
|
||||||
|
.first()
|
||||||
|
.invoke("text")
|
||||||
|
.as("option");
|
||||||
|
cy.get(BUTTON_SELECTORS.selectOption)
|
||||||
|
.first()
|
||||||
|
.click();
|
||||||
|
}
|
||||||
|
return cy.get("@option");
|
||||||
|
}
|
63
cypress/utils/products/checkProductInfo.js
Normal file
63
cypress/utils/products/checkProductInfo.js
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
const { softExpect } = chai;
|
||||||
|
export function expectCorrectProductInformation(productResp, productData) {
|
||||||
|
expectCorrectGeneralInformation(productResp, productData.generalInfo);
|
||||||
|
expectCorrectSeoInfo(productResp, productData.seo);
|
||||||
|
expectCorrectMetadataInfo(productResp.metadata, productData.metadata.public);
|
||||||
|
expectCorrectMetadataInfo(
|
||||||
|
productResp.privateMetadata,
|
||||||
|
productData.metadata.private
|
||||||
|
);
|
||||||
|
expectCorrectProductOrgInfo(productResp, productData.productOrganization);
|
||||||
|
expectCorrectAttribute(productResp.attributes, productData.attribute);
|
||||||
|
}
|
||||||
|
export function expectCorrectProductVariantInformation(
|
||||||
|
variantsResp,
|
||||||
|
variantName,
|
||||||
|
prices
|
||||||
|
) {
|
||||||
|
softExpect(
|
||||||
|
expect(variantsResp).to.have.length(1),
|
||||||
|
softExpect(variantsResp[0].sku).to.be.eq(variantName),
|
||||||
|
softExpect(variantsResp[0].channelListings[0].costPrice.amount).to.be.eq(
|
||||||
|
prices.costPrice
|
||||||
|
),
|
||||||
|
softExpect(variantsResp[0].channelListings[0].price.amount).to.be.eq(
|
||||||
|
prices.sellingPrice
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function expectCorrectGeneralInformation(productResp, generalInfo) {
|
||||||
|
softExpect(productResp.name).to.be.eq(generalInfo.name);
|
||||||
|
softExpect(productResp.description).includes(generalInfo.description);
|
||||||
|
softExpect(productResp.rating).to.be.eq(generalInfo.rating);
|
||||||
|
}
|
||||||
|
function expectCorrectSeoInfo(productResp, seo) {
|
||||||
|
softExpect(productResp.slug).to.be.eq(seo.slug);
|
||||||
|
softExpect(productResp.seoTitle).to.be.eq(seo.title);
|
||||||
|
softExpect(productResp.seoDescription).to.be.eq(seo.description);
|
||||||
|
}
|
||||||
|
function expectCorrectMetadataInfo(metadataResp, expectedMetadata) {
|
||||||
|
softExpect(
|
||||||
|
expect(metadataResp).to.have.length(1),
|
||||||
|
softExpect(metadataResp[0].key).to.be.eq(expectedMetadata.name),
|
||||||
|
softExpect(metadataResp[0].value).to.be.eq(expectedMetadata.value)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function expectCorrectProductOrgInfo(productResp, productOrganization) {
|
||||||
|
softExpect(productResp.productType.name).to.be.eq(
|
||||||
|
productOrganization.productType
|
||||||
|
);
|
||||||
|
softExpect(productResp.category.name).to.be.eq(productOrganization.category);
|
||||||
|
softExpect(
|
||||||
|
expect(productResp.collections).to.have.length(1),
|
||||||
|
softExpect(productResp.collections[0].name).to.be.eq(
|
||||||
|
productOrganization.collection
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function expectCorrectAttribute(attributes, attribute) {
|
||||||
|
softExpect(
|
||||||
|
expect(attributes).to.have.length(1),
|
||||||
|
softExpect(attributes[0].attribute.name).to.be.eq(attribute.name)
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import * as attributeRequest from "../apiRequests/Attribute";
|
import * as attributeRequest from "../../apiRequests/Attribute";
|
||||||
import * as categoryRequest from "../apiRequests/Category";
|
import * as categoryRequest from "../../apiRequests/Category";
|
||||||
import * as productRequest from "../apiRequests/Product";
|
import * as productRequest from "../../apiRequests/Product";
|
||||||
|
|
||||||
export function createProductInChannel({
|
export function createProductInChannel({
|
||||||
name,
|
name,
|
||||||
|
@ -70,9 +70,9 @@ export function createAttribute(name, attributeValues) {
|
||||||
.createAttribute(name, attributeValues)
|
.createAttribute(name, attributeValues)
|
||||||
.its("body.data.attributeCreate.attribute");
|
.its("body.data.attributeCreate.attribute");
|
||||||
}
|
}
|
||||||
export function createTypeProduct(name, attributeId) {
|
export function createTypeProduct(name, attributeId, hasVariants) {
|
||||||
return productRequest
|
return productRequest
|
||||||
.createTypeProduct(name, attributeId)
|
.createTypeProduct(name, attributeId, hasVariants)
|
||||||
.its("body.data.productTypeCreate.productType");
|
.its("body.data.productTypeCreate.productType");
|
||||||
}
|
}
|
||||||
export function createCategory(name) {
|
export function createCategory(name) {
|
|
@ -6841,6 +6841,10 @@
|
||||||
"context": "event",
|
"context": "event",
|
||||||
"string": "Order updated"
|
"string": "Order updated"
|
||||||
},
|
},
|
||||||
|
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1616635110": {
|
||||||
|
"context": "event",
|
||||||
|
"string": "User notified"
|
||||||
|
},
|
||||||
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2126893364": {
|
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2126893364": {
|
||||||
"context": "event",
|
"context": "event",
|
||||||
"string": "Product variant updated"
|
"string": "Product variant updated"
|
||||||
|
|
|
@ -74,6 +74,7 @@ input AccountInput {
|
||||||
lastName: String
|
lastName: String
|
||||||
defaultBillingAddress: AddressInput
|
defaultBillingAddress: AddressInput
|
||||||
defaultShippingAddress: AddressInput
|
defaultShippingAddress: AddressInput
|
||||||
|
languageCode: LanguageCodeEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountRegister {
|
type AccountRegister {
|
||||||
|
@ -87,6 +88,7 @@ input AccountRegisterInput {
|
||||||
email: String!
|
email: String!
|
||||||
password: String!
|
password: String!
|
||||||
redirectUrl: String
|
redirectUrl: String
|
||||||
|
languageCode: LanguageCodeEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
type AccountRequestDeletion {
|
type AccountRequestDeletion {
|
||||||
|
@ -879,6 +881,7 @@ type Checkout implements Node & ObjectWithMetadata {
|
||||||
subtotalPrice: TaxedMoney
|
subtotalPrice: TaxedMoney
|
||||||
token: UUID!
|
token: UUID!
|
||||||
totalPrice: TaxedMoney
|
totalPrice: TaxedMoney
|
||||||
|
languageCode: LanguageCodeEnum!
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckoutAddPromoCode {
|
type CheckoutAddPromoCode {
|
||||||
|
@ -925,6 +928,7 @@ input CheckoutCreateInput {
|
||||||
email: String
|
email: String
|
||||||
shippingAddress: AddressInput
|
shippingAddress: AddressInput
|
||||||
billingAddress: AddressInput
|
billingAddress: AddressInput
|
||||||
|
languageCode: LanguageCodeEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckoutCustomerAttach {
|
type CheckoutCustomerAttach {
|
||||||
|
@ -977,6 +981,12 @@ enum CheckoutErrorCode {
|
||||||
CHANNEL_INACTIVE
|
CHANNEL_INACTIVE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CheckoutLanguageCodeUpdate {
|
||||||
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
|
checkout: Checkout
|
||||||
|
checkoutErrors: [CheckoutError!]!
|
||||||
|
}
|
||||||
|
|
||||||
type CheckoutLine implements Node {
|
type CheckoutLine implements Node {
|
||||||
id: ID!
|
id: ID!
|
||||||
variant: ProductVariant!
|
variant: ProductVariant!
|
||||||
|
@ -1253,6 +1263,7 @@ input ConfigurationItemInput {
|
||||||
|
|
||||||
enum ConfigurationTypeFieldEnum {
|
enum ConfigurationTypeFieldEnum {
|
||||||
STRING
|
STRING
|
||||||
|
MULTILINE
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
SECRET
|
SECRET
|
||||||
PASSWORD
|
PASSWORD
|
||||||
|
@ -1607,6 +1618,7 @@ input CustomerInput {
|
||||||
email: String
|
email: String
|
||||||
isActive: Boolean
|
isActive: Boolean
|
||||||
note: String
|
note: String
|
||||||
|
languageCode: LanguageCodeEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
type CustomerUpdate {
|
type CustomerUpdate {
|
||||||
|
@ -2227,7 +2239,7 @@ type InvoiceRequestDelete {
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
type InvoiceSendEmail {
|
type InvoiceSendNotification {
|
||||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||||
invoiceErrors: [InvoiceError!]!
|
invoiceErrors: [InvoiceError!]!
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
|
@ -2736,7 +2748,7 @@ type Mutation {
|
||||||
invoiceCreate(input: InvoiceCreateInput!, orderId: ID!): InvoiceCreate
|
invoiceCreate(input: InvoiceCreateInput!, orderId: ID!): InvoiceCreate
|
||||||
invoiceDelete(id: ID!): InvoiceDelete
|
invoiceDelete(id: ID!): InvoiceDelete
|
||||||
invoiceUpdate(id: ID!, input: UpdateInvoiceInput!): InvoiceUpdate
|
invoiceUpdate(id: ID!, input: UpdateInvoiceInput!): InvoiceUpdate
|
||||||
invoiceSendEmail(id: ID!): InvoiceSendEmail
|
invoiceSendNotification(id: ID!): InvoiceSendNotification
|
||||||
giftCardActivate(id: ID!): GiftCardActivate
|
giftCardActivate(id: ID!): GiftCardActivate
|
||||||
giftCardCreate(input: GiftCardCreateInput!): GiftCardCreate
|
giftCardCreate(input: GiftCardCreateInput!): GiftCardCreate
|
||||||
giftCardDeactivate(id: ID!): GiftCardDeactivate
|
giftCardDeactivate(id: ID!): GiftCardDeactivate
|
||||||
|
@ -2774,6 +2786,7 @@ type Mutation {
|
||||||
checkoutPaymentCreate(checkoutId: ID!, input: PaymentInput!): CheckoutPaymentCreate
|
checkoutPaymentCreate(checkoutId: ID!, input: PaymentInput!): CheckoutPaymentCreate
|
||||||
checkoutShippingAddressUpdate(checkoutId: ID!, shippingAddress: AddressInput!): CheckoutShippingAddressUpdate
|
checkoutShippingAddressUpdate(checkoutId: ID!, shippingAddress: AddressInput!): CheckoutShippingAddressUpdate
|
||||||
checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!): CheckoutShippingMethodUpdate
|
checkoutShippingMethodUpdate(checkoutId: ID, shippingMethodId: ID!): CheckoutShippingMethodUpdate
|
||||||
|
checkoutLanguageCodeUpdate(checkoutId: ID!, languageCode: LanguageCodeEnum!): CheckoutLanguageCodeUpdate
|
||||||
channelCreate(input: ChannelCreateInput!): ChannelCreate
|
channelCreate(input: ChannelCreateInput!): ChannelCreate
|
||||||
channelUpdate(id: ID!, input: ChannelUpdateInput!): ChannelUpdate
|
channelUpdate(id: ID!, input: ChannelUpdateInput!): ChannelUpdate
|
||||||
channelDelete(id: ID!, input: ChannelDeleteInput): ChannelDelete
|
channelDelete(id: ID!, input: ChannelDeleteInput): ChannelDelete
|
||||||
|
@ -2873,7 +2886,6 @@ type Order implements Node & ObjectWithMetadata {
|
||||||
created: DateTime!
|
created: DateTime!
|
||||||
status: OrderStatus!
|
status: OrderStatus!
|
||||||
user: User
|
user: User
|
||||||
languageCode: String!
|
|
||||||
trackingClientId: String!
|
trackingClientId: String!
|
||||||
billingAddress: Address
|
billingAddress: Address
|
||||||
shippingAddress: Address
|
shippingAddress: Address
|
||||||
|
@ -2912,6 +2924,8 @@ type Order implements Node & ObjectWithMetadata {
|
||||||
totalBalance: Money!
|
totalBalance: Money!
|
||||||
userEmail: String
|
userEmail: String
|
||||||
isShippingRequired: Boolean!
|
isShippingRequired: Boolean!
|
||||||
|
languageCode: String! @deprecated(reason: "Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0.")
|
||||||
|
languageCodeEnum: LanguageCodeEnum!
|
||||||
discount: Money @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
discount: Money @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
||||||
discountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
discountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
||||||
translatedDiscountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
translatedDiscountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.")
|
||||||
|
@ -5497,6 +5511,7 @@ type User implements Node & ObjectWithMetadata {
|
||||||
avatar(size: Int): Image
|
avatar(size: Int): Image
|
||||||
events: [CustomerEvent]
|
events: [CustomerEvent]
|
||||||
storedPaymentSources: [PaymentSource]
|
storedPaymentSources: [PaymentSource]
|
||||||
|
languageCode: LanguageCodeEnum!
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserAvatarDelete {
|
type UserAvatarDelete {
|
||||||
|
@ -5536,6 +5551,7 @@ input UserCreateInput {
|
||||||
email: String
|
email: String
|
||||||
isActive: Boolean
|
isActive: Boolean
|
||||||
note: String
|
note: String
|
||||||
|
languageCode: LanguageCodeEnum
|
||||||
redirectUrl: String
|
redirectUrl: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5950,6 +5966,7 @@ enum WebhookEventTypeEnum {
|
||||||
CHECKOUT_CREATED
|
CHECKOUT_CREATED
|
||||||
CHECKOUT_UPDATED
|
CHECKOUT_UPDATED
|
||||||
FULFILLMENT_CREATED
|
FULFILLMENT_CREATED
|
||||||
|
NOTIFY_USER
|
||||||
PAGE_CREATED
|
PAGE_CREATED
|
||||||
PAGE_UPDATED
|
PAGE_UPDATED
|
||||||
PAGE_DELETED
|
PAGE_DELETED
|
||||||
|
@ -5976,6 +5993,7 @@ enum WebhookSampleEventTypeEnum {
|
||||||
CHECKOUT_CREATED
|
CHECKOUT_CREATED
|
||||||
CHECKOUT_UPDATED
|
CHECKOUT_UPDATED
|
||||||
FULFILLMENT_CREATED
|
FULFILLMENT_CREATED
|
||||||
|
NOTIFY_USER
|
||||||
PAGE_CREATED
|
PAGE_CREATED
|
||||||
PAGE_UPDATED
|
PAGE_UPDATED
|
||||||
PAGE_DELETED
|
PAGE_DELETED
|
||||||
|
|
|
@ -163,7 +163,12 @@ const SeoForm: React.FC<SeoFormProps> = props => {
|
||||||
defaultMessage: "Search Engine Preview"
|
defaultMessage: "Search Engine Preview"
|
||||||
})}
|
})}
|
||||||
toolbar={
|
toolbar={
|
||||||
<Button color="primary" variant="text" onClick={toggleExpansion}>
|
<Button
|
||||||
|
color="primary"
|
||||||
|
variant="text"
|
||||||
|
onClick={toggleExpansion}
|
||||||
|
data-test-id="edit-seo"
|
||||||
|
>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Edit website SEO"
|
defaultMessage="Edit website SEO"
|
||||||
description="button"
|
description="button"
|
||||||
|
|
|
@ -717,7 +717,7 @@ const invoiceEmailSendMutation = gql`
|
||||||
${invoiceErrorFragment}
|
${invoiceErrorFragment}
|
||||||
${invoiceFragment}
|
${invoiceFragment}
|
||||||
mutation InvoiceEmailSend($id: ID!) {
|
mutation InvoiceEmailSend($id: ID!) {
|
||||||
invoiceSendEmail(id: $id) {
|
invoiceSendNotification(id: $id) {
|
||||||
errors: invoiceErrors {
|
errors: invoiceErrors {
|
||||||
...InvoiceErrorFragment
|
...InvoiceErrorFragment
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,13 @@ import { InvoiceErrorCode, JobStatusEnum } from "./../../types/globalTypes";
|
||||||
// GraphQL mutation operation: InvoiceEmailSend
|
// GraphQL mutation operation: InvoiceEmailSend
|
||||||
// ====================================================
|
// ====================================================
|
||||||
|
|
||||||
export interface InvoiceEmailSend_invoiceSendEmail_errors {
|
export interface InvoiceEmailSend_invoiceSendNotification_errors {
|
||||||
__typename: "InvoiceError";
|
__typename: "InvoiceError";
|
||||||
code: InvoiceErrorCode;
|
code: InvoiceErrorCode;
|
||||||
field: string | null;
|
field: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InvoiceEmailSend_invoiceSendEmail_invoice {
|
export interface InvoiceEmailSend_invoiceSendNotification_invoice {
|
||||||
__typename: "Invoice";
|
__typename: "Invoice";
|
||||||
id: string;
|
id: string;
|
||||||
number: string | null;
|
number: string | null;
|
||||||
|
@ -24,14 +24,14 @@ export interface InvoiceEmailSend_invoiceSendEmail_invoice {
|
||||||
status: JobStatusEnum;
|
status: JobStatusEnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InvoiceEmailSend_invoiceSendEmail {
|
export interface InvoiceEmailSend_invoiceSendNotification {
|
||||||
__typename: "InvoiceSendEmail";
|
__typename: "InvoiceSendNotification";
|
||||||
errors: InvoiceEmailSend_invoiceSendEmail_errors[];
|
errors: InvoiceEmailSend_invoiceSendNotification_errors[];
|
||||||
invoice: InvoiceEmailSend_invoiceSendEmail_invoice | null;
|
invoice: InvoiceEmailSend_invoiceSendNotification_invoice | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InvoiceEmailSend {
|
export interface InvoiceEmailSend {
|
||||||
invoiceSendEmail: InvoiceEmailSend_invoiceSendEmail | null;
|
invoiceSendNotification: InvoiceEmailSend_invoiceSendNotification | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InvoiceEmailSendVariables {
|
export interface InvoiceEmailSendVariables {
|
||||||
|
|
|
@ -279,7 +279,7 @@ export const OrderDetailsMessages: React.FC<OrderDetailsMessages> = ({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleInvoiceSend = (data: InvoiceEmailSend) => {
|
const handleInvoiceSend = (data: InvoiceEmailSend) => {
|
||||||
const errs = data.invoiceSendEmail?.errors;
|
const errs = data.invoiceSendNotification?.errors;
|
||||||
if (errs.length === 0) {
|
if (errs.length === 0) {
|
||||||
pushMessage({
|
pushMessage({
|
||||||
text: intl.formatMessage({
|
text: intl.formatMessage({
|
||||||
|
|
|
@ -21681,6 +21681,47 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook default 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id"
|
class="MuiFormControlLabel-root-id"
|
||||||
|
@ -22973,6 +23014,47 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook form errors 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id"
|
class="MuiFormControlLabel-root-id"
|
||||||
|
@ -24281,6 +24363,49 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook loading 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="true"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
disabled=""
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
||||||
|
@ -25612,6 +25737,47 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details default 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id"
|
class="MuiFormControlLabel-root-id"
|
||||||
|
@ -26910,6 +27076,47 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details form errors 1`] =
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id"
|
class="MuiFormControlLabel-root-id"
|
||||||
|
@ -28224,6 +28431,49 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details loading 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="true"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
disabled=""
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
|
||||||
|
@ -29543,6 +29793,47 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details unnamed 1`] = `
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="MuiFormControlLabel-root-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-disabled="false"
|
||||||
|
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="MuiIconButton-label-id"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="PrivateSwitchBase-input-id"
|
||||||
|
data-indeterminate="false"
|
||||||
|
name="NOTIFY_USER"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
class="MuiSvgIcon-root-id"
|
||||||
|
focusable="false"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
fill="none"
|
||||||
|
height="14"
|
||||||
|
stroke="currentColor"
|
||||||
|
width="14"
|
||||||
|
x="5"
|
||||||
|
y="5"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
|
||||||
|
>
|
||||||
|
User notified
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
class="MuiFormControlLabel-root-id"
|
class="MuiFormControlLabel-root-id"
|
||||||
|
@ -40897,6 +41188,7 @@ exports[`Storyshots Views / Categories / Create category When loading 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -41179,6 +41471,7 @@ exports[`Storyshots Views / Categories / Create category default 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -41468,6 +41761,7 @@ exports[`Storyshots Views / Categories / Create category form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -41887,6 +42181,7 @@ exports[`Storyshots Views / Categories / Update category default 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -42660,6 +42955,7 @@ exports[`Storyshots Views / Categories / Update category form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -43352,6 +43648,7 @@ exports[`Storyshots Views / Categories / Update category loading 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -43967,6 +44264,7 @@ exports[`Storyshots Views / Categories / Update category no background 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -44733,6 +45031,7 @@ exports[`Storyshots Views / Categories / Update category no products 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -45504,6 +45803,7 @@ exports[`Storyshots Views / Categories / Update category no subcategories 1`] =
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -46270,6 +46570,7 @@ exports[`Storyshots Views / Categories / Update category products 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -51296,6 +51597,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details d
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -52561,6 +52863,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details f
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -53245,6 +53548,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details l
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -54068,6 +54372,7 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details n
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -55797,6 +56102,7 @@ exports[`Storyshots Views / Collections / Create collection default 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -56506,6 +56812,7 @@ exports[`Storyshots Views / Collections / Create collection form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -57209,6 +57516,7 @@ exports[`Storyshots Views / Collections / Create collection loading 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -136114,6 +136422,7 @@ exports[`Storyshots Views / Pages / Page details default 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -137008,6 +137317,7 @@ exports[`Storyshots Views / Pages / Page details form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -137907,6 +138217,7 @@ exports[`Storyshots Views / Pages / Page details loading 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -162254,6 +162565,7 @@ exports[`Storyshots Views / Products / Create product When loading 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -163251,6 +163563,7 @@ exports[`Storyshots Views / Products / Create product default 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -164389,6 +164702,7 @@ exports[`Storyshots Views / Products / Create product form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -171947,6 +172261,7 @@ exports[`Storyshots Views / Products / Product edit form errors 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -173421,6 +173736,7 @@ exports[`Storyshots Views / Products / Product edit no product attributes 1`] =
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -175139,6 +175455,7 @@ exports[`Storyshots Views / Products / Product edit no stock and no variants 1`]
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -176777,6 +177094,7 @@ exports[`Storyshots Views / Products / Product edit no stock, no variants and no
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -178637,6 +178955,7 @@ exports[`Storyshots Views / Products / Product edit no variants 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -180357,6 +180676,7 @@ exports[`Storyshots Views / Products / Product edit when data is fully loaded 1`
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -181666,6 +181986,7 @@ exports[`Storyshots Views / Products / Product edit when loading data 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -183039,6 +183360,7 @@ exports[`Storyshots Views / Products / Product edit when product has no images 1
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -184899,6 +185221,7 @@ exports[`Storyshots Views / Products / Product edit when product has no variants
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
@ -186619,6 +186942,7 @@ exports[`Storyshots Views / Products / Product edit with channels 1`] = `
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-text-id MuiButton-textPrimary-id"
|
||||||
|
data-test-id="edit-seo"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const getParsedTranslationInputData = ({
|
||||||
|
|
||||||
if (fieldsToParse.includes(fieldName)) {
|
if (fieldsToParse.includes(fieldName)) {
|
||||||
return {
|
return {
|
||||||
description: getParsedDataForJsonStringField(data as OutputData)
|
[fieldName]: getParsedDataForJsonStringField(data as OutputData)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { LanguageCodeEnum } from "../../types/globalTypes";
|
||||||
import TranslationsPagesPage from "../components/TranslationsPagesPage";
|
import TranslationsPagesPage from "../components/TranslationsPagesPage";
|
||||||
import { TypedUpdatePageTranslations } from "../mutations";
|
import { TypedUpdatePageTranslations } from "../mutations";
|
||||||
import { usePageTranslationDetails } from "../queries";
|
import { usePageTranslationDetails } from "../queries";
|
||||||
import { TranslationInputFieldName } from "../types";
|
import { PageTranslationInputFieldName } from "../types";
|
||||||
import { UpdatePageTranslations } from "../types/UpdatePageTranslations";
|
import { UpdatePageTranslations } from "../types/UpdatePageTranslations";
|
||||||
import {
|
import {
|
||||||
languageEntitiesUrl,
|
languageEntitiesUrl,
|
||||||
|
@ -68,7 +68,7 @@ const TranslationsPages: React.FC<TranslationsPagesProps> = ({
|
||||||
<TypedUpdatePageTranslations onCompleted={onUpdate}>
|
<TypedUpdatePageTranslations onCompleted={onUpdate}>
|
||||||
{(updateTranslations, updateTranslationsOpts) => {
|
{(updateTranslations, updateTranslationsOpts) => {
|
||||||
const handleSubmit = (
|
const handleSubmit = (
|
||||||
fieldName: TranslationInputFieldName,
|
fieldName: PageTranslationInputFieldName,
|
||||||
data: string
|
data: string
|
||||||
) => {
|
) => {
|
||||||
updateTranslations({
|
updateTranslations({
|
||||||
|
|
|
@ -151,6 +151,7 @@ export enum CollectionSortField {
|
||||||
|
|
||||||
export enum ConfigurationTypeFieldEnum {
|
export enum ConfigurationTypeFieldEnum {
|
||||||
BOOLEAN = "BOOLEAN",
|
BOOLEAN = "BOOLEAN",
|
||||||
|
MULTILINE = "MULTILINE",
|
||||||
PASSWORD = "PASSWORD",
|
PASSWORD = "PASSWORD",
|
||||||
SECRET = "SECRET",
|
SECRET = "SECRET",
|
||||||
SECRETMULTILINE = "SECRETMULTILINE",
|
SECRETMULTILINE = "SECRETMULTILINE",
|
||||||
|
@ -999,6 +1000,7 @@ export enum WebhookEventTypeEnum {
|
||||||
INVOICE_DELETED = "INVOICE_DELETED",
|
INVOICE_DELETED = "INVOICE_DELETED",
|
||||||
INVOICE_REQUESTED = "INVOICE_REQUESTED",
|
INVOICE_REQUESTED = "INVOICE_REQUESTED",
|
||||||
INVOICE_SENT = "INVOICE_SENT",
|
INVOICE_SENT = "INVOICE_SENT",
|
||||||
|
NOTIFY_USER = "NOTIFY_USER",
|
||||||
ORDER_CANCELLED = "ORDER_CANCELLED",
|
ORDER_CANCELLED = "ORDER_CANCELLED",
|
||||||
ORDER_CONFIRMED = "ORDER_CONFIRMED",
|
ORDER_CONFIRMED = "ORDER_CONFIRMED",
|
||||||
ORDER_CREATED = "ORDER_CREATED",
|
ORDER_CREATED = "ORDER_CREATED",
|
||||||
|
@ -1247,6 +1249,7 @@ export interface CustomerInput {
|
||||||
email?: string | null;
|
email?: string | null;
|
||||||
isActive?: boolean | null;
|
isActive?: boolean | null;
|
||||||
note?: string | null;
|
note?: string | null;
|
||||||
|
languageCode?: LanguageCodeEnum | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DateRangeInput {
|
export interface DateRangeInput {
|
||||||
|
@ -1866,6 +1869,7 @@ export interface UserCreateInput {
|
||||||
email?: string | null;
|
email?: string | null;
|
||||||
isActive?: boolean | null;
|
isActive?: boolean | null;
|
||||||
note?: string | null;
|
note?: string | null;
|
||||||
|
languageCode?: LanguageCodeEnum | null;
|
||||||
redirectUrl?: string | null;
|
redirectUrl?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,10 @@ const WebhookEvents: React.FC<WebhookEventsProps> = ({
|
||||||
[WebhookEventTypeEnum.PAGE_DELETED]: intl.formatMessage({
|
[WebhookEventTypeEnum.PAGE_DELETED]: intl.formatMessage({
|
||||||
defaultMessage: "Page deleted",
|
defaultMessage: "Page deleted",
|
||||||
description: "event"
|
description: "event"
|
||||||
|
}),
|
||||||
|
[WebhookEventTypeEnum.NOTIFY_USER]: intl.formatMessage({
|
||||||
|
defaultMessage: "User notified",
|
||||||
|
description: "event"
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue