@thinkwise/testwise 0.2.20 → 0.2.62
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 +2 -0
- package/artifact-builder/SelectorBuilder.ts +2 -2
- package/artifact-builder/SubjectComponentGenerator.ts +21 -12
- package/artifact-builder/SubjectGenerator.ts +24 -8
- package/components/action-bar/ActionBar.ts +7 -7
- package/components/action-bar/CustomActionBar.ts +0 -5
- package/components/cardlist/Cardlist.ts +3 -3
- package/components/chart/Chart.ts +3 -3
- package/components/combined-filter/CombinedFilter.ts +3 -3
- package/components/cube-view-bar/CubeViewBar.ts +3 -3
- package/components/filter/ExcelStyleFilterPopup.ts +29 -0
- package/components/filter/ExcelStyleFilterPopupObjects.ts +20 -0
- package/components/filter/FilterForm.ts +3 -3
- package/components/filter/FilterPopup.ts +187 -0
- package/components/filter/FilterPopupObjects.ts +63 -0
- package/components/filter/ManagePrefilterPopup.ts +44 -0
- package/components/filter/ManagePrefilterPopupObjects.ts +28 -0
- package/components/form/Form.ts +3 -3
- package/components/grid/Grid.ts +15 -119
- package/components/grid/GridObjects.ts +0 -4
- package/components/index.ts +4 -0
- package/components/maps/Maps.ts +3 -3
- package/components/menu/ListBarMenuComponent.ts +11 -0
- package/components/menu/ListBarMenuComponentObjects.ts +6 -0
- package/components/pivot-grid/PivotGrid.ts +3 -3
- package/components/pivot-grid/PivotGridFieldList.ts +3 -3
- package/components/pop-up/AllRowsPopUp.ts +29 -0
- package/components/pop-up/AllRowsPopUpObjects.ts +22 -0
- package/components/prefilter-list/PrefilterList.ts +3 -3
- package/components/preview/Preview.ts +3 -3
- package/components/report-bar/ReportBar.ts +3 -3
- package/components/report-tiles/ReportTiles.ts +3 -3
- package/components/scheduler/Scheduler.ts +3 -3
- package/components/splitter/Splitter.ts +3 -3
- package/components/tab/BaseTab.ts +3 -3
- package/components/tab/DetailTabPage.ts +4 -4
- package/components/tab/Tab.ts +4 -4
- package/components/task/TaskBar.ts +3 -3
- package/components/task/TaskTiles.ts +3 -3
- package/components/topbar/TopBar.ts +2 -0
- package/components/tree-view/TreeView.ts +3 -3
- package/controls/DateControl.ts +6 -6
- package/controls/DateControlObjects.ts +0 -0
- package/controls/FormComboBox.ts +7 -7
- package/controls/FormComboBoxObjects.ts +0 -0
- package/controls/GridColumnControl.ts +68 -0
- package/controls/GridColumnControlObjects.ts +20 -0
- package/controls/InputFieldControl.ts +6 -6
- package/controls/InputFieldControlObjects.ts +0 -0
- package/controls/LookupDropdown.ts +58 -16
- package/controls/index.ts +1 -0
- package/dist/Testwise.d.ts +1 -0
- package/dist/Testwise.js +1 -0
- package/dist/Testwise.js.map +1 -1
- package/dist/artifact-builder/SelectorBuilder.d.ts +1 -1
- package/dist/artifact-builder/SelectorBuilder.js +2 -2
- package/dist/artifact-builder/SelectorBuilder.js.map +1 -1
- package/dist/artifact-builder/SubjectComponentGenerator.js +18 -12
- package/dist/artifact-builder/SubjectComponentGenerator.js.map +1 -1
- package/dist/artifact-builder/SubjectGenerator.d.ts +1 -0
- package/dist/artifact-builder/SubjectGenerator.js +20 -8
- package/dist/artifact-builder/SubjectGenerator.js.map +1 -1
- package/dist/components/action-bar/ActionBar.d.ts +2 -2
- package/dist/components/action-bar/ActionBar.js +7 -7
- package/dist/components/action-bar/ActionBar.js.map +1 -1
- package/dist/components/action-bar/CustomActionBar.d.ts +0 -2
- package/dist/components/action-bar/CustomActionBar.js +0 -3
- package/dist/components/action-bar/CustomActionBar.js.map +1 -1
- package/dist/components/cardlist/Cardlist.d.ts +2 -2
- package/dist/components/cardlist/Cardlist.js +2 -2
- package/dist/components/cardlist/Cardlist.js.map +1 -1
- package/dist/components/chart/Chart.d.ts +2 -2
- package/dist/components/chart/Chart.js +2 -2
- package/dist/components/chart/Chart.js.map +1 -1
- package/dist/components/combined-filter/CombinedFilter.d.ts +2 -2
- package/dist/components/combined-filter/CombinedFilter.js +2 -2
- package/dist/components/combined-filter/CombinedFilter.js.map +1 -1
- package/dist/components/cube-view-bar/CubeViewBar.d.ts +2 -2
- package/dist/components/cube-view-bar/CubeViewBar.js +2 -2
- package/dist/components/cube-view-bar/CubeViewBar.js.map +1 -1
- package/dist/components/filter/ExcelStyleFilterPopup.d.ts +9 -0
- package/dist/components/filter/ExcelStyleFilterPopup.js +22 -0
- package/dist/components/filter/ExcelStyleFilterPopup.js.map +1 -0
- package/dist/components/filter/ExcelStyleFilterPopupObjects.d.ts +9 -0
- package/dist/components/filter/ExcelStyleFilterPopupObjects.js +13 -0
- package/dist/components/filter/ExcelStyleFilterPopupObjects.js.map +1 -0
- package/dist/components/filter/FilterForm.d.ts +2 -2
- package/dist/components/filter/FilterForm.js +2 -2
- package/dist/components/filter/FilterForm.js.map +1 -1
- package/dist/components/filter/FilterPopup.d.ts +41 -0
- package/dist/components/filter/FilterPopup.js +126 -0
- package/dist/components/filter/FilterPopup.js.map +1 -0
- package/dist/components/filter/FilterPopupObjects.d.ts +29 -0
- package/dist/components/filter/FilterPopupObjects.js +30 -0
- package/dist/components/filter/FilterPopupObjects.js.map +1 -0
- package/dist/components/filter/ManagePrefilterPopup.d.ts +14 -0
- package/dist/components/filter/ManagePrefilterPopup.js +33 -0
- package/dist/components/filter/ManagePrefilterPopup.js.map +1 -0
- package/dist/components/filter/ManagePrefilterPopupObjects.d.ts +11 -0
- package/dist/components/filter/ManagePrefilterPopupObjects.js +19 -0
- package/dist/components/filter/ManagePrefilterPopupObjects.js.map +1 -0
- package/dist/components/form/Form.d.ts +2 -2
- package/dist/components/form/Form.js +2 -2
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/grid/Grid.d.ts +4 -36
- package/dist/components/grid/Grid.js +14 -102
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/GridObjects.d.ts +0 -2
- package/dist/components/grid/GridObjects.js +0 -2
- package/dist/components/grid/GridObjects.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/maps/Maps.d.ts +2 -2
- package/dist/components/maps/Maps.js +2 -2
- package/dist/components/maps/Maps.js.map +1 -1
- package/dist/components/menu/ListBarMenuComponent.d.ts +6 -0
- package/dist/components/menu/ListBarMenuComponent.js +10 -0
- package/dist/components/menu/ListBarMenuComponent.js.map +1 -1
- package/dist/components/menu/ListBarMenuComponentObjects.d.ts +2 -0
- package/dist/components/menu/ListBarMenuComponentObjects.js +2 -0
- package/dist/components/menu/ListBarMenuComponentObjects.js.map +1 -1
- package/dist/components/pivot-grid/PivotGrid.d.ts +2 -2
- package/dist/components/pivot-grid/PivotGrid.js +2 -2
- package/dist/components/pivot-grid/PivotGrid.js.map +1 -1
- package/dist/components/pivot-grid/PivotGridFieldList.d.ts +2 -2
- package/dist/components/pivot-grid/PivotGridFieldList.js +2 -2
- package/dist/components/pivot-grid/PivotGridFieldList.js.map +1 -1
- package/dist/components/pop-up/AllRowsPopUp.d.ts +12 -0
- package/dist/components/pop-up/AllRowsPopUp.js +19 -0
- package/dist/components/pop-up/AllRowsPopUp.js.map +1 -0
- package/dist/components/pop-up/AllRowsPopUpObjects.d.ts +11 -0
- package/dist/components/pop-up/AllRowsPopUpObjects.js +13 -0
- package/dist/components/pop-up/AllRowsPopUpObjects.js.map +1 -0
- package/dist/components/prefilter-list/PrefilterList.d.ts +2 -2
- package/dist/components/prefilter-list/PrefilterList.js +2 -2
- package/dist/components/prefilter-list/PrefilterList.js.map +1 -1
- package/dist/components/preview/Preview.d.ts +2 -2
- package/dist/components/preview/Preview.js +2 -2
- package/dist/components/preview/Preview.js.map +1 -1
- package/dist/components/report-bar/ReportBar.d.ts +2 -2
- package/dist/components/report-bar/ReportBar.js +2 -2
- package/dist/components/report-bar/ReportBar.js.map +1 -1
- package/dist/components/report-tiles/ReportTiles.d.ts +2 -2
- package/dist/components/report-tiles/ReportTiles.js +2 -2
- package/dist/components/report-tiles/ReportTiles.js.map +1 -1
- package/dist/components/scheduler/Scheduler.d.ts +2 -2
- package/dist/components/scheduler/Scheduler.js +2 -2
- package/dist/components/scheduler/Scheduler.js.map +1 -1
- package/dist/components/splitter/Splitter.d.ts +2 -2
- package/dist/components/splitter/Splitter.js +2 -2
- package/dist/components/splitter/Splitter.js.map +1 -1
- package/dist/components/tab/BaseTab.d.ts +2 -2
- package/dist/components/tab/BaseTab.js +2 -2
- package/dist/components/tab/BaseTab.js.map +1 -1
- package/dist/components/tab/DetailTabPage.d.ts +2 -2
- package/dist/components/tab/DetailTabPage.js +3 -3
- package/dist/components/tab/DetailTabPage.js.map +1 -1
- package/dist/components/tab/Tab.d.ts +2 -2
- package/dist/components/tab/Tab.js +3 -3
- package/dist/components/tab/Tab.js.map +1 -1
- package/dist/components/task/TaskBar.d.ts +2 -2
- package/dist/components/task/TaskBar.js +2 -2
- package/dist/components/task/TaskBar.js.map +1 -1
- package/dist/components/task/TaskTiles.d.ts +2 -2
- package/dist/components/task/TaskTiles.js +2 -2
- package/dist/components/task/TaskTiles.js.map +1 -1
- package/dist/components/topbar/TopBar.d.ts +1 -0
- package/dist/components/topbar/TopBar.js +1 -0
- package/dist/components/topbar/TopBar.js.map +1 -1
- package/dist/components/tree-view/TreeView.d.ts +2 -2
- package/dist/components/tree-view/TreeView.js +2 -2
- package/dist/components/tree-view/TreeView.js.map +1 -1
- package/dist/controls/DateControl.d.ts +3 -3
- package/dist/controls/DateControl.js +5 -5
- package/dist/controls/DateControl.js.map +1 -1
- package/dist/controls/DateControlObjects.d.ts +1 -0
- package/dist/controls/DateControlObjects.js +2 -0
- package/dist/controls/DateControlObjects.js.map +1 -0
- package/dist/controls/FormComboBox.d.ts +2 -2
- package/dist/controls/FormComboBox.js +6 -6
- package/dist/controls/FormComboBox.js.map +1 -1
- package/dist/controls/FormComboBoxObjects.d.ts +1 -0
- package/dist/controls/FormComboBoxObjects.js +2 -0
- package/dist/controls/FormComboBoxObjects.js.map +1 -0
- package/dist/controls/GridColumnControl.d.ts +10 -0
- package/dist/controls/GridColumnControl.js +43 -0
- package/dist/controls/GridColumnControl.js.map +1 -0
- package/dist/controls/GridColumnControlObjects.d.ts +9 -0
- package/dist/controls/GridColumnControlObjects.js +13 -0
- package/dist/controls/GridColumnControlObjects.js.map +1 -0
- package/dist/controls/InputFieldControl.d.ts +3 -3
- package/dist/controls/InputFieldControl.js +5 -5
- package/dist/controls/InputFieldControl.js.map +1 -1
- package/dist/controls/InputFieldControlObjects.d.ts +1 -0
- package/dist/controls/InputFieldControlObjects.js +2 -0
- package/dist/controls/InputFieldControlObjects.js.map +1 -0
- package/dist/controls/LookupDropdown.d.ts +6 -1
- package/dist/controls/LookupDropdown.js +42 -13
- package/dist/controls/LookupDropdown.js.map +1 -1
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +1 -0
- package/dist/controls/index.js.map +1 -1
- package/dist/enums/ElementTypes.d.ts +1 -1
- package/dist/enums/ElementTypes.js +1 -1
- package/dist/enums/ElementTypes.js.map +1 -1
- package/dist/helpers/FlightTracker.d.ts +7 -0
- package/dist/helpers/FlightTracker.js +63 -11
- package/dist/helpers/FlightTracker.js.map +1 -1
- package/dist/helpers/LoginHelper.d.ts +11 -3
- package/dist/helpers/LoginHelper.js +59 -13
- package/dist/helpers/LoginHelper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/page-extensions/GlobalComponents.d.ts +2 -1
- package/dist/page-extensions/GlobalComponents.js +2 -1
- package/dist/page-extensions/GlobalComponents.js.map +1 -1
- package/dist/page-overrides/ClickOverride.d.ts +1 -0
- package/dist/page-overrides/ClickOverride.js +57 -46
- package/dist/page-overrides/ClickOverride.js.map +1 -1
- package/dist/types/Universal.d.ts +1 -0
- package/enums/ElementTypes.ts +1 -1
- package/helpers/FlightTracker.ts +71 -11
- package/helpers/LoginHelper.ts +79 -21
- package/index.ts +1 -1
- package/package.json +6 -5
- package/page-extensions/GlobalComponents.ts +3 -0
- package/page-overrides/ClickOverride.ts +69 -64
- package/types/Universal.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Page } from '@playwright/test';
|
|
2
|
-
import { ExportComponent, ListBarMenuComponent, PopUpComponent, SnackBarComponent, TopBarComponent } from '../components/index.js';
|
|
2
|
+
import { ExportComponent, ListBarMenuComponent, ManagePrefilterPopup, PopUpComponent, SnackBarComponent, TopBarComponent } from '../components/index.js';
|
|
3
3
|
import type { Test } from '../types/Test.js';
|
|
4
4
|
declare class GlobalComponents {
|
|
5
5
|
popUp: PopUpComponent;
|
|
@@ -7,6 +7,7 @@ declare class GlobalComponents {
|
|
|
7
7
|
snackBar: SnackBarComponent;
|
|
8
8
|
topBar: TopBarComponent;
|
|
9
9
|
listBarMenu: ListBarMenuComponent;
|
|
10
|
+
managePrefilterPopup: ManagePrefilterPopup;
|
|
10
11
|
constructor(page: Page);
|
|
11
12
|
}
|
|
12
13
|
declare module '@playwright/test' {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportComponent, ListBarMenuComponent, PopUpComponent, SnackBarComponent, TopBarComponent } from '../components/index.js';
|
|
1
|
+
import { ExportComponent, ListBarMenuComponent, ManagePrefilterPopup, PopUpComponent, SnackBarComponent, TopBarComponent } from '../components/index.js';
|
|
2
2
|
class GlobalComponents {
|
|
3
3
|
constructor(page) {
|
|
4
4
|
this.popUp = new PopUpComponent(page);
|
|
@@ -6,6 +6,7 @@ class GlobalComponents {
|
|
|
6
6
|
this.snackBar = new SnackBarComponent(page);
|
|
7
7
|
this.topBar = new TopBarComponent(page);
|
|
8
8
|
this.listBarMenu = new ListBarMenuComponent(page);
|
|
9
|
+
this.managePrefilterPopup = new ManagePrefilterPopup(page);
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
export class Components {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalComponents.js","sourceRoot":"","sources":["../../page-extensions/GlobalComponents.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"GlobalComponents.js","sourceRoot":"","sources":["../../page-extensions/GlobalComponents.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,gBAAgB;IAQpB,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;CACF;AAQD,MAAM,OAAO,UAAU;IAGrB,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YACvB,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;gBAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;gBAE7C,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -4,18 +4,29 @@ const waitForRequestsToComplete = testwiseConfig().get('featureSettings.Inflight
|
|
|
4
4
|
const continueOnError = testwiseConfig().get('featureSettings.InflightRequests.continueOnError') ?? true;
|
|
5
5
|
export class ClickOverride {
|
|
6
6
|
constructor(test) {
|
|
7
|
+
this._page = null;
|
|
7
8
|
this.flightTracker = new FlightTracker();
|
|
8
9
|
this._test = test.extend({
|
|
9
10
|
page: async ({ page }, use) => {
|
|
11
|
+
this._page = page;
|
|
12
|
+
const isTrackable = (url, resourceType) => {
|
|
13
|
+
const lowerUrl = url.toLowerCase();
|
|
14
|
+
return (resourceType === 'xhr' &&
|
|
15
|
+
!lowerUrl.includes('/detect_change(') &&
|
|
16
|
+
!lowerUrl.includes('/set_gui_start_use_log_session') &&
|
|
17
|
+
!lowerUrl.includes('download_icon') &&
|
|
18
|
+
!lowerUrl.includes('download_list_bar_grp_icon') &&
|
|
19
|
+
!lowerUrl.includes('/badge()'));
|
|
20
|
+
};
|
|
10
21
|
const overrideClickMethod = (locator) => {
|
|
11
22
|
const originalClickMethod = locator.click.bind(locator);
|
|
12
23
|
page.on('request', (request) => {
|
|
13
|
-
if (request.
|
|
24
|
+
if (isTrackable(request.url(), request.resourceType())) {
|
|
14
25
|
this.flightTracker.requestsInFlight++;
|
|
15
26
|
}
|
|
16
27
|
});
|
|
17
28
|
page.on('response', (response) => {
|
|
18
|
-
if (response.request().
|
|
29
|
+
if (isTrackable(response.request().url(), response.request().resourceType())) {
|
|
19
30
|
if (this.flightTracker.requestsInFlight > 0) {
|
|
20
31
|
this.flightTracker.requestsInFlight--;
|
|
21
32
|
}
|
|
@@ -32,57 +43,57 @@ export class ClickOverride {
|
|
|
32
43
|
}
|
|
33
44
|
catch (error) {
|
|
34
45
|
console.warn('Exception while waiting for inflight requests to finish:', error);
|
|
46
|
+
if (this._page) {
|
|
47
|
+
const inflightRequests = await this._page.evaluate(() => {
|
|
48
|
+
return performance
|
|
49
|
+
.getEntriesByType('resource')
|
|
50
|
+
.filter((entry) => {
|
|
51
|
+
const res = entry;
|
|
52
|
+
return (res.initiatorType === 'xmlhttprequest' &&
|
|
53
|
+
!res.name.includes('/detect_change(') &&
|
|
54
|
+
!res.name.includes('/set_gui_start_use_log_session'));
|
|
55
|
+
})
|
|
56
|
+
.map((entry) => entry.name);
|
|
57
|
+
});
|
|
58
|
+
console.debug('Current inflight XHR requests:', inflightRequests);
|
|
59
|
+
}
|
|
35
60
|
if (!continueOnError)
|
|
36
61
|
throw error;
|
|
37
62
|
}
|
|
38
63
|
}
|
|
64
|
+
return;
|
|
39
65
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
locator.getByRole = (...args) => overrideClickMethod(originalGetByRoleMethod(...args));
|
|
56
|
-
const originalGetByPlaceholderMethod = locator.getByPlaceholder.bind(locator);
|
|
57
|
-
locator.getByPlaceholder = (...args) => overrideClickMethod(originalGetByPlaceholderMethod(...args));
|
|
58
|
-
const originalGetByTitleMethod = locator.getByTitle.bind(locator);
|
|
59
|
-
locator.getByTitle = (...args) => overrideClickMethod(originalGetByTitleMethod(...args));
|
|
66
|
+
const locatorMethods = [
|
|
67
|
+
'locator',
|
|
68
|
+
'filter',
|
|
69
|
+
'getByText',
|
|
70
|
+
'getByTestId',
|
|
71
|
+
'getByAltText',
|
|
72
|
+
'getByLabel',
|
|
73
|
+
'getByRole',
|
|
74
|
+
'getByPlaceholder',
|
|
75
|
+
'getByTitle'
|
|
76
|
+
];
|
|
77
|
+
for (const method of locatorMethods) {
|
|
78
|
+
const original = locator[method].bind(locator);
|
|
79
|
+
locator[method] = (...args) => overrideClickMethod(original(...args));
|
|
80
|
+
}
|
|
60
81
|
return locator;
|
|
61
82
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
page.getByRole = (...args) => overrideClickMethod(originalGetByRole(...args));
|
|
77
|
-
// Override the getByPlaceholder.click method
|
|
78
|
-
const originalGetByPlaceholder = page.getByPlaceholder.bind(page);
|
|
79
|
-
page.getByPlaceholder = (...args) => overrideClickMethod(originalGetByPlaceholder(...args));
|
|
80
|
-
// Override the getByText.click method
|
|
81
|
-
const originalGetByText = page.getByText.bind(page);
|
|
82
|
-
page.getByText = (...args) => overrideClickMethod(originalGetByText(...args));
|
|
83
|
-
// Override the getByTitle.click method
|
|
84
|
-
const originalGetByTitle = page.getByTitle.bind(page);
|
|
85
|
-
page.getByTitle = (...args) => overrideClickMethod(originalGetByTitle(...args));
|
|
83
|
+
const rootMethods = [
|
|
84
|
+
'locator',
|
|
85
|
+
'getByTestId',
|
|
86
|
+
'getByAltText',
|
|
87
|
+
'getByLabel',
|
|
88
|
+
'getByRole',
|
|
89
|
+
'getByPlaceholder',
|
|
90
|
+
'getByText',
|
|
91
|
+
'getByTitle'
|
|
92
|
+
];
|
|
93
|
+
for (const method of rootMethods) {
|
|
94
|
+
const original = page[method].bind(page);
|
|
95
|
+
page[method] = (...args) => overrideClickMethod(original(...args));
|
|
96
|
+
}
|
|
86
97
|
await use(page);
|
|
87
98
|
}
|
|
88
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickOverride.js","sourceRoot":"","sources":["../../page-overrides/ClickOverride.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,MAAM,yBAAyB,GAC7B,cAAc,EAAE,CAAC,GAAG,CAAU,4DAA4D,CAAC,IAAI,IAAI,CAAC;AACtG,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC,GAAG,CAAU,kDAAkD,CAAC,IAA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oBACb,cAAc;oBACd,YAAY;oBACZ,WAAW;oBACX,kBAAkB;oBAClB,WAAW;oBACX,YAAY;iBACJ,CAAC;gBAEX,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;oBACjC,MAAM,QAAQ,GAAI,IAAI,CAAC,MAAM,CAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAC7E,IAAmE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CACpG,mBAAmB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBAC3C,CAAC;gBAED,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
|
package/enums/ElementTypes.ts
CHANGED
package/helpers/FlightTracker.ts
CHANGED
|
@@ -2,25 +2,85 @@ import { EventEmitter } from 'node:events';
|
|
|
2
2
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
3
3
|
|
|
4
4
|
const timeout = testwiseConfig().get<number>('featureSettings.InflightRequests.waitTimeout') ?? 5000;
|
|
5
|
+
const stabilityTime = 150;
|
|
5
6
|
|
|
6
7
|
export class FlightTracker {
|
|
7
8
|
public requestsInFlight: number = 0;
|
|
9
|
+
private activeRequests = new Set<string>();
|
|
8
10
|
public eventEmitter: EventEmitter = new EventEmitter();
|
|
9
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Filters out non-functional "noise" requests that shouldn't block test execution.
|
|
14
|
+
*/
|
|
15
|
+
public isEssentialRequest(url: string): boolean {
|
|
16
|
+
const noisePatterns = [
|
|
17
|
+
'.download_icon',
|
|
18
|
+
'.download_list_bar_grp_icon',
|
|
19
|
+
'.download_form_next_grp_icon',
|
|
20
|
+
'/badge()',
|
|
21
|
+
'universal_background_picture',
|
|
22
|
+
'i_ui_theme'
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
return !noisePatterns.some((pattern) => url.includes(pattern));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public handleRequestStarted = (url: string) => {
|
|
29
|
+
if (this.isEssentialRequest(url)) {
|
|
30
|
+
this.activeRequests.add(url);
|
|
31
|
+
this.requestsInFlight = this.activeRequests.size;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
public handleRequestFinished = (url: string) => {
|
|
36
|
+
if (this.isEssentialRequest(url)) {
|
|
37
|
+
this.activeRequests.delete(url);
|
|
38
|
+
this.requestsInFlight = this.activeRequests.size;
|
|
39
|
+
if (this.requestsInFlight === 0) {
|
|
40
|
+
this.eventEmitter.emit('idle');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
10
45
|
public waitToContinue = async (): Promise<void> => {
|
|
11
46
|
if (this.requestsInFlight === 0) {
|
|
12
|
-
|
|
47
|
+
await new Promise((res) => setTimeout(res, stabilityTime));
|
|
48
|
+
if (this.requestsInFlight === 0) return;
|
|
13
49
|
}
|
|
14
50
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
51
|
+
let timeoutId: NodeJS.Timeout;
|
|
52
|
+
|
|
53
|
+
const idlePromise = new Promise<void>((resolve) => {
|
|
54
|
+
const checkIdle = () => {
|
|
55
|
+
if (this.requestsInFlight === 0) {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
if (this.requestsInFlight === 0) {
|
|
58
|
+
this.eventEmitter.off('idle', checkIdle);
|
|
59
|
+
resolve();
|
|
60
|
+
}
|
|
61
|
+
}, stabilityTime);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
this.eventEmitter.on('idle', checkIdle);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const timeoutPromise = new Promise<void>((_, reject) => {
|
|
68
|
+
timeoutId = setTimeout(() => {
|
|
69
|
+
const pending = Array.from(this.activeRequests).join('\n -> ');
|
|
70
|
+
reject(
|
|
71
|
+
new Error(
|
|
72
|
+
`Timeout waiting for ${this.requestsInFlight} requests to complete (${timeout}ms).\nPending Essential Requests:\n -> ${pending}`
|
|
73
|
+
)
|
|
74
|
+
);
|
|
75
|
+
}, timeout);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
await Promise.race([idlePromise, timeoutPromise]);
|
|
80
|
+
} finally {
|
|
81
|
+
// biome-ignore lint/style/noNonNullAssertion: should be defined if we reach here
|
|
82
|
+
if (timeoutId!) clearTimeout(timeoutId);
|
|
83
|
+
this.eventEmitter.removeAllListeners('idle');
|
|
84
|
+
}
|
|
25
85
|
};
|
|
26
86
|
}
|
package/helpers/LoginHelper.ts
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import type { Page } from '@playwright/test';
|
|
4
|
+
import type { APIResponse, Page } from '@playwright/test';
|
|
5
5
|
import { testwiseConfig } from '../services/ConfigBuilder.js';
|
|
6
6
|
import type { UniversalConfigOptions, UniversalLoginOptions } from '../types/index.js';
|
|
7
7
|
import { pollUntil } from './Poll.js';
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const configFixture = JSON.parse(fs.readFileSync(path.resolve(
|
|
9
|
+
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const configFixture = JSON.parse(fs.readFileSync(path.resolve(dirname, '../../config.json'), 'utf-8'));
|
|
11
11
|
|
|
12
12
|
export class LoginHelper {
|
|
13
13
|
private _page: Page;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
protected serviceUrl = String(testwiseConfig().get('environmentSettings.serviceUrl'));
|
|
15
|
+
protected metaEndpoint = String(testwiseConfig().get('environmentSettings.metaEndpoint'));
|
|
16
16
|
|
|
17
17
|
constructor(page: Page) {
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
const serviceUrl = testwiseConfig().get<string>('environmentSettings.serviceUrl');
|
|
21
|
-
const metaEndpoint = testwiseConfig().get<string>('environmentSettings.metaEndpoint');
|
|
18
|
+
if (!this.serviceUrl || this.serviceUrl === 'undefined') throw new Error('Service URL not found');
|
|
19
|
+
if (!this.metaEndpoint || this.metaEndpoint === 'undefined') throw new Error('Meta endpoint not found');
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
throw new Error(
|
|
25
|
-
'Either environmentSettings.serviceUrl or environmentSettings.metaEndpoint is not defined in the configuration.'
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
this._serviceUrl = serviceUrl;
|
|
29
|
-
this._metaEndpoint = metaEndpoint;
|
|
21
|
+
this._page = page;
|
|
30
22
|
}
|
|
31
23
|
|
|
32
24
|
/**
|
|
@@ -101,11 +93,11 @@ export class LoginHelper {
|
|
|
101
93
|
}
|
|
102
94
|
|
|
103
95
|
if (serviceUrl && metaEndpoint) {
|
|
104
|
-
this.
|
|
105
|
-
this.
|
|
96
|
+
this.serviceUrl = serviceUrl;
|
|
97
|
+
this.metaEndpoint = metaEndpoint;
|
|
106
98
|
}
|
|
107
99
|
|
|
108
|
-
const response = await this._page.request.post(`${this.
|
|
100
|
+
const response = await this._page.request.post(`${this.serviceUrl}/account/api/login`, {
|
|
109
101
|
form: {
|
|
110
102
|
UserName: username,
|
|
111
103
|
Password: password
|
|
@@ -116,6 +108,36 @@ export class LoginHelper {
|
|
|
116
108
|
throw new Error(`Login failed with status code: ${response.status()}`);
|
|
117
109
|
}
|
|
118
110
|
|
|
111
|
+
if (password === username && /^Worker_\d+$/.test(username)) {
|
|
112
|
+
const userPreferences = new UserPreferences(this._page, this.serviceUrl, this.metaEndpoint);
|
|
113
|
+
|
|
114
|
+
if (!options.userPreference) {
|
|
115
|
+
console.info(
|
|
116
|
+
`No user preference configuration ID provided for worker account ${username}. User preferences will be disabled to prevent unexpected test behavior.`
|
|
117
|
+
);
|
|
118
|
+
} else {
|
|
119
|
+
console.info(
|
|
120
|
+
`User preference configuration ID ${options.userPreference} provided for worker account ${username}. Attempting to disable user preferences before re-enabling with provided configuration.`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
await userPreferences.disable();
|
|
126
|
+
console.info(`Successfully disabled user preferences for worker account ${username}.`);
|
|
127
|
+
|
|
128
|
+
if (options.userPreference) {
|
|
129
|
+
await userPreferences.run(options.userPreference);
|
|
130
|
+
console.info(
|
|
131
|
+
`Successfully re-enabled user preferences for worker account ${username} with configuration ID ${options.userPreference}.`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.warn(
|
|
136
|
+
`User preferences may not be properly configured for worker account ${username}. Tests may be unstable. Error details: ${error}`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
119
141
|
// Set the navigator.language property
|
|
120
142
|
await this._page.route('**/*', (route, request) => {
|
|
121
143
|
route.continue({
|
|
@@ -142,7 +164,7 @@ export class LoginHelper {
|
|
|
142
164
|
contentType: 'application/json',
|
|
143
165
|
body: JSON.stringify({
|
|
144
166
|
...configFixture,
|
|
145
|
-
serviceUrl: `${this.
|
|
167
|
+
serviceUrl: `${this.serviceUrl}/iam/${this.metaEndpoint}`,
|
|
146
168
|
...options
|
|
147
169
|
})
|
|
148
170
|
});
|
|
@@ -150,7 +172,7 @@ export class LoginHelper {
|
|
|
150
172
|
}
|
|
151
173
|
|
|
152
174
|
public async logOut() {
|
|
153
|
-
const response = await this._page.request.post(`${this.
|
|
175
|
+
const response = await this._page.request.post(`${this.serviceUrl}/account/api/logout`);
|
|
154
176
|
|
|
155
177
|
if (![204, 401].includes(response.status())) {
|
|
156
178
|
throw new Error(`Logout failed with status code: ${response.status()}`);
|
|
@@ -159,3 +181,39 @@ export class LoginHelper {
|
|
|
159
181
|
await this._page.context().clearCookies();
|
|
160
182
|
}
|
|
161
183
|
}
|
|
184
|
+
|
|
185
|
+
export class UserPreferences {
|
|
186
|
+
private _page: Page;
|
|
187
|
+
|
|
188
|
+
public readonly guiApplAlias = String(testwiseConfig().get<string>('environmentSettings.guiApplAlias'));
|
|
189
|
+
public readonly url: string;
|
|
190
|
+
|
|
191
|
+
constructor(requestContext: Page, serviceUrl?: string, metaEndpoint?: string) {
|
|
192
|
+
this._page = requestContext;
|
|
193
|
+
|
|
194
|
+
serviceUrl = serviceUrl ?? testwiseConfig().get<string>('environmentSettings.serviceUrl');
|
|
195
|
+
metaEndpoint = metaEndpoint ?? testwiseConfig().get<string>('environmentSettings.metaEndpoint');
|
|
196
|
+
|
|
197
|
+
if (!serviceUrl) throw new Error('Service URL not found or is empty');
|
|
198
|
+
if (!metaEndpoint) throw new Error('Meta endpoint not found or is empty');
|
|
199
|
+
if (!this.guiApplAlias) throw new Error('GUI application alias not found or is empty');
|
|
200
|
+
|
|
201
|
+
this.url = `${serviceUrl}/${metaEndpoint}/${this.guiApplAlias}`;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
public async run(upConfigurationId: number) {
|
|
205
|
+
const fullUrl = `${this.url}/set_up_configuration`;
|
|
206
|
+
|
|
207
|
+
const data = {
|
|
208
|
+
up_configuration_id: upConfigurationId
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
await this._page.request.post(fullUrl, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, data });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
public async disable(): Promise<APIResponse> {
|
|
215
|
+
const fullUrl = `${this.url}/disable_up`;
|
|
216
|
+
|
|
217
|
+
return await this._page.request.post(fullUrl, { headers: { 'Content-Type': 'application/json; charset=utf-8' } });
|
|
218
|
+
}
|
|
219
|
+
}
|
package/index.ts
CHANGED
|
@@ -12,7 +12,6 @@ console.warn = (...args: unknown[]) => logger.warn(args.join(' '));
|
|
|
12
12
|
console.error = (...args: unknown[]) => logger.error(args.join(' '));
|
|
13
13
|
console.debug = (...args: unknown[]) => logger.debug(args.join(' '));
|
|
14
14
|
|
|
15
|
-
export { originalLog, originalInfo, originalWarn, originalError, originalDebug };
|
|
16
15
|
export * from './artifact-builder/index.js';
|
|
17
16
|
export * from './components/index.js';
|
|
18
17
|
export * from './controls/index.js';
|
|
@@ -23,3 +22,4 @@ export * from './page-overrides/index.js';
|
|
|
23
22
|
export * from './services/index.js';
|
|
24
23
|
export * from './Testwise.js';
|
|
25
24
|
export * from './types/index.js';
|
|
25
|
+
export { originalDebug, originalError, originalInfo, originalLog, originalWarn };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkwise/testwise",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
|
|
12
|
-
"format:fix": "
|
|
13
|
-
"format:check": "
|
|
12
|
+
"format:fix": "run-s \"lint --fix\" && biome check --fix --unsafe",
|
|
13
|
+
"format:check": "run-s \"lint \" && biome check",
|
|
14
14
|
"postinstall": "node scripts/main.js postinstall"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [],
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"description": "",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@thinkwise/backups": "^1.0.
|
|
21
|
+
"@thinkwise/backups": "^1.0.16",
|
|
22
22
|
"@types/node": "^22.15.29",
|
|
23
23
|
"axios": "^1.9.0",
|
|
24
24
|
"chalk": "^5.4.1",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"@playwright/test": "^1.56.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@biomejs/biome": "^2.
|
|
40
|
+
"@biomejs/biome": "^2.4.8",
|
|
41
41
|
"@eslint/js": "^9.28.0",
|
|
42
42
|
"eslint": "^9.39.2",
|
|
43
43
|
"eslint-plugin-playwright": "^2.2.0",
|
|
44
|
+
"npm-run-all": "^4.1.5",
|
|
44
45
|
"typescript-eslint": "^8.34.0"
|
|
45
46
|
},
|
|
46
47
|
"exports": {
|
|
@@ -2,6 +2,7 @@ import type { Page } from '@playwright/test';
|
|
|
2
2
|
import {
|
|
3
3
|
ExportComponent,
|
|
4
4
|
ListBarMenuComponent,
|
|
5
|
+
ManagePrefilterPopup,
|
|
5
6
|
PopUpComponent,
|
|
6
7
|
SnackBarComponent,
|
|
7
8
|
TopBarComponent
|
|
@@ -14,6 +15,7 @@ class GlobalComponents {
|
|
|
14
15
|
public snackBar: SnackBarComponent;
|
|
15
16
|
public topBar: TopBarComponent;
|
|
16
17
|
public listBarMenu: ListBarMenuComponent;
|
|
18
|
+
public managePrefilterPopup: ManagePrefilterPopup;
|
|
17
19
|
|
|
18
20
|
constructor(page: Page) {
|
|
19
21
|
this.popUp = new PopUpComponent(page);
|
|
@@ -21,6 +23,7 @@ class GlobalComponents {
|
|
|
21
23
|
this.snackBar = new SnackBarComponent(page);
|
|
22
24
|
this.topBar = new TopBarComponent(page);
|
|
23
25
|
this.listBarMenu = new ListBarMenuComponent(page);
|
|
26
|
+
this.managePrefilterPopup = new ManagePrefilterPopup(page);
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
|