saleor-dashboard/cypress/utils/channelsUtils.js

17 lines
442 B
JavaScript
Raw Normal View History

2021-02-18 09:00:08 +00:00
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;