From f37c2183782859bd1336eb99d194db847a16956b Mon Sep 17 00:00:00 2001 From: Mark Silverwood <3482679+SlicedSilver@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:47:36 +0000 Subject: [PATCH] Fail graphics tests using expect instead of throwing error --- tests/e2e/graphics/graphics-test-cases.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/graphics/graphics-test-cases.ts b/tests/e2e/graphics/graphics-test-cases.ts index b9619fdbcd..4b5bf8d1c4 100644 --- a/tests/e2e/graphics/graphics-test-cases.ts +++ b/tests/e2e/graphics/graphics-test-cases.ts @@ -204,10 +204,10 @@ function registerTestCases(testCases: TestCase[], screenshoter: Screenshoter, ou expect(compareResult.diffPixelsCount).to.be.equal(0, 'number of different pixels must be 0'); } else { writeTestDataItem('3.errors.txt', errors.join('\n\n')); - throw new Error( - `The error(s) happened while generating a screenshot for the page(s): ${failedPages.join(', ')}. - See ${testCaseOutDir} directory for an output of the test case.` - ); + expect( + false, + `The error(s) happened while generating a screenshot for the page(s): ${failedPages.join(', ')}. See ${testCaseOutDir} directory for an output of the test case.` + ).to.equal(true); } rmRf(testCaseOutDir);