diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index ccd6ac14f..dc43d1659 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -151,8 +151,8 @@ When('I press {string}', label => { }) Given('we have the following posts in our database:', table => { - table.hashes().forEach(({ Author, ...postAttributes}) => { - postAttributes.deleted = Boolean(postAttributes.deleted) + table.hashes().forEach(({ Author, ...postAttributes }) => { + postAttributes.deleted = Boolean(postAttributes.deleted) postAttributes.disabled = Boolean(postAttributes.disabled) cy.factory() .create('User', { @@ -215,14 +215,14 @@ Then('the post was saved successfully', () => { cy.get('.content').should('contain', lastPost.content) }) -Then(/^I should see only ([0-9]+) posts? on the landing page/, (postCount) => { +Then(/^I should see only ([0-9]+) posts? on the landing page/, postCount => { cy.get('.post-card').should('have.length', postCount) }) -Then('the first post on the landing page has the title:', (title) => { +Then('the first post on the landing page has the title:', title => { cy.get('.post-card:first').should('contain', title) }) -Then('I see a 404 error with the following message:', (message) => { +Then('I see a 404 error with the following message:', message => { cy.get('.error').should('contain', message) })