saleor-dashboard/cypress/utils/channelsUtils.js
2021-02-18 10:00:08 +01:00

16 lines
442 B
JavaScript

import Channels from "../apiRequests/Channels";
class ChannelsUtils {
channels = new Channels();
getDefaultChannel() {
return this.channels.getChannels().then(resp => {
const channelsArray = resp.body.data.channels;
return (this.defaultChannel = channelsArray.find(function(
channelElement
) {
return channelElement.slug === "default-channel";
}));
});
}
}
export default ChannelsUtils;