Replace illegal characters in screenshot file name
Change-Id: Ia1e036281a46107f2e8497af957e46a8bf28a580
diff --git a/test/korap-ui.js b/test/korap-ui.js
index 05bd029..2d82fc9 100644
--- a/test/korap-ui.js
+++ b/test/korap-ui.js
@@ -33,7 +33,7 @@
afterEach(async function () {
if (this.currentTest.state == "failed") {
- await page.screenshot({path: "failed_" + this.currentTest.title.replaceAll(/[ ]/g, "_") + '.png'});
+ await page.screenshot({path: "failed_" + this.currentTest.title.replaceAll(/[ &\/]/g, "_") + '.png'});
}
})