Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation

This commit is contained in:
Tomasz Szymanski 2021-03-30 14:15:29 +02:00
commit 779d93cfa3
713 changed files with 2303 additions and 1148 deletions

View file

@ -29,4 +29,4 @@ greatly reduce the amount of work needed to review your work. -->
<!-- Do not remove this section. It is required to properly setup test instance. <!-- Do not remove this section. It is required to properly setup test instance.
Modify API_URI if you want test instance to use custom backend. --> Modify API_URI if you want test instance to use custom backend. -->
API_URI=https://master.staging.saleor.cloud/graphql/ API_URI=https://qa.staging.saleor.cloud/graphql/

View file

@ -59,7 +59,7 @@ jobs:
- name: Run build - name: Run build
env: env:
# Use custom API_URI or the default one # Use custom API_URI or the default one
API_URI: ${{ steps.api_uri.outputs.custom_api_uri || 'https://master.staging.saleor.cloud/graphql/' }} API_URI: ${{ steps.api_uri.outputs.custom_api_uri || 'https://qa.staging.saleor.cloud/graphql/' }}
APP_MOUNT_URI: / APP_MOUNT_URI: /
STATIC_URL: / STATIC_URL: /
run: | run: |

View file

@ -93,7 +93,9 @@ jobs:
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }} APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
CYPRESS_baseUrl: ${{ secrets.CYPRESS_BASEURL }} CYPRESS_baseUrl: ${{ secrets.CYPRESS_BASEURL }}
CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }} CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }}
CYPRESS_SECOND_USER_NAME: ${{ secrets.CYPRESS_SECOND_USER_NAME }}
CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }} CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }}
CYPRESS_PERMISSIONS_USERS_PASSWORD: ${{ secrets.CYPRESS_PERMISSIONS_USERS_PASSWORD }}
with: with:
build: npm run build build: npm run build
start: npx local-web-server --spa index.html start: npx local-web-server --spa index.html

View file

@ -25,6 +25,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix trigger form change when collections are being added to list of product collections - #987 by @gax97 - Fix trigger form change when collections are being added to list of product collections - #987 by @gax97
- Add product variant webhooks - #1006 by @piotrgrundas - Add product variant webhooks - #1006 by @piotrgrundas
- 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
- Unconfirmed order manipulation - #967 by @tomaszszymanski129 - Unconfirmed order manipulation - #967 by @tomaszszymanski129
# 2.11.1 # 2.11.1

View file

@ -0,0 +1,90 @@
import * as menuSelectors from "../elements/account/left-menu/left-menu-selectors";
import { CONFIGURATION_SELECTORS } from "../elements/configuration/configuration-selectors";
const configurationAsParent = {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.configuration,
parentSelectors: CONFIGURATION_SELECTORS
};
export const PERMISSIONS = {
app: {
permissionSelectors: [menuSelectors.LEFT_MENU_SELECTORS.app]
},
customer: {
permissionSelectors: [menuSelectors.LEFT_MENU_SELECTORS.customers]
},
discounts: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.discounts,
parentSelectors: [menuSelectors.DISCOUNTS_MENU_SELECTORS]
},
permissionSelectors: [
menuSelectors.DISCOUNTS_MENU_SELECTORS.sales,
menuSelectors.DISCOUNTS_MENU_SELECTORS.sales
]
},
order: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.orders,
parentSelectors: menuSelectors.ORDERS
},
permissionSelectors: [
menuSelectors.ORDERS.orders,
menuSelectors.ORDERS.draftOrders
]
},
page: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.pageTypes,
CONFIGURATION_SELECTORS.pages
]
},
plugin: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.plugin]
},
product: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.catalog,
parentSelectors: menuSelectors.CATALOG
},
permissionSelectors: [
menuSelectors.CATALOG.categories,
menuSelectors.CATALOG.collections,
menuSelectors.CATALOG.products
]
},
productTypeAndAttribute: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.attributes,
CONFIGURATION_SELECTORS.productTypes
]
},
settings: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.taxes,
CONFIGURATION_SELECTORS.settings
]
},
shipping: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.shipping]
},
staff: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.staffMembers,
CONFIGURATION_SELECTORS.permissionGroups
]
},
translations: {
permissionSelectors: [menuSelectors.LEFT_MENU_SELECTORS.translations]
},
warehouse: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.warehouse]
}
};

View file

@ -0,0 +1,63 @@
import { PERMISSIONS } from "./permissions";
import { ONE_PERMISSION_USERS, TEST_ADMIN_USER } from "./users";
export const PERMISSIONS_OPTIONS = {
all: {
user: TEST_ADMIN_USER,
permissions: Object.values(PERMISSIONS)
},
app: {
user: ONE_PERMISSION_USERS.app,
permissions: [PERMISSIONS.app]
},
customer: {
user: ONE_PERMISSION_USERS.user,
permissions: [PERMISSIONS.customer]
},
discount: {
user: ONE_PERMISSION_USERS.discount,
permissions: [PERMISSIONS.discounts]
},
giftCard: {
user: ONE_PERMISSION_USERS.giftCard
},
order: {
user: ONE_PERMISSION_USERS.order,
permissions: [PERMISSIONS.order]
},
page: {
user: ONE_PERMISSION_USERS.page,
permissions: [PERMISSIONS.page]
},
pageTypeAndAttribute: {
user: ONE_PERMISSION_USERS.pageTypeAndAttribute
},
plugin: {
user: ONE_PERMISSION_USERS.plugin,
permissions: [PERMISSIONS.plugin]
},
product: {
user: ONE_PERMISSION_USERS.product,
permissions: [PERMISSIONS.product, PERMISSIONS.warehouse]
},
productTypeAndAttribute: {
user: ONE_PERMISSION_USERS.productTypeAndAttribute,
permissions: [PERMISSIONS.productTypeAndAttribute]
},
settings: {
user: ONE_PERMISSION_USERS.settings,
permissions: [PERMISSIONS.settings]
},
shipping: {
user: ONE_PERMISSION_USERS.shipping,
permissions: [PERMISSIONS.shipping]
},
staff: {
user: ONE_PERMISSION_USERS.staff,
permissions: [PERMISSIONS.staff]
},
translations: {
user: ONE_PERMISSION_USERS.translations,
permissions: [PERMISSIONS.translations]
}
};

34
cypress/Data/users.js Normal file
View file

@ -0,0 +1,34 @@
export const TEST_ADMIN_USER = {
email: Cypress.env("USER_NAME"),
password: Cypress.env("USER_PASSWORD"),
name: "Test",
lastName: "Test"
};
export const USER_WITHOUT_NAME = {
email: Cypress.env("SECOND_USER_NAME"),
password: Cypress.env("USER_PASSWORD")
};
export const ONE_PERMISSION_USERS = {
shipping: getOnePermissionUser("shipping.manager@example.com"),
giftCard: getOnePermissionUser("gift.card.manager@example.com"),
app: getOnePermissionUser("app.manager@example.com"),
settings: getOnePermissionUser("setting.manager@example.com"),
page: getOnePermissionUser("page.manager@example.com"),
order: getOnePermissionUser("order.manager@example.com"),
translations: getOnePermissionUser("translation.manager@example.com"),
menu: getOnePermissionUser("menu.manager@example.com"),
staff: getOnePermissionUser("staff.manager@example.com"),
user: getOnePermissionUser("user.manager@example.com"),
pageTypeAndAttribute: getOnePermissionUser(
"page.type.and.attribute.manager@example.com"
),
productTypeAndAttribute: getOnePermissionUser(
"product.type.and.attribute.manager@example.com"
),
discount: getOnePermissionUser("discount.manager@example.com"),
plugin: getOnePermissionUser("plugin.manager@example.com"),
product: getOnePermissionUser("product.manager@example.com")
};
function getOnePermissionUser(email) {
return { email, password: Cypress.env("PERMISSIONS_USERS_PASSWORD") };
}

