fix failing tests (#1144)

This commit is contained in:
Karolina Rakoczy 2021-06-07 17:16:44 +02:00 committed by GitHub
parent 7df850bcb1
commit 50bb0105bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 9 deletions

View file

@ -42,7 +42,7 @@ export function getChannels() {
export function deleteChannel(channelId, targetChannelId) { export function deleteChannel(channelId, targetChannelId) {
const deleteChannelMutation = `mutation{ const deleteChannelMutation = `mutation{
channelDelete(id: "${channelId}", input:{ channelDelete(id: "${channelId}", input:{
targetChannel: "${targetChannelId}" channelId: "${targetChannelId}"
}){ }){
channel{ channel{
name name

View file

@ -35,11 +35,11 @@ export function createDraftOrder(
draftOrderCreate(input:{ draftOrderCreate(input:{
user:"${customerId}" user:"${customerId}"
shippingMethod:"${shippingMethodId}" shippingMethod:"${shippingMethodId}"
channel: "${channelId}" channelId: "${channelId}"
${getDefaultAddress(address, "shippingAddress")} ${getDefaultAddress(address, "shippingAddress")}
${getDefaultAddress(address, "billingAddress")} ${getDefaultAddress(address, "billingAddress")}
}){ }){
orderErrors{ errors{
message message
} }
order{ order{

View file

@ -122,8 +122,7 @@ describe("Vouchers discounts", () => {
}); });
}); });
// Test should pass after fixing - SALEOR-1629 bug it("should create free shipping voucher", () => {
xit("should create free shipping voucher", () => {
const voucherCode = `${startsWith}${faker.datatype.number()}`; const voucherCode = `${startsWith}${faker.datatype.number()}`;
createVoucher({ createVoucher({

View file

@ -95,9 +95,7 @@ describe("Homepage analytics", () => {
}); });
it("should all elements be visible on the dashboard", () => { it("should all elements be visible on the dashboard", () => {
cy.pause(); cy.visit(urlList.homePage)
cy.visit(urlList.homePage);
cy.pause()
.softAssertVisibility(HOMEPAGE_SELECTORS.sales) .softAssertVisibility(HOMEPAGE_SELECTORS.sales)
.softAssertVisibility(HOMEPAGE_SELECTORS.orders) .softAssertVisibility(HOMEPAGE_SELECTORS.orders)
.softAssertVisibility(HOMEPAGE_SELECTORS.activity) .softAssertVisibility(HOMEPAGE_SELECTORS.activity)

View file

@ -59,7 +59,9 @@ export function createVariant({
.type(sku) .type(sku)
.get(VARIANTS_SELECTORS.addWarehouseButton) .get(VARIANTS_SELECTORS.addWarehouseButton)
.click(); .click();
cy.contains(VARIANTS_SELECTORS.warehouseOption, warehouseName).click(); cy.contains(VARIANTS_SELECTORS.warehouseOption, warehouseName).click({
force: true
});
cy.get(VARIANTS_SELECTORS.saveButton).click(); cy.get(VARIANTS_SELECTORS.saveButton).click();
cy.get(BUTTON_SELECTORS.back).click(); cy.get(BUTTON_SELECTORS.back).click();
selectChannelVariantInDetailsPage(channelName, attributeName); selectChannelVariantInDetailsPage(channelName, attributeName);