mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
e2e: refactor content reporting test steps
This commit is contained in:
parent
cf434524b1
commit
bdf9157eed
@ -14,6 +14,18 @@ defineStep('I click on {string}', element => {
|
||||
'Moderation': 'a[href="/moderation"]',
|
||||
}
|
||||
|
||||
if (element === 'Moderation') {
|
||||
cy.intercept({
|
||||
method: 'POST',
|
||||
url: '/api',
|
||||
hostname: 'localhost',
|
||||
}, (req) => {
|
||||
if (req.body && req.body.query && req.body.query.includes('query ($orderBy: ReportOrdering')) {
|
||||
req.alias = 'reportsQuery'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
cy.get(elementSelectors[element])
|
||||
.click()
|
||||
.wait(750)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user