diff --git a/backend/src/db/factories.js b/backend/src/db/factories.js index 1aa369e95..ab2d13529 100644 --- a/backend/src/db/factories.js +++ b/backend/src/db/factories.js @@ -27,7 +27,10 @@ export const cleanDatabase = async (options = {}) => { Factory.define('category') .attr('id', uuid) .attr('icon', 'globe') - .attr('name', 'global-peace-nonviolence') + .attr('name', 'Global Peace & Nonviolence') + .sequence('slug', i => { + return `global-peace-nonviolence-${i}` + }) .after((buildObject, options) => { return neode.create('Category', buildObject) }) diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index c7cad0829..f728449d2 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -88,6 +88,7 @@ Then("I see a toaster with {string}", (title) => { }) Then("I should be able to {string} a teaser image", condition => { + cy.reload() let teaserImageUpload = "onourjourney.png"; if (condition === 'change') teaserImageUpload = "humanconnection.png"; cy.fixture(teaserImageUpload).as('postTeaserImage').then(function() { @@ -108,8 +109,8 @@ Then("I add all required fields", () => { .type('new post') .get(".editor .ProseMirror") .type('new post content') - .get(".base-button") - .contains("Global Peace & Nonviolence") + .get(".categories-select .base-button") + .first() .click() .get('.ds-flex-item > .ds-form-item .ds-select ') .click() diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 5beb43f96..3d46e74f1 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -262,6 +262,7 @@ When( "I click on the big plus icon in the bottom right corner to create post", () => { cy.get(".post-add-button").click(); + cy.location("pathname").should('eq', '/post/create') } ); diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue index 3e240e435..54c0d3524 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.vue +++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue @@ -1,5 +1,5 @@