@thinkwise/testwise 0.1.75 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Testwise.ts +13 -4
- package/components/BaseComponentObjects.ts +1 -1
- package/components/actionbar/Actionbar.ts +45 -38
- package/components/actionbar/ActionbarObjects.ts +53 -17
- package/components/actionbar/CustomActionBar.ts +10 -0
- package/components/cardlist/Cardlist.ts +14 -0
- package/components/cardlist/CardlistObjects.ts +5 -0
- package/components/chart/Chart.ts +14 -0
- package/components/chart/ChartObjects.ts +5 -0
- package/components/combined-filter/CombinedFIlterObjects.ts +5 -0
- package/components/combined-filter/CombinedFilter.ts +14 -0
- package/components/cube-view-bar/CubeViewBar.ts +14 -0
- package/components/cube-view-bar/CubeViewBarObjects.ts +5 -0
- package/components/filter/FilterForm.ts +11 -8
- package/components/filter/FilterFormObjects.ts +5 -0
- package/components/filter/FindForm.ts +2 -10
- package/components/grid/Grid.ts +4 -2
- package/components/grid/GridObjects.ts +1 -1
- package/components/index.ts +21 -2
- package/components/maps/Maps.ts +14 -0
- package/components/maps/MapsObjects.ts +5 -0
- package/components/menu/ListBarMenuComponent.ts +37 -0
- package/components/menu/ListBarMenuComponentObjects.ts +14 -0
- package/components/pivot-grid/PivotGrid.ts +14 -0
- package/components/pivot-grid/PivotGridFieldList.ts +14 -0
- package/components/pivot-grid/PivotGridFieldListObjects.ts +5 -0
- package/components/pivot-grid/PivotGridObjects.ts +5 -0
- package/components/pop-up/PopUpComponent.ts +7 -5
- package/components/pop-up/PopUpComponentObjects.ts +4 -5
- package/components/prefilter-list/PrefilterList.ts +14 -0
- package/components/prefilter-list/PrefilterListObjects.ts +5 -0
- package/components/preview/Preview.ts +14 -0
- package/components/preview/PreviewObjects.ts +5 -0
- package/components/report-bar/ReportBar.ts +14 -0
- package/components/report-bar/ReportBarObjects.ts +5 -0
- package/components/report-tiles/ReportTiles.ts +14 -0
- package/components/report-tiles/ReportTilesObjects.ts +5 -0
- package/components/scheduler/Scheduler.ts +14 -0
- package/components/scheduler/SchedulerObjects.ts +5 -0
- package/components/snackbar/SnackBar.ts +29 -0
- package/components/snackbar/SnackBarObjects.ts +14 -0
- package/components/splitter/Splitter.ts +11 -0
- package/components/splitter/SplitterObjects.ts +5 -0
- package/components/tab/ComponentTab.ts +5 -0
- package/components/tab/ComponentTabObjects.ts +3 -0
- package/components/tab/DetailTab.ts +1 -1
- package/components/tab/DetailTabObjects.ts +2 -1
- package/components/tab/Tab.ts +14 -0
- package/components/tab/TabObjects.ts +5 -0
- package/components/task/TaskTiles.ts +28 -0
- package/components/task/TaskTilesObjects.ts +24 -0
- package/components/topbar/TopBar.ts +14 -0
- package/components/topbar/TopBarObjects.ts +12 -0
- package/components/tree-view/TreeView.ts +14 -0
- package/components/tree-view/TreeViewObjects.ts +5 -0
- package/dist/Testwise.d.ts +2 -1
- package/dist/Testwise.js +14 -5
- package/dist/Testwise.js.map +1 -1
- package/dist/bdd.d.ts +6 -0
- package/dist/bdd.js +9 -0
- package/dist/bdd.js.map +1 -0
- package/dist/biome.json +1 -1
- package/dist/components/BaseComponentObjects.d.ts +1 -1
- package/dist/components/actionbar/Actionbar.d.ts +31 -26
- package/dist/components/actionbar/Actionbar.js +34 -26
- package/dist/components/actionbar/Actionbar.js.map +1 -1
- package/dist/components/actionbar/ActionbarObjects.d.ts +23 -11
- package/dist/components/actionbar/ActionbarObjects.js +30 -11
- package/dist/components/actionbar/ActionbarObjects.js.map +1 -1
- package/dist/components/actionbar/CustomActionBar.d.ts +5 -0
- package/dist/components/actionbar/CustomActionBar.js +7 -0
- package/dist/components/actionbar/CustomActionBar.js.map +1 -0
- package/dist/components/cardlist/Cardlist.d.ts +7 -0
- package/dist/components/cardlist/Cardlist.js +10 -0
- package/dist/components/cardlist/Cardlist.js.map +1 -0
- package/dist/components/cardlist/CardlistObjects.d.ts +3 -0
- package/dist/components/cardlist/CardlistObjects.js +4 -0
- package/dist/components/cardlist/CardlistObjects.js.map +1 -0
- package/dist/components/chart/Chart.d.ts +7 -0
- package/dist/components/chart/Chart.js +10 -0
- package/dist/components/chart/Chart.js.map +1 -0
- package/dist/components/chart/ChartObjects.d.ts +3 -0
- package/dist/components/chart/ChartObjects.js +4 -0
- package/dist/components/chart/ChartObjects.js.map +1 -0
- package/dist/components/combined-filter/CombinedFIlterObjects.d.ts +3 -0
- package/dist/components/combined-filter/CombinedFIlterObjects.js +4 -0
- package/dist/components/combined-filter/CombinedFIlterObjects.js.map +1 -0
- package/dist/components/combined-filter/CombinedFilter.d.ts +7 -0
- package/dist/components/combined-filter/CombinedFilter.js +10 -0
- package/dist/components/combined-filter/CombinedFilter.js.map +1 -0
- package/dist/components/cube-view-bar/CubeViewBar.d.ts +7 -0
- package/dist/components/cube-view-bar/CubeViewBar.js +10 -0
- package/dist/components/cube-view-bar/CubeViewBar.js.map +1 -0
- package/dist/components/cube-view-bar/CubeViewBarObjects.d.ts +3 -0
- package/dist/components/cube-view-bar/CubeViewBarObjects.js +4 -0
- package/dist/components/cube-view-bar/CubeViewBarObjects.js.map +1 -0
- package/dist/components/filter/FilterForm.d.ts +6 -4
- package/dist/components/filter/FilterForm.js +7 -7
- package/dist/components/filter/FilterForm.js.map +1 -1
- package/dist/components/filter/FilterFormObjects.d.ts +3 -0
- package/dist/components/filter/FilterFormObjects.js +4 -0
- package/dist/components/filter/FilterFormObjects.js.map +1 -0
- package/dist/components/filter/FindForm.d.ts +1 -4
- package/dist/components/filter/FindForm.js +1 -8
- package/dist/components/filter/FindForm.js.map +1 -1
- package/dist/components/grid/Grid.js +4 -1
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/GridObjects.js +1 -1
- package/dist/components/grid/GridObjects.js.map +1 -1
- package/dist/components/index.d.ts +21 -2
- package/dist/components/index.js +21 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/maps/Maps.d.ts +7 -0
- package/dist/components/maps/Maps.js +10 -0
- package/dist/components/maps/Maps.js.map +1 -0
- package/dist/components/maps/MapsObjects.d.ts +3 -0
- package/dist/components/maps/MapsObjects.js +4 -0
- package/dist/components/maps/MapsObjects.js.map +1 -0
- package/dist/components/menu/ListBarMenuComponent.d.ts +10 -0
- package/dist/components/menu/ListBarMenuComponent.js +29 -0
- package/dist/components/menu/ListBarMenuComponent.js.map +1 -0
- package/dist/components/menu/ListBarMenuComponentObjects.d.ts +7 -0
- package/dist/components/menu/ListBarMenuComponentObjects.js +8 -0
- package/dist/components/menu/ListBarMenuComponentObjects.js.map +1 -0
- package/dist/components/pivot-grid/PivotGrid.d.ts +7 -0
- package/dist/components/pivot-grid/PivotGrid.js +10 -0
- package/dist/components/pivot-grid/PivotGrid.js.map +1 -0
- package/dist/components/pivot-grid/PivotGridFieldList.d.ts +7 -0
- package/dist/components/pivot-grid/PivotGridFieldList.js +10 -0
- package/dist/components/pivot-grid/PivotGridFieldList.js.map +1 -0
- package/dist/components/pivot-grid/PivotGridFieldListObjects.d.ts +3 -0
- package/dist/components/pivot-grid/PivotGridFieldListObjects.js +4 -0
- package/dist/components/pivot-grid/PivotGridFieldListObjects.js.map +1 -0
- package/dist/components/pivot-grid/PivotGridObjects.d.ts +3 -0
- package/dist/components/pivot-grid/PivotGridObjects.js +4 -0
- package/dist/components/pivot-grid/PivotGridObjects.js.map +1 -0
- package/dist/components/pop-up/PopUpComponent.d.ts +5 -5
- package/dist/components/pop-up/PopUpComponent.js +6 -4
- package/dist/components/pop-up/PopUpComponent.js.map +1 -1
- package/dist/components/pop-up/PopUpComponentObjects.d.ts +3 -4
- package/dist/components/pop-up/PopUpComponentObjects.js +3 -4
- package/dist/components/pop-up/PopUpComponentObjects.js.map +1 -1
- package/dist/components/prefilter-list/PrefilterList.d.ts +7 -0
- package/dist/components/prefilter-list/PrefilterList.js +10 -0
- package/dist/components/prefilter-list/PrefilterList.js.map +1 -0
- package/dist/components/prefilter-list/PrefilterListObjects.d.ts +3 -0
- package/dist/components/prefilter-list/PrefilterListObjects.js +4 -0
- package/dist/components/prefilter-list/PrefilterListObjects.js.map +1 -0
- package/dist/components/preview/Preview.d.ts +7 -0
- package/dist/components/preview/Preview.js +10 -0
- package/dist/components/preview/Preview.js.map +1 -0
- package/dist/components/preview/PreviewObjects.d.ts +3 -0
- package/dist/components/preview/PreviewObjects.js +4 -0
- package/dist/components/preview/PreviewObjects.js.map +1 -0
- package/dist/components/report-bar/ReportBar.d.ts +7 -0
- package/dist/components/report-bar/ReportBar.js +10 -0
- package/dist/components/report-bar/ReportBar.js.map +1 -0
- package/dist/components/report-bar/ReportBarObjects.d.ts +3 -0
- package/dist/components/report-bar/ReportBarObjects.js +4 -0
- package/dist/components/report-bar/ReportBarObjects.js.map +1 -0
- package/dist/components/report-tiles/ReportTiles.d.ts +7 -0
- package/dist/components/report-tiles/ReportTiles.js +10 -0
- package/dist/components/report-tiles/ReportTiles.js.map +1 -0
- package/dist/components/report-tiles/ReportTilesObjects.d.ts +3 -0
- package/dist/components/report-tiles/ReportTilesObjects.js +4 -0
- package/dist/components/report-tiles/ReportTilesObjects.js.map +1 -0
- package/dist/components/scheduler/Scheduler.d.ts +7 -0
- package/dist/components/scheduler/Scheduler.js +10 -0
- package/dist/components/scheduler/Scheduler.js.map +1 -0
- package/dist/components/scheduler/SchedulerObjects.d.ts +3 -0
- package/dist/components/scheduler/SchedulerObjects.js +4 -0
- package/dist/components/scheduler/SchedulerObjects.js.map +1 -0
- package/dist/components/snackbar/SnackBar.d.ts +10 -0
- package/dist/components/snackbar/SnackBar.js +21 -0
- package/dist/components/snackbar/SnackBar.js.map +1 -0
- package/dist/components/snackbar/SnackBarObjects.d.ts +8 -0
- package/dist/components/snackbar/SnackBarObjects.js +10 -0
- package/dist/components/snackbar/SnackBarObjects.js.map +1 -0
- package/dist/components/splitter/Splitter.d.ts +6 -0
- package/dist/components/splitter/Splitter.js +8 -0
- package/dist/components/splitter/Splitter.js.map +1 -0
- package/dist/components/splitter/SplitterObjects.d.ts +3 -0
- package/dist/components/splitter/SplitterObjects.js +4 -0
- package/dist/components/splitter/SplitterObjects.js.map +1 -0
- package/dist/components/tab/ComponentTab.d.ts +1 -0
- package/dist/components/tab/ComponentTab.js +4 -0
- package/dist/components/tab/ComponentTab.js.map +1 -1
- package/dist/components/tab/ComponentTabObjects.d.ts +1 -0
- package/dist/components/tab/ComponentTabObjects.js +1 -0
- package/dist/components/tab/ComponentTabObjects.js.map +1 -1
- package/dist/components/tab/DetailTab.js +1 -1
- package/dist/components/tab/DetailTab.js.map +1 -1
- package/dist/components/tab/DetailTabObjects.d.ts +1 -0
- package/dist/components/tab/DetailTabObjects.js +1 -0
- package/dist/components/tab/DetailTabObjects.js.map +1 -1
- package/dist/components/tab/Tab.d.ts +7 -0
- package/dist/components/tab/Tab.js +10 -0
- package/dist/components/tab/Tab.js.map +1 -0
- package/dist/components/tab/TabObjects.d.ts +3 -0
- package/dist/components/tab/TabObjects.js +4 -0
- package/dist/components/tab/TabObjects.js.map +1 -0
- package/dist/components/task/{TaskTile.d.ts → TaskTiles.d.ts} +4 -4
- package/dist/components/task/TaskTiles.js +20 -0
- package/dist/components/task/TaskTiles.js.map +1 -0
- package/dist/components/task/{TaskTileObjects.d.ts → TaskTilesObjects.d.ts} +1 -1
- package/dist/components/task/TaskTilesObjects.js +18 -0
- package/dist/components/task/TaskTilesObjects.js.map +1 -0
- package/dist/components/topbar/TopBar.d.ts +7 -0
- package/dist/components/topbar/TopBar.js +9 -0
- package/dist/components/topbar/TopBar.js.map +1 -0
- package/dist/components/topbar/TopBarObjects.d.ts +7 -0
- package/dist/components/topbar/TopBarObjects.js +9 -0
- package/dist/components/topbar/TopBarObjects.js.map +1 -0
- package/dist/components/tree-view/TreeView.d.ts +7 -0
- package/dist/components/tree-view/TreeView.js +10 -0
- package/dist/components/tree-view/TreeView.js.map +1 -0
- package/dist/components/tree-view/TreeViewObjects.d.ts +3 -0
- package/dist/components/tree-view/TreeViewObjects.js +4 -0
- package/dist/components/tree-view/TreeViewObjects.js.map +1 -0
- package/dist/helpers/TestExtensions.d.ts +8 -0
- package/dist/helpers/TestExtensions.js +21 -0
- package/dist/helpers/TestExtensions.js.map +1 -0
- package/dist/interfaces/IComponentObjects.js.map +1 -0
- package/dist/interfaces/IStoredTestResults.d.ts +5 -0
- package/dist/interfaces/IStoredTestResults.js +2 -0
- package/dist/interfaces/IStoredTestResults.js.map +1 -0
- package/dist/package-lock.json +411 -615
- package/dist/package.json +3 -2
- package/dist/page-extensions/GlobalComponents.d.ts +5 -2
- package/dist/page-extensions/GlobalComponents.js +4 -1
- package/dist/page-extensions/GlobalComponents.js.map +1 -1
- package/dist/page-extensions/GoToDeepLink.d.ts +1 -1
- package/dist/page-extensions/LoginFeatures.d.ts +1 -1
- package/dist/page-extensions/UserSimulation.d.ts +1 -1
- package/dist/page-extensions/WaitEventHandler.d.ts +1 -1
- package/dist/page-overrides/ClickOverride.d.ts +1 -1
- package/dist/page-overrides/FillOverride.d.ts +1 -1
- package/dist/page-overrides/FillOverride.js +7 -6
- package/dist/page-overrides/FillOverride.js.map +1 -1
- package/dist/services/ReportingService.js.map +1 -1
- package/dist/types/Test.js +2 -0
- package/dist/types/Test.js.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/interfaces/IStoredTestResults.ts +6 -0
- package/package.json +3 -2
- package/page-extensions/GlobalComponents.ts +14 -2
- package/page-extensions/GoToDeepLink.ts +1 -1
- package/page-extensions/LoginFeatures.ts +1 -1
- package/page-extensions/UserSimulation.ts +1 -1
- package/page-extensions/WaitEventHandler.ts +1 -1
- package/page-overrides/ClickOverride.ts +1 -1
- package/page-overrides/FillOverride.ts +10 -7
- package/promptCredentials.js +124 -124
- package/scripts/setup.js +34 -34
- package/services/ReportingService.ts +2 -6
- package/types/index.ts +1 -1
- package/components/BaseComponent.ts +0 -95
- package/components/Splitter.ts +0 -11
- package/components/TSFComponent.ts +0 -8
- package/components/task/TaskTile.ts +0 -28
- package/components/task/TaskTileObjects.ts +0 -20
- package/dist/components/BaseComponent.d.ts +0 -29
- package/dist/components/BaseComponent.js +0 -67
- package/dist/components/BaseComponent.js.map +0 -1
- package/dist/components/IComponentObjects.js.map +0 -1
- package/dist/components/Splitter.d.ts +0 -5
- package/dist/components/Splitter.js +0 -10
- package/dist/components/Splitter.js.map +0 -1
- package/dist/components/TSFComponent.d.ts +0 -6
- package/dist/components/TSFComponent.js +0 -2
- package/dist/components/TSFComponent.js.map +0 -1
- package/dist/components/task/TaskTile.js +0 -20
- package/dist/components/task/TaskTile.js.map +0 -1
- package/dist/components/task/TaskTileObjects.js +0 -15
- package/dist/components/task/TaskTileObjects.js.map +0 -1
- package/dist/seed-data/screen-schemas/chart.json +0 -25
- package/dist/seed-data/screen-schemas/chart_horizontal.json +0 -25
- package/dist/seed-data/screen-schemas/chart_no_fields.json +0 -14
- package/dist/seed-data/screen-schemas/cube.json +0 -40
- package/dist/seed-data/screen-schemas/cube_horizontal.json +0 -40
- package/dist/seed-data/screen-schemas/cube_no_fields.json +0 -25
- package/dist/seed-data/screen-schemas/form_only.json +0 -20
- package/dist/seed-data/screen-schemas/form_with_tree.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_card_list.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_filter_form.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_map.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_prefilter_bar.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_report_bar.json +0 -20
- package/dist/seed-data/screen-schemas/grid_with_report_tiles.json +0 -20
- package/dist/seed-data/screen-schemas/hierarchy.json +0 -43
- package/dist/seed-data/screen-schemas/hierarchy_card_list.json +0 -39
- package/dist/seed-data/screen-schemas/hierarchy_no_filter.json +0 -38
- package/dist/seed-data/screen-schemas/look_up_popup.json +0 -48
- package/dist/seed-data/screen-schemas/master_detail.json +0 -39
- package/dist/seed-data/screen-schemas/master_detail_no_filter.json +0 -34
- package/dist/seed-data/screen-schemas/master_detail_vertical.json +0 -39
- package/dist/seed-data/screen-schemas/master_detail_with_preview.json +0 -25
- package/dist/seed-data/screen-schemas/master_detail_with_task_bar.json +0 -48
- package/dist/seed-data/screen-schemas/master_detail_with_task_tiles.json +0 -44
- package/dist/seed-data/screen-schemas/master_vertical_detail.json +0 -39
- package/dist/seed-data/screen-schemas/pivot_grid.json +0 -25
- package/dist/seed-data/screen-schemas/pivot_grid_horizontal.json +0 -25
- package/dist/seed-data/screen-schemas/pivot_grid_no_fields.json +0 -14
- package/dist/seed-data/screen-schemas/scheduler.json +0 -14
- package/dist/seed-data/screen-schemas/test.json +0 -30
- package/dist/seed-data/screen-schemas/testpoonam.json +0 -40
- package/dist/seed-data/screen-schemas/view_customer_cube.json +0 -36
- package/dist/seed-data/subjects.json +0 -1586
- package/dist/types/CoreTypes.js +0 -2
- package/dist/types/CoreTypes.js.map +0 -1
- /package/dist/{components → interfaces}/IComponentObjects.d.ts +0 -0
- /package/dist/{components → interfaces}/IComponentObjects.js +0 -0
- /package/dist/types/{CoreTypes.d.ts → Test.d.ts} +0 -0
- /package/{components → interfaces}/IComponentObjects.ts +0 -0
- /package/types/{CoreTypes.ts → Test.ts} +0 -0
package/Testwise.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { test as base } from '@playwright/test';
|
|
2
|
+
import { test as bddBase } from 'playwright-bdd';
|
|
2
3
|
import { Components, GoToDeepLink, LoginFeatures, UserSimulation } from './page-extensions/index.js';
|
|
3
4
|
import { WaitEventHandler } from './page-extensions/WaitEventHandler.js';
|
|
4
5
|
import { ClickOverride } from './page-overrides/ClickOverride.js';
|
|
5
6
|
import { FillOverride } from './page-overrides/FillOverride.js';
|
|
6
|
-
import type { Test } from './types/
|
|
7
|
+
import type { Test } from './types/Test.js';
|
|
7
8
|
|
|
8
9
|
function combineExtensions(baseTest: Test, ...extensions: { new (test: Test): { test: Test } }[]) {
|
|
9
10
|
return extensions.reduce((test, Extension) => new Extension(test).test, baseTest);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
base,
|
|
14
|
-
|
|
13
|
+
const extensions = [
|
|
15
14
|
// Override section
|
|
16
15
|
ClickOverride,
|
|
17
16
|
FillOverride,
|
|
@@ -22,4 +21,14 @@ export const test: Test = combineExtensions(
|
|
|
22
21
|
LoginFeatures,
|
|
23
22
|
UserSimulation,
|
|
24
23
|
WaitEventHandler
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export const test: Test = combineExtensions(
|
|
27
|
+
base,
|
|
28
|
+
...extensions
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export const bddTest: Test = combineExtensions(
|
|
32
|
+
bddBase,
|
|
33
|
+
...extensions
|
|
25
34
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Locator, Page } from '@playwright/test';
|
|
2
|
-
import type { IComponentObjects } from '
|
|
2
|
+
import type { IComponentObjects } from '../interfaces/IComponentObjects.js';
|
|
3
3
|
|
|
4
4
|
export abstract class BaseComponentObjects implements IComponentObjects {
|
|
5
5
|
context: Locator;
|
|
@@ -8,39 +8,43 @@ class ActionbarActions {
|
|
|
8
8
|
this._objects = new ActionbarOverflowableObjects(page, context);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
public
|
|
11
|
+
public getSearchInput = (): Locator => this._objects.searchInput();
|
|
12
12
|
|
|
13
|
-
public
|
|
13
|
+
public getPrefilterButton = (): Locator => this._objects.prefilterButton();
|
|
14
14
|
|
|
15
|
-
public
|
|
15
|
+
public getPrefilterButtonById = (id: string): Locator => this._objects.prefilterButtonById(id);
|
|
16
16
|
|
|
17
|
-
public
|
|
17
|
+
public getFilterButton = (): Locator => this._objects.filterButton();
|
|
18
18
|
|
|
19
|
-
public
|
|
19
|
+
public getAddButton = (): Locator => this._objects.addButton();
|
|
20
20
|
|
|
21
|
-
public
|
|
21
|
+
public getCopyButton = (): Locator => this._objects.copyButton();
|
|
22
22
|
|
|
23
23
|
public getUpdateButton = (): Locator => this._objects.updateButton();
|
|
24
24
|
|
|
25
|
-
public
|
|
25
|
+
public getDeleteButton = (): Locator => this._objects.deleteButton();
|
|
26
26
|
|
|
27
|
-
public
|
|
27
|
+
public getSaveButton = (): Locator => this._objects.saveButton();
|
|
28
28
|
|
|
29
|
-
public
|
|
29
|
+
public getCancelButton = (): Locator => this._objects.cancelButton();
|
|
30
30
|
|
|
31
|
-
public
|
|
31
|
+
public getRefreshButton = (): Locator => this._objects.refreshButton();
|
|
32
32
|
|
|
33
33
|
public getQuickFilterButton = (): Locator => this._objects.quickFilterButton();
|
|
34
34
|
|
|
35
|
-
public getFilterButton = (): Locator => this._objects.filterButton();
|
|
36
|
-
|
|
37
35
|
public getClearAllFiltersButton = (): Locator => this._objects.clearAllFiltersButton();
|
|
38
36
|
|
|
37
|
+
public getSortButton = (): Locator => this._objects.sortButton();
|
|
38
|
+
|
|
39
39
|
public getRestoreSortOrderButton = (): Locator => this._objects.restoreSortOrderButton();
|
|
40
40
|
|
|
41
|
-
public
|
|
41
|
+
public getImportButton = (): Locator => this._objects.importButton();
|
|
42
42
|
|
|
43
|
-
public
|
|
43
|
+
public getExportButton = (): Locator => this._objects.exportButton();
|
|
44
|
+
|
|
45
|
+
public getExportImmediatelyButton = (): Locator => this._objects.exportImmediatelyButton();
|
|
46
|
+
|
|
47
|
+
public getMassUpdateButton = (): Locator => this._objects.massUpdateButton();
|
|
44
48
|
|
|
45
49
|
public getUpScreenTypeButton = (): Locator => this._objects.upScreenTypeButton();
|
|
46
50
|
|
|
@@ -56,13 +60,30 @@ class ActionbarActions {
|
|
|
56
60
|
|
|
57
61
|
public getCubeChartSettingsButton = (): Locator => this._objects.cubeChartSettingsButton();
|
|
58
62
|
|
|
59
|
-
public
|
|
63
|
+
public getExportPivotButton = (): Locator => this._objects.exportPivotButton();
|
|
60
64
|
|
|
61
65
|
public getDeleteCubeViewButton = (): Locator => this._objects.deleteCubeViewButton();
|
|
62
66
|
|
|
67
|
+
public getSaveAsCubeViewButton = (): Locator => this._objects.saveAsCubeViewButton();
|
|
68
|
+
|
|
63
69
|
public getCollapseAllButton = (): Locator => this._objects.collapseAllButton();
|
|
64
70
|
|
|
65
71
|
public getExpandAllButton = (): Locator => this._objects.expandAllButton();
|
|
72
|
+
|
|
73
|
+
// Tasks
|
|
74
|
+
public getTaskButtons = (): Locator => this._objects.taskButtons();
|
|
75
|
+
public getTaskButtonById = (id: string): Locator => this._objects.taskButtonById(id);
|
|
76
|
+
public getTaskButtonByLabel = (label: string): Locator => this._objects.taskButtonByLabel(label);
|
|
77
|
+
|
|
78
|
+
// Reports
|
|
79
|
+
public getReportButtons = (): Locator => this._objects.reportButtons();
|
|
80
|
+
public getReportButtonById = (id: string): Locator => this._objects.reportButtonById(id);
|
|
81
|
+
public getReportButtonByLabel = (label: string): Locator => this._objects.reportButtonByLabel(label);
|
|
82
|
+
|
|
83
|
+
// Cube Views
|
|
84
|
+
public getCubeViewButtons = (): Locator => this._objects.cubeViewButtons();
|
|
85
|
+
public getCubeViewButtonById = (id: string): Locator => this._objects.cubeViewButtonById(id);
|
|
86
|
+
public getCubeViewButtonByLabel = (label: string): Locator => this._objects.cubeViewButtonByLabel(label);
|
|
66
87
|
}
|
|
67
88
|
|
|
68
89
|
export class Actionbar extends ActionbarActions {
|
|
@@ -80,40 +101,24 @@ export class Actionbar extends ActionbarActions {
|
|
|
80
101
|
};
|
|
81
102
|
|
|
82
103
|
overflowMenu = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
getCancelButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getCancelButton()),
|
|
104
|
+
getFilterButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getFilterButton()),
|
|
86
105
|
|
|
87
|
-
|
|
106
|
+
getQuickFilterButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getQuickFilterButton()),
|
|
88
107
|
|
|
89
|
-
|
|
108
|
+
getClearAllFiltersButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getClearAllFiltersButton()),
|
|
90
109
|
|
|
91
|
-
|
|
110
|
+
getSortButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getSortButton()),
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
getRestoreSortOrderButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getRestoreSortOrderButton()),
|
|
94
113
|
|
|
95
|
-
|
|
114
|
+
getImportButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getImportButton()),
|
|
96
115
|
|
|
97
116
|
getExportButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getExportButton()),
|
|
98
117
|
|
|
99
|
-
getImportButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getImportButton()),
|
|
100
|
-
|
|
101
118
|
getExportImmediatelyButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getExportImmediatelyButton()),
|
|
102
119
|
|
|
103
120
|
getMassUpdateButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getMassUpdateButton()),
|
|
104
121
|
|
|
105
|
-
getQuickFilterButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getQuickFilterButton()),
|
|
106
|
-
|
|
107
|
-
getFilterButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getFilterButton()),
|
|
108
|
-
|
|
109
|
-
getClearAllFiltersButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getClearAllFiltersButton()),
|
|
110
|
-
|
|
111
|
-
getRestoreSortOrderButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getRestoreSortOrderButton()),
|
|
112
|
-
|
|
113
|
-
getSortButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getSortButton()),
|
|
114
|
-
|
|
115
|
-
getSearchInput: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getSearchInput()),
|
|
116
|
-
|
|
117
122
|
getUpScreenTypeButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getUpScreenTypeButton()),
|
|
118
123
|
|
|
119
124
|
getUpDetailSettingsButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getUpDetailSettingsButton()),
|
|
@@ -129,10 +134,12 @@ export class Actionbar extends ActionbarActions {
|
|
|
129
134
|
|
|
130
135
|
getCubeChartSettingsButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getCubeChartSettingsButton()),
|
|
131
136
|
|
|
132
|
-
|
|
137
|
+
getExportPivotButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getExportPivotButton()),
|
|
133
138
|
|
|
134
139
|
getDeleteCubeViewButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getDeleteCubeViewButton()),
|
|
135
140
|
|
|
141
|
+
getSaveAsCubeViewButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getSaveAsCubeViewButton()),
|
|
142
|
+
|
|
136
143
|
getCollapseAllButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getCollapseAllButton()),
|
|
137
144
|
|
|
138
145
|
getExpandAllButton: () => wrapWithOverflowOpen(this, () => this._overflowMenu.getExpandAllButton())
|
|
@@ -6,39 +6,44 @@ export class ActionbarOverflowableObjects extends BaseComponentObjects {
|
|
|
6
6
|
super(page, context);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
public cancelButton = () => this.context.getByTestId('actionbar__cancel');
|
|
9
|
+
// Actionbar-near
|
|
10
|
+
public searchInput = () => this.context.getByTestId('actionbar__search__input').locator('input');
|
|
12
11
|
|
|
13
|
-
public
|
|
12
|
+
public prefilterButton = () =>
|
|
13
|
+
this.context.locator('[data-testid^="prefilter-actionbar-group-"][data-testid$="-prefilter"]');
|
|
14
14
|
|
|
15
|
-
public
|
|
15
|
+
public filterButton = () => this.context.getByTestId('actionbar__filter');
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// Actionbar-far (overflowable)
|
|
18
|
+
public addButton = () => this.context.getByTestId('actionbar__add');
|
|
18
19
|
|
|
19
|
-
public
|
|
20
|
+
public copyButton = () => this.context.getByTestId('actionbar__copy');
|
|
20
21
|
|
|
21
22
|
public updateButton = () => this.context.getByTestId('actionbar__update');
|
|
22
23
|
|
|
23
|
-
public
|
|
24
|
-
|
|
25
|
-
public exportButton = () => this.context.getByTestId('actionbar__export');
|
|
24
|
+
public deleteButton = () => this.context.getByTestId('actionbar__delete');
|
|
26
25
|
|
|
27
|
-
public
|
|
26
|
+
public saveButton = () => this.context.getByTestId('actionbar__save');
|
|
28
27
|
|
|
29
|
-
public
|
|
28
|
+
public cancelButton = () => this.context.getByTestId('actionbar__cancel');
|
|
30
29
|
|
|
31
|
-
public
|
|
30
|
+
public refreshButton = () => this.context.getByTestId('actionbar__refresh');
|
|
32
31
|
|
|
33
32
|
public quickFilterButton = () => this.context.getByTestId('actionbar__quick-filter');
|
|
34
33
|
|
|
35
|
-
public filterButton = () => this.context.getByTestId('actionbar__filter');
|
|
36
|
-
|
|
37
34
|
public clearAllFiltersButton = () => this.context.getByTestId('actionbar__clear-filters');
|
|
38
35
|
|
|
36
|
+
public sortButton = () => this.context.getByTestId('actionbar__sort');
|
|
37
|
+
|
|
39
38
|
public restoreSortOrderButton = () => this.context.getByTestId('actionbar__restore-sort-order');
|
|
40
39
|
|
|
41
|
-
public
|
|
40
|
+
public importButton = () => this.context.getByTestId('actionbar__import');
|
|
41
|
+
|
|
42
|
+
public exportButton = () => this.context.getByTestId('actionbar__export');
|
|
43
|
+
|
|
44
|
+
public exportImmediatelyButton = () => this.context.getByTestId('actionbar__export-immediately');
|
|
45
|
+
|
|
46
|
+
public massUpdateButton = () => this.context.getByTestId('actionbar__mass-update');
|
|
42
47
|
|
|
43
48
|
public upScreenTypeButton = () => this.context.getByTestId('actionbar__up-screen-type');
|
|
44
49
|
|
|
@@ -54,13 +59,44 @@ export class ActionbarOverflowableObjects extends BaseComponentObjects {
|
|
|
54
59
|
|
|
55
60
|
public cubeChartSettingsButton = () => this.context.getByTestId('actionbar__chart-settings');
|
|
56
61
|
|
|
57
|
-
public
|
|
62
|
+
public exportPivotButton = () => this.context.getByTestId('actionbar__export-pivot');
|
|
58
63
|
|
|
59
64
|
public deleteCubeViewButton = () => this.context.getByTestId('actionbar__delete-cube-view');
|
|
60
65
|
|
|
66
|
+
public saveAsCubeViewButton = () => this.context.getByTestId('actionbar__save-as-cube-view');
|
|
67
|
+
|
|
61
68
|
public collapseAllButton = () => this.context.getByTestId('actionbar__collapse-all');
|
|
62
69
|
|
|
63
70
|
public expandAllButton = () => this.context.getByTestId('actionbar__expand-all');
|
|
71
|
+
|
|
72
|
+
// Generic, prefix-based items: Tasks, Reports, Cube views, Prefilter buttons
|
|
73
|
+
// Tasks: data-testid like: "actionbar__task__<something>"
|
|
74
|
+
public taskButtons = () => this.context.locator('[data-testid^="actionbar__task__"]');
|
|
75
|
+
|
|
76
|
+
public taskButtonById = (id: string) => this.context.getByTestId(`actionbar__task__${id}`);
|
|
77
|
+
|
|
78
|
+
public taskButtonByLabel = (label: string) =>
|
|
79
|
+
this.context.locator('[data-testid^="actionbar__task__"]').filter({ hasText: label });
|
|
80
|
+
|
|
81
|
+
// Reports: data-testid like "actionbar__report__<something>"
|
|
82
|
+
public reportButtons = () => this.context.locator('[data-testid^="actionbar__report__"]');
|
|
83
|
+
|
|
84
|
+
public reportButtonById = (id: string) => this.context.getByTestId(`actionbar__report__${id}`);
|
|
85
|
+
|
|
86
|
+
public reportButtonByLabel = (label: string) =>
|
|
87
|
+
this.context.locator('[data-testid^="actionbar__report__"]').filter({ hasText: label });
|
|
88
|
+
|
|
89
|
+
// Cube views : data-testid like: "actionbar__cubeview__<something>"
|
|
90
|
+
public cubeViewButtons = () => this.context.locator('[data-testid^="actionbar__cubeview__"]');
|
|
91
|
+
|
|
92
|
+
public cubeViewButtonById = (id: string) => this.context.getByTestId(`actionbar__cubeview__${id}`);
|
|
93
|
+
|
|
94
|
+
public cubeViewButtonByLabel = (label: string) =>
|
|
95
|
+
this.context.locator('[data-testid^="actionbar__cubeview__"]').filter({ hasText: label });
|
|
96
|
+
|
|
97
|
+
// Prefilter buttons: data-testid like: "prefilter-actionbar-group-other__<something>"
|
|
98
|
+
public prefilterButtonById = (id: string) =>
|
|
99
|
+
this.context.getByTestId(new RegExp(`^prefilter-actionbar-group-${id}$`));
|
|
64
100
|
}
|
|
65
101
|
|
|
66
102
|
export class ActionbarObjects extends ActionbarOverflowableObjects {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { Actionbar } from './Actionbar.js';
|
|
3
|
+
|
|
4
|
+
export class CustomActionBar extends Actionbar {
|
|
5
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
6
|
+
super(page, context);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// What should this do differently?
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { CardlistObjects } from './CardlistObjects.js';
|
|
3
|
+
|
|
4
|
+
export class Cardlist {
|
|
5
|
+
cardlistObjects: CardlistObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.cardlistObjects = new CardlistObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.cardlistObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { ChartObjects } from './ChartObjects.js';
|
|
3
|
+
|
|
4
|
+
export class Chart {
|
|
5
|
+
chartObjects: ChartObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.chartObjects = new ChartObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.chartObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { CombinedFilterObjects } from './CombinedFIlterObjects.js';
|
|
3
|
+
|
|
4
|
+
export class CombinedFilter {
|
|
5
|
+
combinedFilterObjects: CombinedFilterObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.combinedFilterObjects = new CombinedFilterObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.combinedFilterObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { CubeViewBarObjects } from './CubeViewBarObjects.js';
|
|
3
|
+
|
|
4
|
+
export class CubeViewBar {
|
|
5
|
+
cubeViewBarObjects: CubeViewBarObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.cubeViewBarObjects = new CubeViewBarObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.cubeViewBarObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { Locator } from '@playwright/test';
|
|
2
|
-
import {
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { FilterFormObjects } from './FilterFormObjects.js';
|
|
3
3
|
|
|
4
|
-
export class FilterForm
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export class FilterForm {
|
|
5
|
+
filterFormObjects: FilterFormObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.filterFormObjects = new FilterFormObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.filterFormObjects.context;
|
|
10
13
|
}
|
|
11
14
|
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export class FindForm extends BaseComponent {
|
|
5
|
-
public async getLocator(context?: Locator): Promise<Locator> {
|
|
6
|
-
if (context) {
|
|
7
|
-
return context.getByTestId(this.id);
|
|
8
|
-
}
|
|
9
|
-
return this.page.getByTestId(this.id);
|
|
10
|
-
}
|
|
1
|
+
export class FindForm {
|
|
2
|
+
// do stuff
|
|
11
3
|
}
|
package/components/grid/Grid.ts
CHANGED
|
@@ -53,8 +53,10 @@ export class Grid {
|
|
|
53
53
|
* @param columnName - The name of the column for which to open the filter popup.
|
|
54
54
|
* @returns A promise that resolves when the filter popup is opened.
|
|
55
55
|
*/
|
|
56
|
-
public openExcelStyleFilterPopup = async (columnName: string) =>
|
|
57
|
-
|
|
56
|
+
public openExcelStyleFilterPopup = async (columnName: string) => {
|
|
57
|
+
const filterIcon = this._gridObjects.menuIconByColumnHeaderName(columnName);
|
|
58
|
+
await filterIcon.click({ force: true });
|
|
59
|
+
};
|
|
58
60
|
|
|
59
61
|
/**
|
|
60
62
|
* Retrieves all rows in the grid that match a specific column value.
|
|
@@ -16,7 +16,7 @@ export class GridObjects extends BaseComponentObjects {
|
|
|
16
16
|
public columnHeaderByName = (columnName: string) => this.context.getByRole('columnheader', { name: columnName });
|
|
17
17
|
|
|
18
18
|
public menuIconByColumnHeaderName = (columnName: string) =>
|
|
19
|
-
this.columnHeaderByName(columnName).getByTestId('
|
|
19
|
+
this.columnHeaderByName(columnName).getByTestId('grid__custom__filter__icon');
|
|
20
20
|
|
|
21
21
|
public rowByIndex = (row: number) => this.context.locator(`[role="row"][row-index="${row}"]`);
|
|
22
22
|
|
package/components/index.ts
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
export * from './actionbar/Actionbar.js';
|
|
2
|
+
export * from './actionbar/CustomActionBar.js';
|
|
3
|
+
export * from './cardlist/Cardlist.js';
|
|
4
|
+
export * from './chart/Chart.js';
|
|
5
|
+
export * from './combined-filter/CombinedFilter.js';
|
|
6
|
+
export * from './cube-view-bar/CubeViewBar.js';
|
|
2
7
|
export * from './export/ExportComponent.js';
|
|
8
|
+
export * from './filter/FilterForm.js';
|
|
3
9
|
export * from './form/Form.js';
|
|
4
10
|
export * from './grid/Grid.js';
|
|
11
|
+
export * from './maps/Maps.js';
|
|
12
|
+
export * from './menu/ListBarMenuComponent.js';
|
|
13
|
+
export * from './pivot-grid/PivotGrid.js';
|
|
14
|
+
export * from './pivot-grid/PivotGridFieldList.js';
|
|
5
15
|
export * from './pop-up/PopUpComponent.js';
|
|
6
|
-
export * from './
|
|
16
|
+
export * from './prefilter-list/PrefilterList.js';
|
|
17
|
+
export * from './preview/Preview.js';
|
|
18
|
+
export * from './report-bar/ReportBar.js';
|
|
19
|
+
export * from './report-tiles/ReportTiles.js';
|
|
20
|
+
export * from './scheduler/Scheduler.js';
|
|
21
|
+
export * from './snackbar/SnackBar.js';
|
|
22
|
+
export * from './splitter/Splitter.js';
|
|
7
23
|
export * from './tab/ComponentTab.js';
|
|
8
24
|
export * from './tab/DetailTab.js';
|
|
25
|
+
export * from './tab/Tab.js';
|
|
9
26
|
export * from './task/TaskBar.js';
|
|
10
|
-
export * from './task/
|
|
27
|
+
export * from './task/TaskTiles.js';
|
|
28
|
+
export * from './topbar/TopBar.js';
|
|
29
|
+
export * from './tree-view/TreeView.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { MapsObjects } from './MapsObjects.js';
|
|
3
|
+
|
|
4
|
+
export class Maps {
|
|
5
|
+
mapsObjects: MapsObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.mapsObjects = new MapsObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.mapsObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { ListBarMenuComponentObjects } from './ListBarMenuComponentObjects.js';
|
|
3
|
+
|
|
4
|
+
export class ListBarMenuComponent {
|
|
5
|
+
private _objects: ListBarMenuComponentObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page) {
|
|
8
|
+
this._objects = new ListBarMenuComponentObjects(page);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
private async ensureGroupIsExpanded(groupName: string) {
|
|
12
|
+
const menuGroup = this._objects.menuGroup(groupName);
|
|
13
|
+
const classAttribute = await menuGroup.getAttribute('class');
|
|
14
|
+
const isOpened = classAttribute?.includes('opened');
|
|
15
|
+
if (!isOpened) {
|
|
16
|
+
await menuGroup.click();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async openListBarMenuItem(groupName: string, itemName: string) {
|
|
21
|
+
const menuItem = this._objects.menuItem(groupName, itemName);
|
|
22
|
+
await this.ensureGroupIsExpanded(groupName);
|
|
23
|
+
await menuItem.click();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public async expandListBarMenuGroup(groupName: string) {
|
|
27
|
+
await this.ensureGroupIsExpanded(groupName);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public getMenuGroupByName(groupName: string): Locator {
|
|
31
|
+
return this._objects.menuGroup(groupName);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public getMenuItemByName(groupName: string, itemName: string): Locator {
|
|
35
|
+
return this._objects.menuItem(groupName, itemName);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Page } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export class ListBarMenuComponentObjects {
|
|
4
|
+
private _page: Page;
|
|
5
|
+
|
|
6
|
+
constructor(page: Page) {
|
|
7
|
+
this._page = page;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public menuGroup = (groupName: string) => this._page.locator(`[data-testid="listbar__${groupName}"]`);
|
|
11
|
+
|
|
12
|
+
public menuItem = (groupName: string, itemName: string) =>
|
|
13
|
+
this._page.locator(`[data-testid="listbar__${groupName}__item__${itemName}"]`);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { PivotGridObjects } from './PivotGridObjects.js';
|
|
3
|
+
|
|
4
|
+
export class PivotGrid {
|
|
5
|
+
pivotGridObjects: PivotGridObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.pivotGridObjects = new PivotGridObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.pivotGridObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator, Page } from '@playwright/test';
|
|
2
|
+
import { PivotGridFieldListObjects } from './PivotGridFieldListObjects.js';
|
|
3
|
+
|
|
4
|
+
export class PivotGridFieldList {
|
|
5
|
+
pivotGridFieldListObjects: PivotGridFieldListObjects;
|
|
6
|
+
|
|
7
|
+
constructor(page: Page, context: Locator | null = null) {
|
|
8
|
+
this.pivotGridFieldListObjects = new PivotGridFieldListObjects(page, context);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public get context(): Locator | null {
|
|
12
|
+
return this.pivotGridFieldListObjects.context;
|
|
13
|
+
}
|
|
14
|
+
}
|