From cbb550b651aadc7f83acb3eeff99edb7911a5868 Mon Sep 17 00:00:00 2001 From: Kaitlyn Date: Mon, 25 Nov 2024 16:47:07 -0500 Subject: [PATCH] fix e2e tests --- .../removal-under-maintenance/page.tsx | 2 +- .../(public)/breaches/BreachIndexView.stories.tsx | 10 +++------- src/e2e/pages/dashBoardPage.ts | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx index 86fce1dc479..020b5a0d277 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx @@ -43,7 +43,7 @@ export default async function RemovalUnderMaintenance() { (await getScanResultsWithBrokerUnderMaintenance(profileId)) ?? null; const getNextStep = getNextGuidedStep(data, "DataBrokerManualRemoval"); - if (scansWithRemovalUnderMaintenance === null) { + if (!scansWithRemovalUnderMaintenance) { redirect(getNextStep.href); } diff --git a/src/app/(proper_react)/(redesign)/(public)/breaches/BreachIndexView.stories.tsx b/src/app/(proper_react)/(redesign)/(public)/breaches/BreachIndexView.stories.tsx index 683399bd1c3..de5b7cc67b2 100644 --- a/src/app/(proper_react)/(redesign)/(public)/breaches/BreachIndexView.stories.tsx +++ b/src/app/(proper_react)/(redesign)/(public)/breaches/BreachIndexView.stories.tsx @@ -8,7 +8,6 @@ import { BreachIndexView, Props as ViewProps } from "./BreachIndexView"; import { getL10n } from "../../../../functions/l10n/storybookAndJest"; import { PublicShell } from "../PublicShell"; import { createRandomHibpListing } from "../../../../../apiMocks/mockData"; -import { HibpLikeDbBreach } from "../../../../../utils/hibp"; const meta: Meta = { title: "Pages/Public/Breach index", @@ -25,11 +24,8 @@ type Story = StoryObj; export const BreachIndexViewStory: Story = { name: "Breach index", args: { - allBreaches: faker.helpers.multiple( - createRandomHibpListing as (v: unknown, index: number) => unknown, - { - count: { min: 7, max: 200 }, - }, - ) as unknown as HibpLikeDbBreach[], + allBreaches: faker.helpers.multiple(() => createRandomHibpListing(), { + count: { min: 7, max: 200 }, + }), }, }; diff --git a/src/e2e/pages/dashBoardPage.ts b/src/e2e/pages/dashBoardPage.ts index ea9fc14f6eb..6bb09a7d66c 100644 --- a/src/e2e/pages/dashBoardPage.ts +++ b/src/e2e/pages/dashBoardPage.ts @@ -93,7 +93,7 @@ export class DashboardPage { '//button[starts-with(@class, "ExposureCard_chevron")]', ); this.fixExposureButton = page.getByRole("link", { - name: "Fix all exposures", + name: "Resolve exposures", }); this.removeExposuresManually = page.getByRole("link", { name: "I’ll remove them manually",