saleor-dashboard/cypress/utils/homePageUtils.js
Karolina fc597a7a7f
Saleor 2590 remove classes from cypress tests (#1003)
* remove classes in shipping & products utils

* remove classes

* add const

* remove getters in ProductsUtils

* remove getters in Utils

* remove getters in Utils
2021-03-12 13:14:18 +01:00

27 lines
874 B
JavaScript

import * as homePage from "../apiRequests/HomePage";
export function getOrdersReadyToFulfill(channelSlug) {
return homePage
.getOrdersWithStatus("READY_TO_FULFILL", channelSlug)
.its("body.data.orders.totalCount");
}
export function getOrdersReadyForCapture(channelSlug) {
return homePage
.getOrdersWithStatus("READY_TO_CAPTURE", channelSlug)
.its("body.data.orders.totalCount");
}
export function getProductsOutOfStock(channelSlug) {
return homePage
.getProductsOutOfStock(channelSlug)
.its("body.data.products.totalCount");
}
export function getSalesAmount(channelSlug) {
return homePage
.getSalesForChannel(channelSlug, "TODAY")
.its("body.data.ordersTotal.gross.amount");
}
export function getTodaysOrders(channelSlug) {
return homePage
.getOrdersForChannel(channelSlug, "TODAY")
.its("body.data.orders.totalCount");
}