-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[backend/frontend] entity_type filter available for abstract types (#…
- Loading branch information
Showing
5 changed files
with
55 additions
and
16 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
12 changes: 12 additions & 0 deletions
12
opencti-platform/opencti-front/tests_e2e/filters/addFilter.spec.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,12 @@ | ||
import { expect, test } from "../fixtures/baseFixtures"; | ||
import { FiltersUtils } from '../model/filters.pageModel'; | ||
|
||
test('Add a new filter in the observables list and check the filter is still present when we come back to the page', async ({ page }) => { | ||
await page.goto('/dashboard/observations/observables'); | ||
const filterUtils = new FiltersUtils(page); | ||
await filterUtils.addFilter('Entity type', 'Artifact'); | ||
await expect(page.getByRole('button', { name: 'Entity type = Artifact' })).toBeVisible(); | ||
await page.goto('/dashboard/'); | ||
await page.goto('/dashboard/observations/observables'); | ||
await expect(page.getByRole('button', { name: 'Entity type = Artifact' })).toBeVisible(); | ||
}); |
14 changes: 14 additions & 0 deletions
14
opencti-platform/opencti-front/tests_e2e/model/filters.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,14 @@ | ||
import { Page } from '@playwright/test'; | ||
|
||
export class FiltersUtils { | ||
constructor(private page: Page) { | ||
} | ||
async addFilter(filterKey: string, filterLabel: string) { | ||
await this.page.getByLabel('Add filter').click(); | ||
await this.page.getByRole('option', { name: filterKey }).click(); | ||
await this.page.getByLabel(filterKey).click(); | ||
await this.page.getByLabel(filterLabel).getByRole('checkbox').check(); | ||
await this.page.locator('.MuiPopover-root > .MuiBackdrop-root').click(); | ||
} | ||
|
||
} |
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