Skip to content

Commit ef7d7e4

Browse files
feat: draft
1 parent 6df2531 commit ef7d7e4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

front/e2e/tests/helper/auth.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,20 @@ export async function login(page: Page) {
1313
await passwordInput.fill('apassword')
1414
await submitButton.click()
1515

16+
page.on('request', (request) => {
17+
console.log(`➡️ Requête envoyée: ${request.method()} ${request.url()}`)
18+
})
19+
20+
// Intercepter et log les réponses
21+
page.on('response', async (response) => {
22+
console.log(`⬅️ Réponse reçue: ${response.status()} ${response.url()}`)
23+
try {
24+
const json = await response.json()
25+
console.log('📩 Contenu:', json)
26+
} catch (e) {
27+
console.log('📩 Réponse non-JSON')
28+
}
29+
})
30+
1631
await expect(page).toHaveURL('/fr/admin/settings/scope/catalogs', {})
1732
}

0 commit comments

Comments
 (0)