diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index f1380378f..d0298c5a3 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -112,7 +112,7 @@ Then("I add all required fields", () => { .get(".categories-select .base-button") .first() .click() - .get('.ds-flex-item > .ds-form-item .ds-select ') + .get('.base-card > .select-field input') .click() .get('.ds-select-option') .eq(languages.findIndex(l => l.code === 'en')) @@ -120,7 +120,7 @@ Then("I add all required fields", () => { }) Then("the post was saved successfully with the {string} teaser image", condition => { - cy.get(".ds-card-content > .ds-heading") + cy.get(".base-card > .title") .should("contain", condition === 'updated' ? 'to be updated' : 'new post') .get(".content") .should("contain", condition === 'updated' ? 'successfully updated' : 'new post content') @@ -129,25 +129,22 @@ Then("the post was saved successfully with the {string} teaser image", condition .and("contains", condition === 'updated' ? 'humanconnection' : 'onourjourney') }) -Then("the first image should be removed from the preview", () => { - cy.fixture("humanconnection.png").as('postTeaserImage').then(function() { - cy.get("#postdropzone") - .children() - .get('img.thumbnail-preview') - .should('have.length', 1) - .and('have.attr', 'src') - .and('contain', this.postTeaserImage) - }) +Then("the first image should not be displayed anymore", () => { + cy.get(".hero-image") + .children() + .get('.hero-image > .image') + .should('have.length', 1) + .and('have.attr', 'src') }) Then('the {string} post was saved successfully without a teaser image', condition => { - cy.get(".ds-card-content > .ds-heading") + cy.get(".base-card > .title") .should("contain", condition === 'updated' ? 'to be updated' : 'new post') .get(".content") .should("contain", condition === 'updated' ? 'successfully updated' : 'new post content') .get('.post-page') .should('exist') - .get('.post-page img.ds-card-image') + .get('.hero-image > .image') .should('not.exist') }) @@ -157,12 +154,12 @@ Then('I should be able to remove it', () => { }) When('my post has a teaser image', () => { - cy.get('.contribution-image') + cy.get('.contribution-form .image') .should('exist') .and('have.attr', 'src') }) Then('I should be able to remove the image', () => { - cy.get('.delete-image') + cy.get('.dz-message > .base-button') .click() -}) \ No newline at end of file +}) diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index f95f95f21..3f8724bfb 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -295,7 +295,7 @@ Then("I select a category", () => { }); When("I choose {string} as the language for the post", (languageCode) => { - cy.get('.contribution-form .ds-select ') + cy.get('.contribution-form .ds-select') .click().get('.ds-select-option') .eq(languages.findIndex(l => l.code === languageCode)).click() }) @@ -582,7 +582,7 @@ Then("I see only one post with the title {string}", title => { cy.get(".main-container").contains(".post-link", title); }); -Then("they should not see the comment from", () => { +Then("they should not see the comment form", () => { cy.get(".base-card").children().should('not.have.class', 'comment-form') }) @@ -602,11 +602,11 @@ Then("I {string} see {string} from the content menu in the user info box", (cond }) Then('I should not see {string} button', button => { - cy.get('.ds-card-content .action-buttons') + cy.get('.base-card .action-buttons') .should('have.length', 1) }) Then('I should see the {string} button', button => { - cy.get('.ds-card-content .action-buttons .base-button') + cy.get('.base-card .action-buttons .base-button') .should('contain', button) }) diff --git a/cypress/integration/post/ImageUploader.feature b/cypress/integration/post/ImageUploader.feature index 2e9f1f5b9..1bbd80c78 100644 --- a/cypress/integration/post/ImageUploader.feature +++ b/cypress/integration/post/ImageUploader.feature @@ -35,7 +35,7 @@ Feature: Upload Teaser Image And confirm crop And I should be able to "change" a teaser image And confirm crop - And the first image should be removed from the preview + And the first image should not be displayed anymore Scenario: Add image, then delete it When I click on the big plus icon in the bottom right corner to create post @@ -44,4 +44,4 @@ Feature: Upload Teaser Image And I add all required fields And I click on "Save" Then I get redirected to ".../new-post" - And the "new" post was saved successfully without a teaser image \ No newline at end of file + And the "new" post was saved successfully without a teaser image diff --git a/cypress/integration/user_profile/BlockUser.feature b/cypress/integration/user_profile/BlockUser.feature index 256d79dfb..b5c510286 100644 --- a/cypress/integration/user_profile/BlockUser.feature +++ b/cypress/integration/user_profile/BlockUser.feature @@ -55,6 +55,6 @@ Feature: Block a User Scenario: Blocked users should not see link or button to unblock, only blocking users Given a user has blocked me When I visit the profile page of the annoying user - And I "should not" see "Unblock user" from the content menu in the user info box And I should see the "Follow" button - And I should not see "Unblock user" button \ No newline at end of file + And I should not see "Unblock user" button + And I "should not" see "Unblock user" from the content menu in the user info box diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index f5aa2a15c..55932014f 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -9,7 +9,7 @@ '--blur-image': blurred, }" > -