diff --git a/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js b/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js index 019cc956a..55a728482 100644 --- a/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js +++ b/cypress/support/step_definitions/Post.Images/I_should_be_able_to_{string}_a_teaser_image.js @@ -1,28 +1,27 @@ import { Then } from "@badeball/cypress-cucumber-preprocessor"; Then("I should be able to {string} a teaser image", condition => { - // cy.reload() switch(condition){ - case 'change': - cy.get('.delete-image-button') + case "change": + cy.get(".delete-image-button") .click() - cy.fixture('humanconnection.png').as('postTeaserImage').then(function() { - cy.get("#postdropzone").upload( - { fileContent: this.postTeaserImage, fileName: 'humanconnection.png', mimeType: "image/png" }, - { subjectType: "drag-n-drop", force: true } + cy.fixture("humanconnection.png").as("postTeaserImage").then(function() { + cy.get("#postdropzone").selectFile( + { contents: this.postTeaserImage, fileName: "humanconnection.png", mimeType: "image/png" }, + { action: "drag-drop" } ).wait(750); }) break; - case 'add': - cy.fixture('onourjourney.png').as('postTeaserImage').then(function() { - cy.get("#postdropzone").upload( - { fileContent: this.postTeaserImage, fileName: 'onourjourney.png', mimeType: "image/png" }, - { subjectType: "drag-n-drop", force: true } + case "add": + cy.fixture("onourjourney.png").as("postTeaserImage").then(function() { + cy.get("#postdropzone").selectFile( + { contents: this.postTeaserImage, fileName: "onourjourney.png", mimeType: "image/png" }, + { action: "drag-drop" } ).wait(750); }) break; - case 'remove': - cy.get('.delete-image-button') + case "remove": + cy.get(".delete-image-button") .click() break; } diff --git a/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js b/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js index b13d115a7..2ebe686f2 100644 --- a/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js +++ b/cypress/support/step_definitions/UserProfile.Avatar/I_should_be_able_to_change_my_profile_picture.js @@ -6,7 +6,7 @@ Then("I should be able to change my profile picture", () => { cy.fixture(avatarUpload, "base64").then(fileContent => { cy.get("#customdropzone").selectFile( { fileName: avatarUpload, mimeType: "image/png" }, - { action: 'drag-drop' } + { action: "drag-drop" } ); }); cy.get(".profile-page-avatar img")