-
Notifications
You must be signed in to change notification settings - Fork 941
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend/e2e] Navigation on groupings and malware analyses (#7378)
- Loading branch information
1 parent
79d21ee
commit b3aa498
Showing
20 changed files
with
264 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
opencti-platform/opencti-front/tests_e2e/model/MalwareAnalyses.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Page } from '@playwright/test'; | ||
import LeftBarPage from './menu/leftBar.pageModel'; | ||
|
||
export default class MalwareAnalysesPage { | ||
pageUrl = '/dashboard/analyses/malware_analyses'; | ||
|
||
constructor(private page: Page) { | ||
} | ||
|
||
/** | ||
* Reload the page (like F5), mostly used once on test start. | ||
* When possible please use navigateFromMenu instead it's faster. | ||
*/ | ||
async goto() { | ||
await this.page.goto(this.pageUrl); | ||
} | ||
|
||
async navigateFromMenu() { | ||
const leftBarPage = new LeftBarPage(this.page); | ||
await leftBarPage.open(); | ||
await leftBarPage.clickOnMenu('Analyses', 'Malware analyses'); | ||
} | ||
getPage() { | ||
return this.page.getByTestId('malware-analyses-page'); | ||
} | ||
|
||
getItemFromList(name: string) { | ||
return this.page.getByLabel(name); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
opencti-platform/opencti-front/tests_e2e/model/MalwareAnalysesDetails.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Page } from '@playwright/test'; | ||
import SDOTabs from './SDOTabs.pageModel'; | ||
|
||
export default class MalwareAnalysesDetailsPage { | ||
tabs = new SDOTabs(this.page); | ||
constructor(private page: Page) {} | ||
|
||
getPage() { | ||
return this.page.getByTestId('malware-analyses-details-page'); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
opencti-platform/opencti-front/tests_e2e/model/SDOTabs.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Page } from '@playwright/test'; | ||
|
||
/** | ||
* Common page for all components that have Overview/Knowledge/...etc tabs (in knowledge) | ||
*/ | ||
export default class SDOTabs { | ||
constructor(private page: Page) {} | ||
|
||
goToOverviewTab() { | ||
return this.page.getByRole('tab', { name: 'Overview' }).click(); | ||
} | ||
|
||
goToKnowledgeTab() { | ||
return this.page.getByRole('tab', { name: 'Knowledge' }).click(); | ||
} | ||
|
||
goToEntitiesTab() { | ||
return this.page.getByRole('tab', { name: 'Entities' }).click(); | ||
} | ||
|
||
goToContentTab() { | ||
return this.page.getByRole('tab', { name: 'Content' }).click(); | ||
} | ||
|
||
goToDataTab() { | ||
return this.page.getByRole('tab', { name: 'Data' }).click(); | ||
} | ||
|
||
goToObservablesTab() { | ||
return this.page.getByRole('tab', { name: 'Observables' }).click(); | ||
} | ||
|
||
goToHistoryTab() { | ||
return this.page.getByRole('tab', { name: 'History' }).click(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
opencti-platform/opencti-front/tests_e2e/model/StixCoreObjectHistoryTab.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Page } from '@playwright/test'; | ||
|
||
export default class StixCoreObjectHistoryTab { | ||
constructor(private page: Page) { | ||
} | ||
|
||
getPage() { | ||
return this.page.getByTestId('sco-history-content'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
opencti-platform/opencti-front/tests_e2e/model/groupingDetails.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
opencti-platform/opencti-front/tests_e2e/model/report.pageModel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.