Enable testcafe dev mode to pinpoint testcafe errors

This commit is contained in:
David Négrier 2021-12-05 21:21:15 +01:00
parent 97460886f0
commit a5c7abe61e
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,8 @@ services:
testcafe:
build: tests/
working_dir: /project/tests
command:
- --dev
# Run as root to have the right to access /var/run/docker.sock
user: root
environment:

View File

@ -154,7 +154,11 @@ test("Test that variables storage works", async (t: TestController) => {
}).after(async t => {
if (!t.ctx.passed) {
console.log("Test failed. Browser logs:")
console.log(await t.getBrowserConsoleMessages());
try {
console.log(await t.getBrowserConsoleMessages());
} catch (e) {
console.error('Error while fetching browser logs (maybe linked to a closed iframe?)', e);
}
}
});