saleor-dashboard/cypress/support/api/requests/storeFront/Collections.js
Ewa Czerniak 29c7f785c0
Saleor 7780 fix for collection tests (#2227)
* fix fox tests in collection

* removing then() in tests

* fixing failing collection tests and add stable tag to run will all tests
2022-08-16 13:27:37 +02:00

23 lines
487 B
JavaScript

export function getCollection({ collectionId, channelSlug, auth }) {
const query = `query Collection{
collection(id: "${collectionId}" channel: "${channelSlug}") {
id
slug
name
description
channelListings{
isPublished
}
products(first:100){
totalCount
edges{
node{
id
name
}
}
}
}
}`;
return cy.sendRequestWithQuery(query, auth).its("body.data");
}