diff --git a/simulator-ui/tests/home.spec.ts b/simulator-ui/tests/home.spec.ts index 269b878c..544baf28 100644 --- a/simulator-ui/tests/home.spec.ts +++ b/simulator-ui/tests/home.spec.ts @@ -87,7 +87,7 @@ test('should have updated total, successful, failed tabs after refresh button cl await checkIfSummaryTabsAreDisplayingRightNumbers(page, nbOfTotalTests, nbOfSuccessfulTests, nbOfFailedTests); }); -test('should have updated total, successful, failed tabs after refresh button clicked negative test with false total', async ({ page }) => { +test('(test if frontend trusts backend blindly) should have updated total, successful, failed tabs after refresh button clicked negative test with false total', async ({ page }) => { await checkIfSummaryTabsAreDisplayingRightNumbers(page, nbOfTotalTests, nbOfSuccessfulTests, nbOfFailedTests); nbOfFailedTests -= 10; // so the total will be wrong! const newCorrectTotal: number = nbOfTotalTests - 10; @@ -99,7 +99,8 @@ test('should have updated total, successful, failed tabs after refresh button cl await page.getByTestId('refreshListButton').click(); - await checkIfSummaryTabsAreDisplayingRightNumbers(page, newCorrectTotal, nbOfSuccessfulTests, nbOfFailedTests); + await checkIfSummaryTabsAreDisplayingRightNumbers(page, nbOfTotalTests, nbOfSuccessfulTests, nbOfFailedTests); + expect(nbOfTotalTests == newCorrectTotal).toBeFalsy(); }); test('should have same total, successful, failed tabs after cancel deletion via close-Button and cancel-Button', async ({ page }) => { diff --git a/simulator-ui/tests/scenario.spec.ts b/simulator-ui/tests/scenario.spec.ts index 36b1ca7c..118fe4af 100644 --- a/simulator-ui/tests/scenario.spec.ts +++ b/simulator-ui/tests/scenario.spec.ts @@ -212,7 +212,6 @@ const checkIfAllJsonContentIsVisible = async ( for (const element of scenarioJson) { await expect(page.getByText(element.name)).toBeVisible(); } - console.log(totalElementsAvailable, nbOfDisplayedElems) await expect(page.getByText(`Showing 1 - ${nbOfDisplayedElems} of ${totalElementsAvailable} items`)).toBeVisible(); };