@iblai/iblai-js 1.4.2 → 1.4.4
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/dist/data-layer/playwright/audit-log-helpers.d.ts +119 -0
- package/dist/data-layer/playwright/index.d.ts +1 -0
- package/dist/data-layer/playwright/shared-test-helpers.d.ts +12 -0
- package/dist/playwright/index.cjs +535 -109
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +120 -1
- package/dist/playwright/index.esm.js +510 -110
- package/dist/playwright/index.esm.js.map +1 -1
- package/dist/playwright/playwright/audit-log-helpers.d.ts +119 -0
- package/dist/playwright/playwright/index.d.ts +1 -0
- package/dist/playwright/playwright/shared-test-helpers.d.ts +12 -0
- package/dist/web-containers/playwright/audit-log-helpers.d.ts +119 -0
- package/dist/web-containers/playwright/index.d.ts +1 -0
- package/dist/web-containers/playwright/shared-test-helpers.d.ts +12 -0
- package/dist/web-containers/source/index.esm.js +1458 -655
- package/dist/web-containers/source/next/index.esm.js +950 -406
- package/dist/web-utils/playwright/audit-log-helpers.d.ts +119 -0
- package/dist/web-utils/playwright/index.d.ts +1 -0
- package/dist/web-utils/playwright/shared-test-helpers.d.ts +12 -0
- package/package.json +5 -5
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
/**
|
|
3
|
+
* Navigate to the Audit tab within the Analytics section.
|
|
4
|
+
* Assumes the user is already on the analytics page (any tab).
|
|
5
|
+
*/
|
|
6
|
+
export declare function navigateToAuditLog(page: Page): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Verify the audit log table is visible with correct headers.
|
|
9
|
+
*/
|
|
10
|
+
export declare function verifyAuditLogTableVisible(page: Page): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the number of rows currently displayed in the audit log table.
|
|
13
|
+
* Returns 0 if no table body rows are found.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAuditLogRowCount(page: Page): Promise<number>;
|
|
16
|
+
/**
|
|
17
|
+
* Verify that audit log entries contain expected data structure
|
|
18
|
+
* (person name in first cell, action description in second, timestamp in third).
|
|
19
|
+
*/
|
|
20
|
+
export declare function verifyAuditLogEntryStructure(page: Page): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Verify the empty state is displayed when there are no audit log entries.
|
|
23
|
+
*/
|
|
24
|
+
export declare function verifyAuditLogEmptyState(page: Page): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Verify the 403 permission error state is displayed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function verifyAuditLogPermissionError(page: Page): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Verify the generic error state is displayed.
|
|
31
|
+
*/
|
|
32
|
+
export declare function verifyAuditLogGenericError(page: Page): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Verify the loading spinner is displayed while audit logs are being fetched.
|
|
35
|
+
*/
|
|
36
|
+
export declare function verifyAuditLogLoading(page: Page): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Wait for the audit log data to finish loading.
|
|
39
|
+
* Waits for either table data, empty state, or error state to appear.
|
|
40
|
+
*/
|
|
41
|
+
export declare function waitForAuditLogDataLoaded(page: Page, timeout?: number): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Filter audit log entries by action type.
|
|
44
|
+
* @param action - One of 'All Actions', 'Create', 'Update', or 'Delete'
|
|
45
|
+
*/
|
|
46
|
+
export declare function filterByAction(page: Page, action: 'All Actions' | 'Create' | 'Update' | 'Delete'): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Filter audit log entries by actor/person using the search combobox.
|
|
49
|
+
* @param actorName - The username to filter by, or empty string to clear the filter
|
|
50
|
+
*/
|
|
51
|
+
export declare function filterByActor(page: Page, actorName: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Get the list of actors available in the actor filter dropdown.
|
|
54
|
+
* Opens the dropdown, reads the options, then closes it.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getAvailableActors(page: Page): Promise<string[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Open the date range picker and select a date range.
|
|
59
|
+
* @param fromDate - Start date to select
|
|
60
|
+
* @param toDate - End date to select
|
|
61
|
+
*/
|
|
62
|
+
export declare function filterByDateRange(page: Page, fromDate: Date, toDate: Date): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Clear the date range filter by clicking the date picker and resetting.
|
|
65
|
+
*/
|
|
66
|
+
export declare function clearDateRangeFilter(page: Page): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Get the current pagination info text (e.g., "Showing 1 to 20 of 45 results").
|
|
69
|
+
* Returns null if pagination is not visible.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getPaginationInfo(page: Page): Promise<string | null>;
|
|
72
|
+
/**
|
|
73
|
+
* Navigate to the next page of audit log results.
|
|
74
|
+
*/
|
|
75
|
+
export declare function goToNextPage(page: Page): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Navigate to the previous page of audit log results.
|
|
78
|
+
*/
|
|
79
|
+
export declare function goToPreviousPage(page: Page): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Navigate to the first page of audit log results.
|
|
82
|
+
*/
|
|
83
|
+
export declare function goToFirstPage(page: Page): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Navigate to the last page of audit log results.
|
|
86
|
+
* Finds the highest numbered page link in the pagination.
|
|
87
|
+
*/
|
|
88
|
+
export declare function goToLastPage(page: Page): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Navigate to a specific page number by clicking its page button.
|
|
91
|
+
*/
|
|
92
|
+
export declare function goToPage(page: Page, pageNumber: number): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Verify the current page is highlighted/active in pagination.
|
|
95
|
+
*/
|
|
96
|
+
export declare function verifyCurrentPage(page: Page, expectedPage: number): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Check if the next page button is disabled (i.e., we're on the last page).
|
|
99
|
+
*/
|
|
100
|
+
export declare function isOnLastPage(page: Page): Promise<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* Check if the previous page button is disabled (i.e., we're on the first page).
|
|
103
|
+
*/
|
|
104
|
+
export declare function isOnFirstPage(page: Page): Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* Full workflow: Navigate to audit log tab, wait for data to load,
|
|
107
|
+
* and verify the table is visible. Use this as a test setup helper.
|
|
108
|
+
*/
|
|
109
|
+
export declare function navigateToAuditLogAndWaitForData(page: Page): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Verify audit log entries are displayed after applying action filter.
|
|
112
|
+
* Returns the row count after filtering.
|
|
113
|
+
*/
|
|
114
|
+
export declare function filterByActionAndVerify(page: Page, action: 'All Actions' | 'Create' | 'Update' | 'Delete'): Promise<number>;
|
|
115
|
+
/**
|
|
116
|
+
* Verify audit log entries are displayed after applying actor filter.
|
|
117
|
+
* Returns the row count after filtering.
|
|
118
|
+
*/
|
|
119
|
+
export declare function filterByActorAndVerify(page: Page, actorName: string): Promise<number>;
|
|
@@ -16,5 +16,6 @@ export type { EnvConfig, AuthFlowType } from './env-config';
|
|
|
16
16
|
export { buildReportUrl, parseReportUrlParams, navigateToReportDownload, verifyPreparingPhase, verifyDownloadingPhase, verifyDonePhase, verifyErrorPhase, clickBackHome, clickDownloadAgain, clickManualDownloadLink, waitForReportDownload, } from './report-download';
|
|
17
17
|
export type { ReportDownloadOptions } from './report-download';
|
|
18
18
|
export { isMemoryTabVisible, switchToMemoryTab, verifyMemoryTabSettings, verifyMemoryTabMemoriesList, openAddMemoryDialog, toggleMemorySwitch, addMemory, deleteFirstMemory, deleteMemoryByContent, archiveFirstMemory, archiveMemoryByContent, getMemoryCount, verifyMemoryExists, verifyMemoryNotExists, } from './memory-test-helpers';
|
|
19
|
+
export { navigateToAuditLog, verifyAuditLogTableVisible, getAuditLogRowCount, verifyAuditLogEntryStructure, verifyAuditLogEmptyState, verifyAuditLogPermissionError, verifyAuditLogGenericError, verifyAuditLogLoading, waitForAuditLogDataLoaded, filterByAction, filterByActor, getAvailableActors, filterByDateRange, clearDateRangeFilter, getPaginationInfo, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, goToPage, verifyCurrentPage, isOnLastPage, isOnFirstPage, navigateToAuditLogAndWaitForData, filterByActionAndVerify, filterByActorAndVerify, } from './audit-log-helpers';
|
|
19
20
|
export { createPlaywrightConfig, generateProjectConfig, generateBrowserSetupProjects, getBrowserKey, } from './playwright-config';
|
|
20
21
|
export type { PlatformConfig, CreatePlaywrightConfigOptions } from './playwright-config';
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { Locator, Page } from '@playwright/test';
|
|
2
2
|
export declare function inviteUserTest(page: Page, inviteModal: Locator): Promise<void>;
|
|
3
3
|
export declare function navigateToAccountComponent(page: Page, profileBtn: Locator): Promise<Locator>;
|
|
4
|
+
/**
|
|
5
|
+
* Click a report card's primary action and confirm the date-range picker, so callers
|
|
6
|
+
* always end up in the post-generation state.
|
|
7
|
+
*
|
|
8
|
+
* Prefers the "Regenerate report" button when present (completed reports) because the plain
|
|
9
|
+
* "Download report" button on a completed card re-downloads the existing URL and skips the
|
|
10
|
+
* picker. When no Regenerate button exists, clicks "Download report" — which on a
|
|
11
|
+
* non-completed card also opens the picker.
|
|
12
|
+
*
|
|
13
|
+
* Either way we wait for the picker and click Generate/Regenerate to start the report.
|
|
14
|
+
*/
|
|
15
|
+
export declare function triggerReportFromCard(page: Page, card: Locator): Promise<void>;
|
|
4
16
|
export declare function navigateToDataReports(page: Page): Promise<void>;
|
|
5
17
|
export declare function shouldDisplayReportCards(page: Page, REPORT_CARDS: {
|
|
6
18
|
name: string;
|