e2e: refactor content reporting test steps

This commit is contained in:
mahula 2025-06-23 18:06:01 +02:00
parent cf434524b1
commit bdf9157eed

View File

@ -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)