View file

@ -1,18 +1,24 @@
export function createCheckout( import { getDefaultAddress } from "./utils/Utils";
export function createCheckout({
channelSlug, channelSlug,
email, email,
productQuantity, productQuantity = 1,
variantsList variantsList,
) { address,
auth = "auth"
}) {
const lines = variantsList.map( const lines = variantsList.map(
variant => `{quantity:${productQuantity} variant => `{quantity:${productQuantity}
variantId:"${variant.id}"}` variantId:"${variant.id}"}`
); );
const shippingAddress = getDefaultAddress(address, "shippingAddress");
const mutation = `mutation{ const mutation = `mutation{
checkoutCreate(input:{ checkoutCreate(input:{
channel:"${channelSlug}" channel:"${channelSlug}"
email:"${email}" email:"${email}"
lines: [${lines.join()}] lines: [${lines.join()}]
${shippingAddress}
}){ }){
checkoutErrors{ checkoutErrors{
field field
@ -24,7 +30,7 @@ export function createCheckout(
} }
} }
}`; }`;
return cy.sendRequestWithQuery(mutation); return cy.sendRequestWithQuery(mutation, auth);
} }
export function addShippingMethod(checkoutId, shippingMethodId) { export function addShippingMethod(checkoutId, shippingMethodId) {
const mutation = `mutation{ const mutation = `mutation{
@ -69,3 +75,24 @@ export function completeCheckout(checkoutId) {
}`; }`;
return cy.sendRequestWithQuery(mutation); return cy.sendRequestWithQuery(mutation);
} }
export function addVoucher(checkoutId, voucherCode) {
const mutation = `mutation addVoucher{
checkoutAddPromoCode(checkoutId:"${checkoutId}",
promoCode:"${voucherCode}"
){
checkoutErrors{
field
message
}
checkout{
totalPrice{
gross{
amount
}
}
}
}
}`;
return cy.sendRequestWithQuery(mutation);
}

View file

@ -1,3 +1,4 @@
import { getDefaultAddress } from "./utils/Utils";
export function createCustomer(email, customerName, address, isActive = false) { export function createCustomer(email, customerName, address, isActive = false) {
const mutation = ` const mutation = `
mutation{ mutation{
@ -6,24 +7,8 @@ export function createCustomer(email, customerName, address, isActive = false) {
lastName: "${customerName}" lastName: "${customerName}"
email: "${email}" email: "${email}"
isActive: ${isActive} isActive: ${isActive}
defaultBillingAddress: { ${getDefaultAddress(address, "defaultBillingAddress")}
companyName: "${address.companyName}" ${getDefaultAddress(address, "defaultShippingAddress")}
streetAddress1: "${address.streetAddress1}"
streetAddress2: "${address.streetAddress2}"
city: "${address.city}"
postalCode: "${address.postalCode}"
country: ${address.country}
phone: "${address.phone}"
}
defaultShippingAddress: {
companyName: "${address.companyName}"
streetAddress1: "${address.streetAddress1}"
streetAddress2: "${address.streetAddress2}"
city: "${address.city}"
postalCode: "${address.postalCode}"
country: ${address.country}
phone: "${address.phone}"
}
}){ }){
user{ user{
id id

View file

@ -1,4 +1,4 @@
import { getValueWithDefault } from "./utils/Utils"; import { getValueWithDefault } from "../utils/Utils";
export function getSales(first, searchQuery) { export function getSales(first, searchQuery) {
const filter = getValueWithDefault( const filter = getValueWithDefault(

View file

@ -0,0 +1,28 @@
export function getVouchers(first, startsWith) {
const query = `query getVouchers{
vouchers(first:${first}, filter:{
search:"${startsWith}"
}){
edges{
node{
id
code
}
}
}
}`;
return cy
.sendRequestWithQuery(query)
.then(resp => resp.body.data.vouchers.edges);
}
export function deleteVouchers(voucherId) {
const mutation = `mutation deleteVouchers{
voucherDelete(id:"${voucherId}"){
discountErrors{
field
message
}
}
}`;
return cy.sendRequestWithQuery(mutation);
}

View file

@ -1,17 +1,12 @@
import { getDefaultAddress } from "./utils/Utils";
export function createWarehouse(name, shippingZone, address, slug = name) { export function createWarehouse(name, shippingZone, address, slug = name) {
const mutation = `mutation{ const mutation = `mutation{
createWarehouse(input:{ createWarehouse(input:{
name:"${name}" name:"${name}"
slug:"${slug}" slug:"${slug}"
shippingZones:"${shippingZone}" shippingZones:"${shippingZone}"
address:{ ${getDefaultAddress(address, "address", false)}
streetAddress1: "${address.streetAddress1}"
streetAddress2: "${address.streetAddress2}"
city: "${address.city}"
postalCode: "${address.postalCode}"
country: ${address.country}
phone: "${address.phone}"
}
}){ }){
warehouseErrors{ warehouseErrors{
field field

View file

@ -1,2 +1,21 @@
export const getValueWithDefault = (condition, value, defaultValue = "") => export const getValueWithDefault = (condition, value, defaultValue = "") =>
condition ? value : defaultValue; condition ? value : defaultValue;
export function getDefaultAddress(address, addressType, withName = true) {
if (!address) {
return "";
}
const defaultAddress = `city: "${address.city}"
country: ${address.country}
countryArea: "${address.countryArea}"
phone: "${address.phone}"
postalCode: "${address.postalCode}"
streetAddress1: "${address.streetAddress1}"
streetAddress2: "${address.streetAddress2}"`;
if (withName) {
defaultAddress.concat(`firstName: "Test"
lastName: "Test"
companyName: "${address.companyName}"`);
}
return `${addressType}:{${defaultAddress}}`;
}

View file

@ -2,6 +2,22 @@ export const LEFT_MENU_SELECTORS = {
catalog: "[data-test='menu-item-label'][data-test-id='catalogue']", catalog: "[data-test='menu-item-label'][data-test-id='catalogue']",
configuration: "[data-test='menu-item-label'][data-test-id='configure']", configuration: "[data-test='menu-item-label'][data-test-id='configure']",
home: "[data-test='menu-item-label'][data-test-id='home']", home: "[data-test='menu-item-label'][data-test-id='home']",
orders: "[data-test='menu-item-label'][data-test-id=orders']", orders: "[data-test='menu-item-label'][data-test-id='orders']",
products: "[data-test='submenu-item-label'][data-test-id='products']" discounts: "[data-test='menu-item-label'][data-test-id='discounts']",
app: "[data-test='menu-item-label'][data-test-id='apps']",
translations: "[data-test='menu-item-label'][data-test-id='translations']",
customers: "[data-test='menu-item-label'][data-test-id='customers']"
};
export const DISCOUNTS_MENU_SELECTORS = {
sales: "[data-test='submenu-item-label'][data-test-id='sales']",
vouchers: "[data-test='submenu-item-label'][data-test-id='vouchers']"
};
export const ORDERS = {
orders: "[data-test='submenu-item-label'][data-test-id='orders']",
draftOrders: "[data-test='submenu-item-label'][data-test-id='order drafts']"
};
export const CATALOG = {
products: "[data-test='submenu-item-label'][data-test-id='products']",
categories: "[data-test='submenu-item-label'][data-test-id='categories']",
collections: "[data-test='submenu-item-label'][data-test-id='collections']"
}; };

View file

@ -12,5 +12,6 @@ export const MENAGE_CHANNEL_AVAILABILITY = {
radioButtonsValueTrue: "[value='true']", radioButtonsValueTrue: "[value='true']",
radioButtonsValueFalse: "[value='false']", radioButtonsValueFalse: "[value='false']",
visibleInListingsButton: "[name*='visibleInListings']", visibleInListingsButton: "[name*='visibleInListings']",
allChannelsInput: "[name='allChannels']" allChannelsInput: "[name='allChannels']",
dialog: "[role='dialog']"
}; };

View file

@ -1,3 +1,15 @@
export const CONFIGURATION_SELECTORS = { export const CONFIGURATION_SELECTORS = {
channels: "[data-testid='channels']" channels: "[data-testid='channels']",
shipping: '[data-testid="shipping methods"]',
taxes: '[data-test-id="configurationMenuTaxes"]',
settings: '[data-test-id="configurationMenuSiteSettings"]',
pageTypes: '[data-test-id="configurationMenuPageTypes"]',
pages: '[data-test-id="configurationMenuPages"]',
navigation: '[data-test-id="configurationMenuNavigation"]',
staffMembers: '[data-test-id="configurationMenuStaff"]',
permissionGroups: '[data-test-id="configurationMenuPermissionGroups"]',
attributes: '[data-test-id="configurationMenuAttributes"]',
productTypes: '[data-test-id="configurationMenuProductTypes"]',
plugin: '[data-test-id="configurationPluginsPages"]',
warehouse: '[data-test-id="configurationMenuWarehouses"]'
}; };

View file

@ -0,0 +1,9 @@
export const VOUCHERS_SELECTORS = {
createVoucherButton: "[data-test-id='create-voucher']",
voucherCodeInput: "[name='code']",
discountRadioButtons: "[name='discountType']",
percentageDiscountRadioButton: "[name='discountType'][value='PERCENTAGE']",
fixedDiscountRadioButton: "[name='discountType'][value='FIXED']",
shippingDiscountRadioButton: "[name='discountType'][value='SHIPPING']",
discountValueInputs: "[name='value']"
};

View file

@ -5,5 +5,6 @@ export const HOMEPAGE_SELECTORS = {
topProducts: "[data-test-id='top-products']", topProducts: "[data-test-id='top-products']",
ordersReadyToFulfill: "[data-test-id='orders-to-fulfill']", ordersReadyToFulfill: "[data-test-id='orders-to-fulfill']",
paymentsWaitingForCapture: "[data-test-id='orders-to-capture']", paymentsWaitingForCapture: "[data-test-id='orders-to-capture']",
productsOutOfStock: "[data-test-id='products-out-of-stock']" productsOutOfStock: "[data-test-id='products-out-of-stock']",
welcomeMessage: "[data-test='welcomeHeader']"
}; };

View file

@ -1,5 +1,6 @@
export const BUTTON_SELECTORS = { 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"]',
checkbox: "[type='checkbox']" checkbox: "[type='checkbox']"
}; };

View file

@ -0,0 +1,3 @@
export const SHARED_ELEMENTS = {
header: "[data-test-id='page-header']"
};

View file

@ -7,11 +7,11 @@ import {
assignProducts, assignProducts,
createSale, createSale,
discountOptions discountOptions
} from "../../steps/salesSteps"; } from "../../steps/discounts/salesSteps";
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 * as productsUtils from "../../utils/productsUtils"; import * as productsUtils from "../../utils/productsUtils";
import { deleteSalesStartsWith } from "../../utils/salesUtils";
import { import {
createShipping, createShipping,
deleteShippingStartsWith deleteShippingStartsWith

View file

@ -0,0 +1,172 @@
// <reference types="cypress" />
import faker from "faker";
import {
createVoucher,
discountOptions
} from "../../steps/discounts/vouchersSteps";
import { urlList } from "../../url/urlList";
import * as channelsUtils from "../../utils/channelsUtils";
import { deleteVouchersStartsWith } from "../../utils/discounts/vouchersUtils";
import { createCheckoutWithVoucher } from "../../utils/ordersUtils";
import * as productsUtils from "../../utils/productsUtils";
import {
createShipping,
deleteShippingStartsWith
} from "../../utils/shippingUtils";
describe("Vouchers discounts", () => {
const startsWith = "Cy-";
const productPrice = 100;
const shippingPrice = 100;
let defaultChannel;
let productType;
let attribute;
let category;
let shippingMethod;
let variants;
let address;
before(() => {
cy.clearSessionData().loginUserViaRequest();
channelsUtils.deleteChannelsStartsWith(startsWith);
productsUtils.deleteProductsStartsWith(startsWith);
deleteShippingStartsWith(startsWith);
deleteVouchersStartsWith(startsWith);
const name = `${startsWith}${faker.random.number()}`;
productsUtils
.createTypeAttributeAndCategoryForProduct(name)
.then(
({
productType: productTypeResp,
attribute: attributeResp,
category: categoryResp
}) => {
productType = productTypeResp;
attribute = attributeResp;
category = categoryResp;
channelsUtils.getDefaultChannel();
}
)
.then(channel => {
defaultChannel = channel;
cy.fixture("addresses");
})
.then(addresses => {
address = addresses.plAddress;
createShipping({
channelId: defaultChannel.id,
name,
address,
price: shippingPrice
});
})
.then(({ shippingMethod: shippingMethodResp, warehouse: warehouse }) => {
shippingMethod = shippingMethodResp;
productsUtils.createProductInChannel({
name,
channelId: defaultChannel.id,
warehouseId: warehouse.id,
productTypeId: productType.id,
attributeId: attribute.id,
categoryId: category.id,
price: productPrice
});
})
.then(({ variants: variantsResp }) => (variants = variantsResp));
});
beforeEach(() => {
cy.clearSessionData().loginUserViaRequest();
cy.visit(urlList.vouchers);
});
it("should create percentage voucher", () => {
const voucherCode = `${startsWith}${faker.random.number()}`;
const voucherValue = 50;
createVoucher({
voucherCode,
voucherValue,
discountOption: discountOptions.PERCENTAGE,
channelName: defaultChannel.name
});
createCheckoutForCreatedVoucher(voucherCode)
.its("checkout.totalPrice.gross.amount")
.then(amount => {
const expectedAmount =
(productPrice * voucherValue) / 100 + shippingPrice;
expect(amount).to.be.eq(expectedAmount);
});
});
it("should create fixed price voucher", () => {
const voucherCode = `${startsWith}${faker.random.number()}`;
const voucherValue = 50;
createVoucher({
voucherCode,
voucherValue,
discountOption: discountOptions.FIXED,
channelName: defaultChannel.name
});
createCheckoutForCreatedVoucher(voucherCode)
.its("checkout.totalPrice.gross.amount")
.then(amount => {
const expectedAmount = productPrice + shippingPrice - voucherValue;
expect(amount).to.be.eq(expectedAmount);
});
});
// Test should pass after fixing - SALEOR-1629 bug
xit("should create free shipping voucher", () => {
const voucherCode = `${startsWith}${faker.random.number()}`;
createVoucher({
voucherCode,
discountOption: discountOptions.SHIPPING,
channelName: defaultChannel.name
});
createCheckoutForCreatedVoucher(voucherCode)
.its("checkout.totalPrice.gross.amount")
.then(amount => {
const expectedAmount = productPrice;
expect(amount).to.be.eq(expectedAmount);
});
});
it("should create voucher not available for selected channel", () => {
const randomName = `${startsWith}${faker.random.number()}`;
const voucherValue = 50;
channelsUtils
.createChannel({ name: randomName })
.then(channel => {
createVoucher({
voucherCode: randomName,
voucherValue,
discountOption: discountOptions.PERCENTAGE,
channelName: channel.name
});
createCheckoutForCreatedVoucher(randomName);
})
.then(resp => {
const errorField = resp.checkoutErrors[0].field;
expect(errorField).to.be.eq("promoCode");
});
});
function createCheckoutForCreatedVoucher(voucherCode) {
return createCheckoutWithVoucher({
channelSlug: defaultChannel.slug,
variantsList: variants,
address,
shippingMethodId: shippingMethod.id,
voucherCode,
auth: "token"
});
}
});

View file

@ -0,0 +1,27 @@
import { TEST_ADMIN_USER, USER_WITHOUT_NAME } from "../../Data/users";
import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors";
import { urlList } from "../../url/urlList";
describe("Displaying welcome message on home page", () => {
it("should display user name on home page", () => {
cy.loginUserViaRequest();
cy.visit(urlList.homePage);
cy.get(HOMEPAGE_SELECTORS.welcomeMessage)
.invoke("text")
.then(text => {
expect(text).to.contains(
`${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}`
);
});
});
it("should display user email on home page", () => {
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME);
cy.visit(urlList.homePage);
cy.get(HOMEPAGE_SELECTORS.welcomeMessage)
.invoke("text")
.then(text => {
expect(text).to.contains(`${USER_WITHOUT_NAME.email}`);
});
});
});

View file

@ -3,18 +3,18 @@ import faker from "faker";
import { import {
createCustomer, createCustomer,
deleteCustomersStartsWith deleteCustomersStartsWith
} from "../apiRequests/Customer"; } from "../../apiRequests/Customer";
import { HOMEPAGE_SELECTORS } from "../elements/homePage/homePage-selectors"; import { HOMEPAGE_SELECTORS } from "../../elements/homePage/homePage-selectors";
import { changeChannel } from "../steps/homePageSteps"; import { changeChannel } from "../../steps/homePageSteps";
import { urlList } from "../url/urlList"; import { urlList } from "../../url/urlList";
import { getDefaultChannel } from "../utils/channelsUtils"; import { getDefaultChannel } from "../../utils/channelsUtils";
import * as homePageUtils from "../utils/homePageUtils"; import * as homePageUtils from "../../utils/homePageUtils";
import { import {
createReadyToFulfillOrder, createReadyToFulfillOrder,
createWaitingForCaptureOrder createWaitingForCaptureOrder
} from "../utils/ordersUtils"; } from "../../utils/ordersUtils";
import * as productsUtils from "../utils/productsUtils"; import * as productsUtils from "../../utils/productsUtils";
import * as shippingUtils from "../utils/shippingUtils"; import * as shippingUtils from "../../utils/shippingUtils";
// <reference types="cypress" /> // <reference types="cypress" />
describe("Homepage analytics", () => { describe("Homepage analytics", () => {

View file

@ -0,0 +1,45 @@
import { PERMISSIONS_OPTIONS } from "../Data/permissionsUsers";
import * as permissionsSteps from "../steps/permissions";
describe("Navigation for users with different permissions", () => {
Object.keys(PERMISSIONS_OPTIONS).forEach(key => {
it(`should navigate as an user with ${key} permission`, () => {
const permissionOption = PERMISSIONS_OPTIONS[key];
const permissions = permissionOption.permissions;
cy.clearSessionData();
permissionsSteps.navigateToAllAvailablePageAndCheckIfDisplayed(
permissionOption
);
if (key === "all") {
return;
}
permissionsSteps
.getDisplayedSelectors()
.then(selectors => {
permissionsSteps.expectAllSelectorsPermitted(permissions, selectors);
})
.then(() => {
if (!permissions) {
return;
}
permissions.forEach(permission => {
if (permission.parent) {
cy.get(permission.parent.parentMenuSelector)
.click()
.then(() => {
permissionsSteps.getDisplayedSelectors(
permission.parent.parentSelectors
);
})
.then(parentSelectors => {
permissionsSteps.expectAllSelectorsPermitted(
permissions,
parentSelectors
);
});
}
});
});
});
});
});

View file

@ -1,5 +1,4 @@
// <reference types="cypress" /> // <reference types="cypress" />
import { LEFT_MENU_SELECTORS } from "../../elements/account/left-menu/left-menu-selectors";
import { PRODUCTS_SELECTORS } from "../../elements/catalog/products/product-selectors"; import { PRODUCTS_SELECTORS } from "../../elements/catalog/products/product-selectors";
import { urlList } from "../../url/urlList"; import { urlList } from "../../url/urlList";
@ -8,16 +7,6 @@ describe("Products", () => {
cy.clearSessionData().loginUserViaRequest(); cy.clearSessionData().loginUserViaRequest();
}); });
it("should navigate to channels page", () => {
cy.visit(urlList.homePage)
.get(LEFT_MENU_SELECTORS.catalog)
.click()
.get(LEFT_MENU_SELECTORS.products)
.click()
.location("pathname")
.should("contain", "/products");
});
it("should add new visible product", () => { it("should add new visible product", () => {
cy.visit(urlList.products) cy.visit(urlList.products)
.get(PRODUCTS_SELECTORS.createProductBtn) .get(PRODUCTS_SELECTORS.createProductBtn)

View file

@ -1,7 +1,9 @@
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 { 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 { HEADER_SELECTORS } from "../elements/header/header-selectors"; import { HEADER_SELECTORS } from "../elements/header/header-selectors";
import { BUTTON_SELECTORS } from "../elements/shared/button-selectors";
export function createChannelByView(name, currency, slug = name) { export function createChannelByView(name, currency, slug = name) {
cy.get(CHANNELS_SELECTORS.createChannelButton) cy.get(CHANNELS_SELECTORS.createChannelButton)
@ -36,3 +38,15 @@ export function selectChannelInHeader(channelName) {
.contains(channelName) .contains(channelName)
.click(); .click();
} }
export function selectChannelInDetailsPages(channelName) {
cy.get(MENAGE_CHANNEL_AVAILABILITY.availableManageButton)
.click()
.get(MENAGE_CHANNEL_AVAILABILITY.allChannelsInput)
.click()
.get(MENAGE_CHANNEL_AVAILABILITY.channelsAvailabilityForm)
.contains(channelName)
.click()
.get(MENAGE_CHANNEL_AVAILABILITY.dialog)
.find(BUTTON_SELECTORS.submit)
.click();
}

View file

@ -1,8 +1,8 @@
import { ASSIGN_PRODUCTS_SELECTORS } from "../elements/catalog/assign-products"; import { ASSIGN_PRODUCTS_SELECTORS } from "../../elements/catalog/assign-products";
import { MENAGE_CHANNEL_AVAILABILITY } from "../elements/channels/menage-channel-availability"; 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"; import { selectChannelInDetailsPages } from "../channelsSteps";
export const discountOptions = { export const discountOptions = {
PERCENTAGE: SALES_SELECTORS.percentageOption, PERCENTAGE: SALES_SELECTORS.percentageOption,
@ -22,17 +22,9 @@ export function createSale({
.get(SALES_SELECTORS.nameInput) .get(SALES_SELECTORS.nameInput)
.type(saleName) .type(saleName)
.get(discountOption) .get(discountOption)
.click() .click();
.get(MENAGE_CHANNEL_AVAILABILITY.availableManageButton) selectChannelInDetailsPages(channelName);
.click() cy.get(SALES_SELECTORS.discountValue)
.get(MENAGE_CHANNEL_AVAILABILITY.allChannelsInput)
.click()
.get(MENAGE_CHANNEL_AVAILABILITY.channelsAvailabilityForm)
.contains(channelName)
.click()
.get(BUTTON_SELECTORS.submit)
.click()
.get(SALES_SELECTORS.discountValue)
.type(discountValue) .type(discountValue)
.get(SALES_SELECTORS.startDateInput) .get(SALES_SELECTORS.startDateInput)
.type(todaysDate); .type(todaysDate);

View file

@ -0,0 +1,27 @@
import { VOUCHERS_SELECTORS } from "../../elements/discounts/vouchers";
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
import { selectChannelInDetailsPages } from "../channelsSteps";
export const discountOptions = {
PERCENTAGE: VOUCHERS_SELECTORS.percentageDiscountRadioButton,
FIXED: VOUCHERS_SELECTORS.fixedDiscountRadioButton,
SHIPPING: VOUCHERS_SELECTORS.shippingDiscountRadioButton
};
export function createVoucher({
voucherCode,
voucherValue,
discountOption,
channelName
}) {
cy.get(VOUCHERS_SELECTORS.createVoucherButton).click();
selectChannelInDetailsPages(channelName);
cy.get(VOUCHERS_SELECTORS.voucherCodeInput)
.type(voucherCode)
.get(discountOption)
.click();
if (discountOption !== discountOptions.SHIPPING) {
cy.get(VOUCHERS_SELECTORS.discountValueInputs).type(voucherValue);
}
cy.get(BUTTON_SELECTORS.confirm).click();
}

View file

@ -0,0 +1,77 @@
import { LEFT_MENU_SELECTORS } from "../elements/account/left-menu/left-menu-selectors";
import { SHARED_ELEMENTS } from "../elements/shared/sharedElements";
import { urlList } from "../url/urlList";
/* eslint-disable no-unused-expressions */
export function navigateToAllAvailablePageAndCheckIfDisplayed({
user,
permissions
}) {
cy.loginUserViaRequest("auth", user);
cy.visit(urlList.homePage);
if (!permissions) {
return;
}
return permissions.forEach(permission =>
permission.permissionSelectors.forEach(permissionSelector => {
navigateToAvailablePageAndCheckIfDisplayed(
permission.parent,
permissionSelector
);
})
);
}
function navigateToAvailablePageAndCheckIfDisplayed(
parent,
permissionSelector
) {
if (parent) {
cy.get(parent.parentMenuSelector).click();
}
return cy
.get(permissionSelector)
.click()
.then(() => {
isElementDisplayed();
})
.then(isDisplayed => {
expect(isDisplayed).to.be.true;
});
}
export function isElementDisplayed(element = SHARED_ELEMENTS.header) {
return cy.get("body").then(body => body.find(element).length > 0);
}
export function getDisplayedSelectors(selectors = LEFT_MENU_SELECTORS) {
const displayedSelectors = {};
cy.wrap(displayedSelectors).as("displayedSelectors");
Object.values(selectors).forEach((value, i) =>
isElementDisplayed(value).then(isDisplayed => {
if (isDisplayed) {
cy.wrap(value);
displayedSelectors["link" + i] = value;
cy.wrap(displayedSelectors).as("displayedSelectors");
}
})
);
return cy.get("@displayedSelectors");
}
export function expectAllSelectorsPermitted(permissions, selectors) {
Object.values(selectors).forEach(selector => {
const isSelectorPermitted = isPermitted(permissions, selector);
expect(isSelectorPermitted).to.be.true;
});
}
function isPermitted(permissions, selector) {
let permittedSelectors = [LEFT_MENU_SELECTORS.home];
permissions.forEach(permission => {
if (permission.parent) {
permittedSelectors.push(permission.parent.parentMenuSelector);
}
permittedSelectors = permittedSelectors.concat(
permission.permissionSelectors
);
});
return permittedSelectors.includes(selector);
}

View file

@ -1,17 +1,17 @@
Cypress.Commands.add( Cypress.Commands.add(
"handleDeleteElement", "handleDeleteElement",
(element, deleteFunction, startsWith) => { (element, deleteFunction, startsWith, name) => {
if (element.node.name.includes(startsWith)) { if (element.node[name].includes(startsWith)) {
deleteFunction(element.node.id); deleteFunction(element.node.id);
} }
} }
); );
Cypress.Commands.add( Cypress.Commands.add(
"deleteElementsStartsWith", "deleteElementsStartsWith",
(deleteFunction, getFunction, startsWith, name) => { (deleteFunction, getFunction, startsWith, name = "name") => {
getFunction(100, startsWith).then(elements => { getFunction(100, startsWith).then(elements => {
elements.forEach(element => { elements.forEach(element => {
cy.handleDeleteElement(element, deleteFunction, startsWith); cy.handleDeleteElement(element, deleteFunction, startsWith, name);
}); });
}); });
} }

View file

@ -1,3 +1,4 @@
import { TEST_ADMIN_USER } from "../../Data/users";
import { LOGIN_SELECTORS } from "../../elements/account/login-selectors"; import { LOGIN_SELECTORS } from "../../elements/account/login-selectors";
Cypress.Commands.add("loginUser", () => Cypress.Commands.add("loginUser", () =>
@ -14,11 +15,11 @@ Cypress.Commands.add("loginInShop", () => {
cy.loginUserViaRequest("token"); cy.loginUserViaRequest("token");
}); });
Cypress.Commands.add("loginUserViaRequest", (authorization = "auth") => { Cypress.Commands.add(
"loginUserViaRequest",
(authorization = "auth", user = TEST_ADMIN_USER) => {
const mutation = `mutation TokenAuth{ const mutation = `mutation TokenAuth{
tokenCreate(email: "${Cypress.env("USER_NAME")}", password: "${Cypress.env( tokenCreate(email: "${user.email}", password: "${user.password}") {
"USER_PASSWORD"
)}") {
token token
errors: accountErrors { errors: accountErrors {
code code
@ -36,4 +37,5 @@ Cypress.Commands.add("loginUserViaRequest", (authorization = "auth") => {
resp.body.data.tokenCreate.token resp.body.data.tokenCreate.token
); );
}); });
}); }
);

View file

@ -8,6 +8,7 @@ export const urlList = {
products: "products/", products: "products/",
warehouses: "warehouses/", warehouses: "warehouses/",
sales: "discounts/sales/", sales: "discounts/sales/",
collections: "collections/" collections: "collections/",
vouchers: "discounts/vouchers/"
}; };
export const productDetailsUrl = productId => `${urlList.products}${productId}`; export const productDetailsUrl = productId => `${urlList.products}${productId}`;

View file

@ -1,10 +1,5 @@
import { deleteCollection, getCollections } from "../apiRequests/Collections"; import { deleteCollection, getCollections } from "../apiRequests/Collections";
export function deleteCollectionsStartsWith(startsWith) { export function deleteCollectionsStartsWith(startsWith) {
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(deleteCollection, getCollections, startsWith);
deleteCollection,
getCollections,
startsWith,
"collection"
);
} }

View file

@ -0,0 +1,5 @@
import { deleteSale, getSales } from "../../apiRequests/Discounts/Sales";
export function deleteSalesStartsWith(startsWith) {
cy.deleteElementsStartsWith(deleteSale, getSales, startsWith);
}

View file

@ -0,0 +1,8 @@
import {
deleteVouchers,
getVouchers
} from "../../apiRequests/Discounts/Vouchers";
export function deleteVouchersStartsWith(startsWith) {
cy.deleteElementsStartsWith(deleteVouchers, getVouchers, startsWith, "code");
}

View file

@ -8,7 +8,7 @@ export function createWaitingForCaptureOrder(
shippingMethodId shippingMethodId
) { ) {
let checkout; let checkout;
return createCheckout(channelSlug, email, variantsList) return createCheckout({ channelSlug, email, variantsList })
.then(checkoutResp => { .then(checkoutResp => {
checkout = checkoutResp; checkout = checkoutResp;
checkoutRequest.addShippingMethod(checkout.id, shippingMethodId); checkoutRequest.addShippingMethod(checkout.id, shippingMethodId);
@ -17,6 +17,27 @@ export function createWaitingForCaptureOrder(
.then(() => checkoutRequest.completeCheckout(checkout.id)) .then(() => checkoutRequest.completeCheckout(checkout.id))
.then(() => checkout); .then(() => checkout);
} }
export function createCheckoutWithVoucher({
channelSlug,
email = "email@example.com",
variantsList,
address,
shippingMethodId,
voucherCode,
auth
}) {
let checkout;
return createCheckout({ channelSlug, email, variantsList, address, auth })
.then(checkoutResp => {
checkout = checkoutResp;
checkoutRequest.addShippingMethod(checkout.id, shippingMethodId);
})
.then(() => {
checkoutRequest.addVoucher(checkout.id, voucherCode);
})
.its("body.data.checkoutAddPromoCode");
}
export function createReadyToFulfillOrder( export function createReadyToFulfillOrder(
customerId, customerId,
shippingMethodId, shippingMethodId,
@ -60,9 +81,22 @@ export function createDraftOrder(customerId, shippingMethodId, channelId) {
.createDraftOrder(customerId, shippingMethodId, channelId) .createDraftOrder(customerId, shippingMethodId, channelId)
.its("body.data.draftOrderCreate.order"); .its("body.data.draftOrderCreate.order");
} }
export function createCheckout(channelSlug, email, variantsList) { export function createCheckout({
channelSlug,
email,
variantsList,
address,
auth
}) {
return checkoutRequest return checkoutRequest
.createCheckout(channelSlug, email, 1, variantsList) .createCheckout({
channelSlug,
email,
productQuantity: 1,
variantsList,
address,
auth
})
.its("body.data.checkoutCreate.checkout"); .its("body.data.checkoutCreate.checkout");
} }
export function addPayment(checkoutId) { export function addPayment(checkoutId) {

View file

@ -109,19 +109,16 @@ export function deleteProductsStartsWith(startsWith) {
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(
productRequest.deleteProductType, productRequest.deleteProductType,
productRequest.getProductTypes, productRequest.getProductTypes,
startsWith, startsWith
"productType"
); );
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(
attributeRequest.deleteAttribute, attributeRequest.deleteAttribute,
attributeRequest.getAttributes, attributeRequest.getAttributes,
startsWith, startsWith
"attributes"
); );
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(
categoryRequest.deleteCategory, categoryRequest.deleteCategory,
categoryRequest.getCategories, categoryRequest.getCategories,
startsWith, startsWith
"categories"
); );
} }

View file

@ -1,5 +0,0 @@
import { deleteSale, getSales } from "../apiRequests/Sales";
export function deleteSalesStartsWith(startsWith) {
cy.deleteElementsStartsWith(deleteSale, getSales, startsWith, "sales");
}

View file

@ -46,13 +46,11 @@ export function deleteShippingStartsWith(startsWith) {
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(
shippingMethodRequest.deleteShippingZone, shippingMethodRequest.deleteShippingZone,
shippingMethodRequest.getShippingZones, shippingMethodRequest.getShippingZones,
startsWith, startsWith
"shippingZONE"
); );
cy.deleteElementsStartsWith( cy.deleteElementsStartsWith(
warehouseRequest.deleteWarehouse, warehouseRequest.deleteWarehouse,
warehouseRequest.getWarehouses, warehouseRequest.getWarehouses,
startsWith, startsWith
"Warehouse"
); );
} }

View file

@ -479,6 +479,7 @@ input AttributeFilterInput {
filterableInStorefront: Boolean filterableInStorefront: Boolean
filterableInDashboard: Boolean filterableInDashboard: Boolean
availableInGrid: Boolean availableInGrid: Boolean
metadata: [MetadataInput]
search: String search: String
ids: [ID] ids: [ID]
type: AttributeTypeEnum type: AttributeTypeEnum
@ -571,6 +572,7 @@ type AttributeValue implements Node {
id: ID! id: ID!
name: String name: String
slug: String slug: String
value: String
translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation
inputType: AttributeInputTypeEnum inputType: AttributeInputTypeEnum
reference: ID reference: ID
@ -592,6 +594,7 @@ type AttributeValueCreate {
input AttributeValueCreateInput { input AttributeValueCreateInput {
name: String! name: String!
value: String
} }
type AttributeValueDelete { type AttributeValueDelete {
@ -717,6 +720,7 @@ type CategoryDelete {
input CategoryFilterInput { input CategoryFilterInput {
search: String search: String
metadata: [MetadataInput]
ids: [ID] ids: [ID]
} }
@ -1070,7 +1074,7 @@ type CollectionAddProducts {
type CollectionBulkDelete { type CollectionBulkDelete {
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.")
count: Int! count: Int!
productErrors: [ProductError!]! collectionErrors: [CollectionError!]!
} }
type CollectionChannelListing implements Node { type CollectionChannelListing implements Node {
@ -1155,6 +1159,7 @@ enum CollectionErrorCode {
input CollectionFilterInput { input CollectionFilterInput {
published: CollectionPublished published: CollectionPublished
search: String search: String
metadata: [MetadataInput]
ids: [ID] ids: [ID]
channel: String channel: String
} }
@ -2405,6 +2410,7 @@ enum MenuErrorCode {
input MenuFilterInput { input MenuFilterInput {
search: String search: String
slug: [String] slug: [String]
metadata: [MetadataInput]
} }
input MenuInput { input MenuInput {
@ -2469,6 +2475,7 @@ type MenuItemDelete {
input MenuItemFilterInput { input MenuItemFilterInput {
search: String search: String
metadata: [MetadataInput]
} }
input MenuItemInput { input MenuItemInput {
@ -3013,6 +3020,7 @@ input OrderDraftFilterInput {
customer: String customer: String
created: DateRangeInput created: DateRangeInput
search: String search: String
metadata: [MetadataInput]
channels: [ID] channels: [ID]
} }
@ -3170,6 +3178,7 @@ input OrderFilterInput {
customer: String customer: String
created: DateRangeInput created: DateRangeInput
search: String search: String
metadata: [MetadataInput]
channels: [ID] channels: [ID]
} }
@ -3494,6 +3503,7 @@ enum PageErrorCode {
input PageFilterInput { input PageFilterInput {
search: String search: String
metadata: [MetadataInput]
} }
type PageInfo { type PageInfo {
@ -3726,6 +3736,10 @@ enum PaymentErrorCode {
NOT_SUPPORTED_GATEWAY NOT_SUPPORTED_GATEWAY
} }
input PaymentFilterInput {
checkouts: [ID]
}
type PaymentGateway { type PaymentGateway {
name: String! name: String!
id: ID! id: ID!
@ -3957,7 +3971,7 @@ type Product implements Node & ObjectWithMetadata {
mediaById(id: ID): ProductMedia! mediaById(id: ID): ProductMedia!
imageById(id: ID): ProductImage @deprecated(reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead.") imageById(id: ID): ProductImage @deprecated(reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead.")
variants: [ProductVariant] variants: [ProductVariant]
media: [ProductMedia] media: [ProductMedia!]
images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` field instead.") images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` field instead.")
collections: [Collection] collections: [Collection]
translation(languageCode: LanguageCodeEnum!): ProductTranslation translation(languageCode: LanguageCodeEnum!): ProductTranslation
@ -4127,6 +4141,7 @@ input ProductFilterInput {
productType: ID productType: ID
stocks: ProductStockFilterInput stocks: ProductStockFilterInput
search: String search: String
metadata: [MetadataInput]
price: PriceRangeInput price: PriceRangeInput
minimalPrice: PriceRangeInput minimalPrice: PriceRangeInput
productTypes: [ID] productTypes: [ID]
@ -4341,6 +4356,7 @@ input ProductTypeFilterInput {
search: String search: String
configurable: ProductTypeConfigurable configurable: ProductTypeConfigurable
productType: ProductTypeEnum productType: ProductTypeEnum
metadata: [MetadataInput]
ids: [ID] ids: [ID]
} }
@ -4486,6 +4502,7 @@ type ProductVariantDelete {
input ProductVariantFilterInput { input ProductVariantFilterInput {
search: String search: String
sku: [String] sku: [String]
metadata: [MetadataInput]
} }
input ProductVariantInput { input ProductVariantInput {
@ -4590,7 +4607,7 @@ type Query {
productVariants(ids: [ID], channel: String, filter: ProductVariantFilterInput, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection productVariants(ids: [ID], channel: String, filter: ProductVariantFilterInput, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection
reportProductSales(period: ReportingPeriod!, channel: String!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection reportProductSales(period: ReportingPeriod!, channel: String!, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection
payment(id: ID!): Payment payment(id: ID!): Payment
payments(before: String, after: String, first: Int, last: Int): PaymentCountableConnection payments(filter: PaymentFilterInput, before: String, after: String, first: Int, last: Int): PaymentCountableConnection
page(id: ID, slug: String): Page page(id: ID, slug: String): Page
pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection pages(sortBy: PageSortingInput, filter: PageFilterInput, before: String, after: String, first: Int, last: Int): PageCountableConnection
pageType(id: ID!): PageType pageType(id: ID!): PageType
@ -5359,23 +5376,11 @@ type Transaction implements Node {
token: String! token: String!
kind: TransactionKind! kind: TransactionKind!
isSuccess: Boolean! isSuccess: Boolean!
error: TransactionError error: String
gatewayResponse: JSONString!
amount: Money amount: Money
} }
enum TransactionError {
TRANSACTIONERROR_INCORRECT_NUMBER
TRANSACTIONERROR_INVALID_NUMBER
TRANSACTIONERROR_INCORRECT_CVV
TRANSACTIONERROR_INVALID_CVV
TRANSACTIONERROR_INCORRECT_ZIP
TRANSACTIONERROR_INCORRECT_ADDRESS
TRANSACTIONERROR_INVALID_EXPIRY_DATE
TRANSACTIONERROR_EXPIRED
TRANSACTIONERROR_PROCESSING_ERROR
TRANSACTIONERROR_DECLINED
}
enum TransactionKind { enum TransactionKind {
EXTERNAL EXTERNAL
AUTH AUTH

View file

@ -1,9 +1,9 @@
import CssBaseline from "@material-ui/core/CssBaseline"; import CssBaseline from "@material-ui/core/CssBaseline";
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
import { fade } from "@material-ui/core/styles/colorManipulator"; import { fade } from "@material-ui/core/styles/colorManipulator";
import { createStyles, SaleorTheme, withStyles } from "@saleor/theme";
import React from "react"; import React from "react";
const styles = createStyles((theme: Theme) => ({ const styles = createStyles((theme: SaleorTheme) => ({
"@global": { "@global": {
"@import": "url('https://rsms.me/inter/inter.css')", "@import": "url('https://rsms.me/inter/inter.css')",

View file

@ -1,4 +1,4 @@
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,4 +1,4 @@
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,5 +1,5 @@
import { makeStyles } from "@material-ui/core/styles";
import { fade } from "@material-ui/core/styles/colorManipulator"; import { fade } from "@material-ui/core/styles/colorManipulator";
import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,4 +1,4 @@
import makeStyles from "@material-ui/core/styles/makeStyles"; import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,4 +1,4 @@
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,5 +1,5 @@
import { makeStyles } from "@material-ui/core/styles";
import { fade } from "@material-ui/core/styles/colorManipulator"; import { fade } from "@material-ui/core/styles/colorManipulator";
import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,4 +1,4 @@
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@saleor/theme";
export const useStyles = makeStyles( export const useStyles = makeStyles(
theme => ({ theme => ({

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppTypeEnum, PermissionEnum } from "./../../types/globalTypes"; import { AppTypeEnum, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppInput, AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppInput, AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppTypeEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { PermissionEnum, AppErrorCode } from "./../../types/globalTypes"; import { PermissionEnum, AppErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppInstallInput, JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppInstallInput, JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { JobStatusEnum, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppTokenInput, AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppTokenInput, AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AppErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppInput, AppTypeEnum, PermissionEnum, AppErrorCode } from "./../../types/globalTypes"; import { AppInput, AppTypeEnum, PermissionEnum, AppErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { JobStatusEnum } from "./../../types/globalTypes"; import { JobStatusEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AppSortingInput, AppFilterInput, AppTypeEnum } from "./../../types/globalTypes"; import { AppSortingInput, AppFilterInput, AppTypeEnum } from "./../../types/globalTypes";

View file

@ -1,6 +1,5 @@
import Card from "@material-ui/core/Card"; import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent"; import CardContent from "@material-ui/core/CardContent";
import { makeStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import CardTitle from "@saleor/components/CardTitle"; import CardTitle from "@saleor/components/CardTitle";
import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; import ControlledCheckbox from "@saleor/components/ControlledCheckbox";
@ -8,6 +7,7 @@ import FormSpacer from "@saleor/components/FormSpacer";
import SingleSelectField from "@saleor/components/SingleSelectField"; import SingleSelectField from "@saleor/components/SingleSelectField";
import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment"; import { AttributeErrorFragment } from "@saleor/fragments/types/AttributeErrorFragment";
import { commonMessages } from "@saleor/intl"; import { commonMessages } from "@saleor/intl";
import { makeStyles } from "@saleor/theme";
import { import {
AttributeEntityTypeEnum, AttributeEntityTypeEnum,
AttributeInputTypeEnum AttributeInputTypeEnum

View file

@ -1,4 +1,3 @@
import { makeStyles } from "@material-ui/core/styles";
import TableBody from "@material-ui/core/TableBody"; import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell"; import TableCell from "@material-ui/core/TableCell";
import TableFooter from "@material-ui/core/TableFooter"; import TableFooter from "@material-ui/core/TableFooter";
@ -12,6 +11,7 @@ import TableHead from "@saleor/components/TableHead";
import TablePagination from "@saleor/components/TablePagination"; import TablePagination from "@saleor/components/TablePagination";
import { translateBoolean } from "@saleor/intl"; import { translateBoolean } from "@saleor/intl";
import { maybe, renderCollection } from "@saleor/misc"; import { maybe, renderCollection } from "@saleor/misc";
import { makeStyles } from "@saleor/theme";
import { ListActions, ListProps, SortPage } from "@saleor/types"; import { ListActions, ListProps, SortPage } from "@saleor/types";
import { getArrowDirection } from "@saleor/utils/sort"; import { getArrowDirection } from "@saleor/utils/sort";
import React from "react"; import React from "react";

View file

@ -1,7 +1,6 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card"; import Card from "@material-ui/core/Card";
import IconButton from "@material-ui/core/IconButton"; import IconButton from "@material-ui/core/IconButton";
import { makeStyles } from "@material-ui/core/styles";
import TableCell from "@material-ui/core/TableCell"; import TableCell from "@material-ui/core/TableCell";
import TableHead from "@material-ui/core/TableHead"; import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow"; import TableRow from "@material-ui/core/TableRow";
@ -15,6 +14,7 @@ import {
} from "@saleor/components/SortableTable"; } from "@saleor/components/SortableTable";
import { AttributeDetailsFragment_values } from "@saleor/fragments/types/AttributeDetailsFragment"; import { AttributeDetailsFragment_values } from "@saleor/fragments/types/AttributeDetailsFragment";
import { maybe, renderCollection, stopPropagation } from "@saleor/misc"; import { maybe, renderCollection, stopPropagation } from "@saleor/misc";
import { makeStyles } from "@saleor/theme";
import { ReorderAction } from "@saleor/types"; import { ReorderAction } from "@saleor/types";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes"; import { AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeFilterInput, AttributeSortingInput, AttributeTypeEnum } from "./../../types/globalTypes"; import { AttributeFilterInput, AttributeSortingInput, AttributeTypeEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeUpdateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeUpdateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeValueCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeValueCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { ReorderInput, AttributeErrorCode } from "./../../types/globalTypes"; import { ReorderInput, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AttributeValueCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes"; import { AttributeValueCreateInput, AttributeTypeEnum, AttributeInputTypeEnum, AttributeEntityTypeEnum, AttributeErrorCode } from "./../../types/globalTypes";

View file

@ -1,8 +1,8 @@
import backgroundArt from "@assets/images/login-background.svg"; import backgroundArt from "@assets/images/login-background.svg";
import saleorDarkLogo from "@assets/images/logo-dark.svg"; import saleorDarkLogo from "@assets/images/logo-dark.svg";
import saleorLightLogo from "@assets/images/logo-light.svg"; import saleorLightLogo from "@assets/images/logo-light.svg";
import { makeStyles } from "@material-ui/core/styles";
import useTheme from "@saleor/hooks/useTheme"; import useTheme from "@saleor/hooks/useTheme";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import SVG from "react-inlinesvg"; import SVG from "react-inlinesvg";

View file

@ -1,5 +1,5 @@
import CircularProgress from "@material-ui/core/CircularProgress"; import CircularProgress from "@material-ui/core/CircularProgress";
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
const useStyles = makeStyles( const useStyles = makeStyles(

View file

@ -1,13 +1,13 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import CircularProgress from "@material-ui/core/CircularProgress"; import CircularProgress from "@material-ui/core/CircularProgress";
import Divider from "@material-ui/core/Divider"; import Divider from "@material-ui/core/Divider";
import { makeStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import { AvailableExternalAuthentications_shop_availableExternalAuthentications } from "@saleor/auth/types/AvailableExternalAuthentications"; import { AvailableExternalAuthentications_shop_availableExternalAuthentications } from "@saleor/auth/types/AvailableExternalAuthentications";
import { FormSpacer } from "@saleor/components/FormSpacer"; import { FormSpacer } from "@saleor/components/FormSpacer";
import { SubmitPromise } from "@saleor/hooks/useForm"; import { SubmitPromise } from "@saleor/hooks/useForm";
import { commonMessages } from "@saleor/intl"; import { commonMessages } from "@saleor/intl";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";

View file

@ -1,10 +1,10 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import { makeStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword"; import { SetPassword_setPassword_errors } from "@saleor/auth/types/SetPassword";
import Form from "@saleor/components/Form"; import Form from "@saleor/components/Form";
import FormSpacer from "@saleor/components/FormSpacer"; import FormSpacer from "@saleor/components/FormSpacer";
import { makeStyles } from "@saleor/theme";
import getAccountErrorMessage from "@saleor/utils/errors/account"; import getAccountErrorMessage from "@saleor/utils/errors/account";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";

View file

@ -1,10 +1,10 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import { makeStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import Form from "@saleor/components/Form"; import Form from "@saleor/components/Form";
import FormSpacer from "@saleor/components/FormSpacer"; import FormSpacer from "@saleor/components/FormSpacer";
import { commonMessages } from "@saleor/intl"; import { commonMessages } from "@saleor/intl";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";

View file

@ -1,7 +1,7 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import { makeStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography"; import Typography from "@material-ui/core/Typography";
import FormSpacer from "@saleor/components/FormSpacer"; import FormSpacer from "@saleor/components/FormSpacer";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import { FormattedMessage } from "react-intl"; import { FormattedMessage } from "react-intl";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
// ==================================================== // ====================================================

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AccountErrorCode } from "./../../types/globalTypes"; import { AccountErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { PermissionEnum, AccountErrorCode } from "./../../types/globalTypes"; import { PermissionEnum, AccountErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
// ==================================================== // ====================================================

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { PermissionEnum } from "./../../types/globalTypes"; import { PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
// ==================================================== // ====================================================

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AccountErrorCode } from "./../../types/globalTypes"; import { AccountErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { AccountErrorCode, PermissionEnum } from "./../../types/globalTypes"; import { AccountErrorCode, PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { PermissionEnum } from "./../../types/globalTypes"; import { PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { PermissionEnum } from "./../../types/globalTypes"; import { PermissionEnum } from "./../../types/globalTypes";

View file

@ -1,7 +1,6 @@
import Button from "@material-ui/core/Button"; import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card"; import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent"; import CardContent from "@material-ui/core/CardContent";
import makeStyles from "@material-ui/core/styles/makeStyles";
import TextField from "@material-ui/core/TextField"; import TextField from "@material-ui/core/TextField";
import CardTitle from "@saleor/components/CardTitle"; import CardTitle from "@saleor/components/CardTitle";
import Hr from "@saleor/components/Hr"; import Hr from "@saleor/components/Hr";
@ -9,6 +8,7 @@ import ImageUpload from "@saleor/components/ImageUpload";
import MediaTile from "@saleor/components/MediaTile"; import MediaTile from "@saleor/components/MediaTile";
import Skeleton from "@saleor/components/Skeleton"; import Skeleton from "@saleor/components/Skeleton";
import { commonMessages } from "@saleor/intl"; import { commonMessages } from "@saleor/intl";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";

View file

@ -4,8 +4,8 @@ import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent"; import DialogContent from "@material-ui/core/DialogContent";
import DialogContentText from "@material-ui/core/DialogContentText"; import DialogContentText from "@material-ui/core/DialogContentText";
import DialogTitle from "@material-ui/core/DialogTitle"; import DialogTitle from "@material-ui/core/DialogTitle";
import { makeStyles } from "@material-ui/core/styles";
import { buttonMessages } from "@saleor/intl"; import { buttonMessages } from "@saleor/intl";
import { makeStyles } from "@saleor/theme";
import React from "react"; import React from "react";
import { FormattedMessage } from "react-intl"; import { FormattedMessage } from "react-intl";

View file

@ -1,4 +1,3 @@
import { makeStyles } from "@material-ui/core/styles";
import TableBody from "@material-ui/core/TableBody"; import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell"; import TableCell from "@material-ui/core/TableCell";
import TableFooter from "@material-ui/core/TableFooter"; import TableFooter from "@material-ui/core/TableFooter";
@ -12,6 +11,7 @@ import TableHead from "@saleor/components/TableHead";
import TablePagination from "@saleor/components/TablePagination"; import TablePagination from "@saleor/components/TablePagination";
import { CategoryFragment } from "@saleor/fragments/types/CategoryFragment"; import { CategoryFragment } from "@saleor/fragments/types/CategoryFragment";
import { maybe, renderCollection } from "@saleor/misc"; import { maybe, renderCollection } from "@saleor/misc";
import { makeStyles } from "@saleor/theme";
import { ListActions, ListProps, SortPage } from "@saleor/types"; import { ListActions, ListProps, SortPage } from "@saleor/types";
import { getArrowDirection } from "@saleor/utils/sort"; import { getArrowDirection } from "@saleor/utils/sort";
import React from "react"; import React from "react";

View file

@ -1,4 +1,3 @@
import { makeStyles } from "@material-ui/core/styles";
import TableBody from "@material-ui/core/TableBody"; import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell"; import TableCell from "@material-ui/core/TableCell";
import TableFooter from "@material-ui/core/TableFooter"; import TableFooter from "@material-ui/core/TableFooter";
@ -14,6 +13,7 @@ import TableCellAvatar, {
import TableHead from "@saleor/components/TableHead"; import TableHead from "@saleor/components/TableHead";
import TablePagination from "@saleor/components/TablePagination"; import TablePagination from "@saleor/components/TablePagination";
import { maybe, renderCollection } from "@saleor/misc"; import { maybe, renderCollection } from "@saleor/misc";
import { makeStyles } from "@saleor/theme";
import { ChannelProps, ListActions, ListProps } from "@saleor/types"; import { ChannelProps, ListActions, ListProps } from "@saleor/types";
import React from "react"; import React from "react";
import { FormattedMessage } from "react-intl"; import { FormattedMessage } from "react-intl";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { ProductErrorCode } from "./../../types/globalTypes"; import { ProductErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { CategoryInput, ProductErrorCode } from "./../../types/globalTypes"; import { CategoryInput, ProductErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
import { ProductErrorCode } from "./../../types/globalTypes"; import { ProductErrorCode } from "./../../types/globalTypes";

View file

@ -1,5 +1,6 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
// @generated
// This file was automatically generated and should not be edited. // This file was automatically generated and should not be edited.
// ==================================================== // ====================================================

Some files were not shown because too many files have changed in this diff Show more