mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix query builder/test
This commit is contained in:
parent
3dee2137d4
commit
478f6fef1c
@ -30,7 +30,7 @@ export const getBlockedByUsers = async context => {
|
||||
.relationship(userModel.relationships().get('blocked'))
|
||||
.to('blocked', userModel)
|
||||
.where('blocked.id', context.user.id)
|
||||
.where('blocked.user', 'user')
|
||||
.where('blocked.role', 'user')
|
||||
.return('user')
|
||||
blockedByUsers = await blockedByUsers.execute()
|
||||
blockedByUsers = blockedByUsers.records.map(r => r.get('user').properties)
|
||||
|
||||
@ -5,7 +5,7 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
|
||||
let lastReportTitle
|
||||
let davidIrvingPostTitle = 'The Truth about the Holocaust'
|
||||
let davidIrvingPostSlug = 'the-truth-about-the-holocaust'
|
||||
let davidIrvingName = 'David Irving'
|
||||
let annoyingUserWhoBlockedModeratorTitle = 'Fake news'
|
||||
|
||||
const savePostTitle = $post => {
|
||||
return $post
|
||||
@ -139,6 +139,12 @@ Then('I see all the reported posts including the one from above', () => {
|
||||
})
|
||||
})
|
||||
|
||||
Then('I see all the reported posts including from the user who blocked me', () => {
|
||||
cy.get('table tbody').within(() => {
|
||||
cy.contains('tr', annoyingUserWhoBlockedModeratorTitle)
|
||||
})
|
||||
})
|
||||
|
||||
Then('each list item links to the post page', () => {
|
||||
cy.contains(davidIrvingPostTitle).click()
|
||||
cy.location('pathname').should('contain', '/post')
|
||||
|
||||
@ -67,7 +67,7 @@ Feature: Report and Moderate
|
||||
And I am logged in
|
||||
When I click on the avatar menu in the top right corner
|
||||
And I click on "Moderation"
|
||||
Then I see all the reported posts including the one from above
|
||||
Then I see all the reported posts including from the user who blocked me
|
||||
And each list item links to the post page
|
||||
|
||||
Scenario: Normal user can't see the moderation page
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user