@brillout/test-e2e 0.5.37 → 0.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export { isTolerateError };
|
|
2
2
|
import { getConfig } from '../getConfig.js';
|
|
3
|
+
import { getCurrentTestOptional } from '../getCurrentTest.js';
|
|
3
4
|
import stripAnsi from 'strip-ansi';
|
|
4
5
|
function isTolerateError({ logSource, logText }) {
|
|
5
6
|
logText = stripAnsi(logText);
|
|
6
7
|
if (tolerateErrorBuiltIn({ logSource, logText })) {
|
|
7
8
|
return true;
|
|
8
9
|
}
|
|
10
|
+
const testInfo = getCurrentTestOptional();
|
|
9
11
|
const config = getConfig();
|
|
10
|
-
if (config.tolerateError?.({ logSource, logText })) {
|
|
12
|
+
if (config.tolerateError?.({ logSource, logText, testInfo })) {
|
|
11
13
|
return true;
|
|
12
14
|
}
|
|
13
15
|
return false;
|
|
@@ -35,7 +35,7 @@ async function testScreenshotFixture({ screenshotFixturePath, doNotTestLocally,
|
|
|
35
35
|
errMsgs.push([
|
|
36
36
|
'The screenshot fixture was uploaded as GitHub Workflow Artifact.',
|
|
37
37
|
`(See ${pc.bold('Summary')} > ${pc.bold('Artifacts')},`,
|
|
38
|
-
`and make sure to use the ${pc.bold('actions/upload-artifact
|
|
38
|
+
`and make sure to use the ${pc.bold('actions/upload-artifact')} action`,
|
|
39
39
|
`otherwise the screenshot won't be uploaded`,
|
|
40
40
|
`and the ${pc.bold('Artifacts')} section will be missing in the ${pc.bold('Summary')} page.)`,
|
|
41
41
|
`Download the fixture, check it into the repository (so that it lives at ${pngFixturPath}), and try again: the test should now pass.`,
|