From 6382cc09c2c681d21a6ec94404715f53edc0bf7e Mon Sep 17 00:00:00 2001 From: Angelique Date: Mon, 9 Sep 2024 15:00:18 +0200 Subject: [PATCH] Fix malware analyses nav after datatables rebase --- opencti-platform/opencti-front/playwright.config.ts | 2 +- .../src/private/components/analyses/MalwareAnalyses.tsx | 9 +++++---- .../tests_e2e/model/MalwareAnalyses.pageModel.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/opencti-platform/opencti-front/playwright.config.ts b/opencti-platform/opencti-front/playwright.config.ts index 7d8192aa1dbc..e7f7895193a4 100644 --- a/opencti-platform/opencti-front/playwright.config.ts +++ b/opencti-platform/opencti-front/playwright.config.ts @@ -46,7 +46,7 @@ export default defineConfig({ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', screenshot: 'only-on-failure', - video: 'on-first-retry', + video: 'retain-on-failure', ignoreHTTPSErrors: true, }, expect: { timeout: 60000 }, diff --git a/opencti-platform/opencti-front/src/private/components/analyses/MalwareAnalyses.tsx b/opencti-platform/opencti-front/src/private/components/analyses/MalwareAnalyses.tsx index 4ebc48dd218d..f27284d032f3 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/MalwareAnalyses.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/MalwareAnalyses.tsx @@ -167,8 +167,8 @@ const MalwareAnalyses: FunctionComponent = () => { {queryRef && ( +
data.malwareAnalyses?.edges?.map((n) => n?.node)} storageKey={LOCAL_STORAGE_KEY} @@ -178,11 +178,12 @@ const MalwareAnalyses: FunctionComponent = () => { lineFragment={malwareAnalysisFragment} exportContext={{ entity_type: 'Malware-Analysis' }} createButton={isFABReplaced && ( - - - + + + )} /> +
)} {!isFABReplaced && ( diff --git a/opencti-platform/opencti-front/tests_e2e/model/MalwareAnalyses.pageModel.ts b/opencti-platform/opencti-front/tests_e2e/model/MalwareAnalyses.pageModel.ts index e39cc050a468..25ea10f567d8 100644 --- a/opencti-platform/opencti-front/tests_e2e/model/MalwareAnalyses.pageModel.ts +++ b/opencti-platform/opencti-front/tests_e2e/model/MalwareAnalyses.pageModel.ts @@ -25,6 +25,6 @@ export default class MalwareAnalysesPage { } getItemFromList(name: string) { - return this.page.getByRole('link', { name }).first(); + return this.page.getByLabel(name); } }