
* reference type cypress working * refactor * remove screenshots * add reference * add slash marker * run tests based on shop version * fix run tests based on shop version * fix run tests based on shop version * change base url to localhost * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix yml * fix yml * chage file names * fix files names * fix broken imports add checking for errors in grpah responses * fix broken imports add checking for errors in grpah responses * update jest * fix snapshot
11 lines
403 B
JavaScript
11 lines
403 B
JavaScript
export const isCollectionVisible = (resp, collectionId) => {
|
|
const collection = resp.body.data.collection;
|
|
return collection !== null && collection.id === collectionId;
|
|
};
|
|
|
|
export const isProductInCollectionVisible = (resp, productId) => {
|
|
const productsList = resp.body.data.collection.products;
|
|
return (
|
|
productsList.totalCount !== 0 && productsList.edges[0].node.id === productId
|
|
);
|
|
};
|