diff --git a/cypress/integration/05.ReportContent.feature b/cypress/integration/05.ReportContent.feature index 09d5871a3..29509fdcd 100644 --- a/cypress/integration/05.ReportContent.feature +++ b/cypress/integration/05.ReportContent.feature @@ -39,5 +39,8 @@ Feature: Report and Moderate And I visit the "moderation" page Then I see my reported user - #Scenario: Normal user can't see the moderation page - #Given I am logged in as "user" + Scenario: Normal user can't see the moderation page + Given I am logged in as "user" + + When I can click on my profile picture in the top right corner + Then I can't see the moderation menu item diff --git a/cypress/integration/common/report.js b/cypress/integration/common/report.js index 67275e61b..72a45a903 100644 --- a/cypress/integration/common/report.js +++ b/cypress/integration/common/report.js @@ -97,3 +97,10 @@ Then('I see my reported user', () => { .contains(lastReportTitle.trim()) }) }) + +Then(`I can't see the moderation menu item`, () => { + cy.get('.avatar-menu').click() + cy.get('.avatar-menu-popover') + .find('a[href="/moderation"]') + .should('have.length', 0) +})