Fixed user report test

This commit is contained in:
Grzegorz Leoniec 2019-01-18 10:10:42 +01:00
parent cd40879c6e
commit 12d713d528
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Feature: Report content
Feature: Report and Moderate
As a user
I would like to report content that viloates the community guidlines
So the moderators can take action on it

View File

@ -85,11 +85,15 @@ Then('I get a success message', () => {
Then('I see my reported post', () => {
cy.get('table').then(() => {
cy.get('tbody tr:first-child()').contains(lastReportTitle.slice(0, 20))
cy.get('tbody tr')
.first()
.contains(lastReportTitle.trim().slice(0, 20))
})
})
Then('I see my reported user', () => {
cy.get('table').then(() => {
cy.get('tbody tr:first-child()').contains(lastReportTitle)
cy.get('tbody tr')
.first()
.contains(lastReportTitle.trim())
})
})