diff --git a/components/ReportModal.vue b/components/ReportModal.vue index 1ae23fd94..5e374e346 100644 --- a/components/ReportModal.vue +++ b/components/ReportModal.vue @@ -19,7 +19,7 @@ -
+ - And I click on "Report Contribution" from the triple dot menu of the post + And I click on "Report Post" from the triple dot menu of the post And I confirm the reporting dialog because it is a criminal act under German law: """ Do you really want to report the contribution "The Truth about the Holocaust"? diff --git a/cypress/integration/common/report.js b/cypress/integration/common/report.js index db264ddde..6adeb1759 100644 --- a/cypress/integration/common/report.js +++ b/cypress/integration/common/report.js @@ -39,18 +39,15 @@ Given('I am logged in with a {string} role', role => { }) }) -When( - 'I click on "Report Contribution" from the triple dot menu of the post', - () => { - cy.contains('.ds-card', davidIrvingPostTitle) - .find('.content-menu-trigger') - .click() +When('I click on "Report Post" from the triple dot menu of the post', () => { + cy.contains('.ds-card', davidIrvingPostTitle) + .find('.content-menu-trigger') + .click() - cy.get('.popover .ds-menu-item-link') - .contains('Report Contribution') - .click() - } -) + cy.get('.popover .ds-menu-item-link') + .contains('Report Post') + .click() +}) When( 'I click on "Report User" from the triple dot menu in the user info box', @@ -122,16 +119,16 @@ When(/^I confirm the reporting dialog .*:$/, message => { Given('somebody reported the following posts:', table => { table.hashes().forEach(({ id }) => { - const reporter = { - email: `reporter${id}@example.org`, + const submitter = { + email: `submitter${id}@example.org`, password: '1234' } cy.factory() - .create('User', reporter) - .authenticateAs(reporter) + .create('User', submitter) + .authenticateAs(submitter) .create('Report', { - description: "I don't like this post", - resource: { id, type: 'contribution' } + id, + description: 'Offensive content' }) }) }) diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index c17c2729b..72a7225ff 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -146,6 +146,10 @@ When(`I click on {string}`, linkOrButton => { cy.contains(linkOrButton).click() }) +When(`I click on the menu item {string}`, linkOrButton => { + cy.contains('.ds-menu-item', linkOrButton).click() +}) + When('I press {string}', label => { cy.contains(label).click() }) diff --git a/graphql/ModerationListQuery.js b/graphql/ModerationListQuery.js index 6126521cc..8ae827d7f 100644 --- a/graphql/ModerationListQuery.js +++ b/graphql/ModerationListQuery.js @@ -8,7 +8,7 @@ export default app => { description type createdAt - reporter { + submitter { name slug } @@ -27,7 +27,7 @@ export default app => { slug } } - contribution { + post { title slug author { diff --git a/locales/de.json b/locales/de.json index b9cd7956a..7c342fec9 100644 --- a/locales/de.json +++ b/locales/de.json @@ -136,7 +136,7 @@ "reports": { "empty": "Glückwunsch, es gibt nichts zu moderieren.", "name": "Meldungen", - "reporter": "gemeldet von" + "submitter": "gemeldet von" } }, "disable": { diff --git a/locales/en.json b/locales/en.json index d66af45a1..f475fcdd2 100644 --- a/locales/en.json +++ b/locales/en.json @@ -136,7 +136,7 @@ "reports": { "empty": "Congratulations, nothing to moderate.", "name": "Reports", - "reporter": "reported by" + "submitter": "reported by" } }, "disable": { @@ -165,7 +165,7 @@ "message": "Do you really want to report the user \"{name}\"?" }, "contribution": { - "title": "Report Contribution", + "title": "Report Post", "type": "Contribution", "message": "Do you really want to report the contribution \"{name}\"?" }, diff --git a/pages/moderation/index.vue b/pages/moderation/index.vue index 995c9d560..209f8dcba 100644 --- a/pages/moderation/index.vue +++ b/pages/moderation/index.vue @@ -13,18 +13,18 @@ slot="name" slot-scope="scope" > -