mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
add network interception to e2e test step
This commit is contained in:
parent
3a79884db3
commit
2fa8be30c5
@ -5,9 +5,9 @@ Then('I see all the reported posts including the one from above', () => {
|
||||
method: 'POST',
|
||||
url: '/api',
|
||||
hostname: 'localhost',
|
||||
}).as('postToApi')
|
||||
}).as('getReports')
|
||||
|
||||
cy.wait(['@postToApi']).then((interception) => {
|
||||
cy.wait(['@getReports']).then((interception) => {
|
||||
console.log('Cypress interception:', interception)
|
||||
cy.wrap(interception.response.statusCode).should('eq', 200)
|
||||
cy.wrap(interception.request.body)
|
||||
@ -100,7 +100,7 @@ Then('I see all the reported posts including the one from above', () => {
|
||||
)
|
||||
cy.wrap(interception.response.body)
|
||||
.should('have.nested.property', 'data.reports.0')
|
||||
// .and('not.be', null)
|
||||
.and('not.be.null')
|
||||
})
|
||||
|
||||
cy.get('table tbody').within(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user