From 7d229bfec28c94e93510068a98145eb9c02852db Mon Sep 17 00:00:00 2001 From: Andrei Nenashev Date: Tue, 24 Oct 2023 17:34:09 +0200 Subject: [PATCH] tests linter --- .../SingleFilter/SingleFilter.tsx | 2 +- .../shared/elements/AppSelect/AppSelect.tsx | 7 ++++++- tests/features/filters/filters.spec.ts | 14 +++++++------- tests/ui/pages/catalog/catalog.page.ts | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/odd-platform-ui/src/components/shared/elements/Activity/ActivityFilterItems/SingleFilter/SingleFilter.tsx b/odd-platform-ui/src/components/shared/elements/Activity/ActivityFilterItems/SingleFilter/SingleFilter.tsx index d7fee1d45..9e008ac2d 100644 --- a/odd-platform-ui/src/components/shared/elements/Activity/ActivityFilterItems/SingleFilter/SingleFilter.tsx +++ b/odd-platform-ui/src/components/shared/elements/Activity/ActivityFilterItems/SingleFilter/SingleFilter.tsx @@ -53,7 +53,7 @@ const SingleFilter = diff --git a/odd-platform-ui/src/components/shared/elements/AppSelect/AppSelect.tsx b/odd-platform-ui/src/components/shared/elements/AppSelect/AppSelect.tsx index eb4ffba5f..56934fa98 100644 --- a/odd-platform-ui/src/components/shared/elements/AppSelect/AppSelect.tsx +++ b/odd-platform-ui/src/components/shared/elements/AppSelect/AppSelect.tsx @@ -20,13 +20,18 @@ const AppSelect: React.FC = React.forwardRef( - {label && {label}} + {label && ( + + {label} + + )} { steps: { pages }, }) => { await test.step('Apply filter Datasource', async () => { - await pages.catalog.openFilterWithSelect(datasourceFilter); + await pages.catalog.openFilterWithSelect(datasourcesFilter); await pages.catalog.chooseOption(datasourceOptionBookETL); expect(await pages.catalog.isListItemVisible(bookETLDataEntity)).toBeTruthy(); }); @@ -39,7 +39,7 @@ test.describe('Check filters', () => { */ test('Should display the expected item with Namespace filter', async ({ steps: { pages } }) => { await test.step('Apply filter Namespace', async () => { - await pages.catalog.openFilterWithSelect(namespaceFilter); + await pages.catalog.openFilterWithSelect(namespacesFilter); await pages.catalog.chooseOption(namespaceOption); expect(await pages.catalog.isListItemVisible(bookETLDataEntity)).toBeTruthy(); }); @@ -113,7 +113,7 @@ test.describe('Check filters', () => { const ownerName2 = `ownerName2${workerId}`; const ownerTitle2 = `ownerTitle2${workerId}`; await test.step('Apply filter Namespace', async () => { - await pages.catalog.openFilterWithSelect(namespaceFilter); + await pages.catalog.openFilterWithSelect(namespacesFilter); await pages.catalog.chooseOption(namespaceOption); expect(await pages.catalog.isListItemVisible(bookETLDataEntity)).toBeTruthy(); }); @@ -137,11 +137,11 @@ test.describe('Check filters', () => { const ownerName3 = `ownerName3${workerId}`; const ownerTitle3 = `ownerTitle3${workerId}`; await test.step('Apply filter Datasource', async () => { - await pages.catalog.openFilterWithSelect(datasourceFilter); + await pages.catalog.openFilterWithSelect(datasourcesFilter); await pages.catalog.chooseOption(datasourceOptionBookETL); }); await test.step('Apply filter Namespace', async () => { - await pages.catalog.openFilterWithSelect(namespaceFilter); + await pages.catalog.openFilterWithSelect(namespacesFilter); await pages.catalog.chooseOption(namespaceOption); }); await test.step('Apply filter Owner', async () => { diff --git a/tests/ui/pages/catalog/catalog.page.ts b/tests/ui/pages/catalog/catalog.page.ts index cadd7a0f3..76dd8ec0a 100644 --- a/tests/ui/pages/catalog/catalog.page.ts +++ b/tests/ui/pages/catalog/catalog.page.ts @@ -5,7 +5,7 @@ import TextBox from '../../elements/text-box'; import BasePage from '../base-page'; const SELECTORS = { - filterWithSelect: filterName => `#filter-${filterName.toLowerCase()}:has-text('${filterName}') >> ..`, + filterWithSelect: filterName => `#filter-${filterName.toLowerCase()}-label) >> ..`, filterWithInput: filterName => `label:text-is("${filterName}") >> ..`, searchBar: `[placeholder="Search"]`, cleanSearchBarButton: `[data-qa="search_string"] >> .. >> button path[fill-rule="evenodd"]`,