@alfresco/aca-playwright-shared 7.3.0-22136719683 → 7.3.0-22180783554
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/fesm2022/alfresco-aca-playwright-shared.mjs +68 -118
- package/fesm2022/alfresco-aca-playwright-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/page-objects/components/index.d.ts +1 -1
- package/page-objects/components/manageRules/manage-rules.component.d.ts +1 -1
- package/page-objects/components/search/search-filters/search-filters-date.component.d.ts +1 -26
- package/page-objects/components/search/{search-overlay.components.d.ts → search-in-dialog.components.d.ts} +10 -13
- package/page-objects/components/search/search-input.component.d.ts +3 -2
- package/page-objects/pages/search.page.d.ts +3 -3
|
@@ -1197,7 +1197,7 @@ class DataTableComponent extends BaseComponent {
|
|
|
1197
1197
|
return this.getRowByName(name).locator('.aca-location-link');
|
|
1198
1198
|
}
|
|
1199
1199
|
async getItemLocationText(name) {
|
|
1200
|
-
await this.getItemLocationEl(name).
|
|
1200
|
+
await this.getItemLocationEl(name).waitFor({ state: 'attached' });
|
|
1201
1201
|
return this.getItemLocationEl(name).innerText();
|
|
1202
1202
|
}
|
|
1203
1203
|
async getItemLocationTooltip(name) {
|
|
@@ -2158,19 +2158,19 @@ class FolderInformationDialogComponent extends BaseComponent {
|
|
|
2158
2158
|
constructor(page) {
|
|
2159
2159
|
super(page, FolderInformationDialogComponent.rootElement);
|
|
2160
2160
|
}
|
|
2161
|
-
folderName = this.getChild('.aca-
|
|
2161
|
+
folderName = this.getChild('.aca-node-info-header');
|
|
2162
2162
|
doneButton = this.getChild('[data-automation-id="adf-dialog-actions-confirm"]');
|
|
2163
|
-
folderNumberOfFiles = this.getChild('[data-automation-id="
|
|
2164
|
-
folderSize = this.getChild('[data-automation-id="
|
|
2165
|
-
folderLocation = this.getChild('[data-automation-id="
|
|
2166
|
-
folderCreationDate = this.getChild('[data-automation-id="
|
|
2167
|
-
folderModifiedDate = this.getChild('[data-automation-id="
|
|
2163
|
+
folderNumberOfFiles = this.getChild('[data-automation-id="node-info-number-of-files"]');
|
|
2164
|
+
folderSize = this.getChild('[data-automation-id="node-info-size"]');
|
|
2165
|
+
folderLocation = this.getChild('[data-automation-id="node-info-location"]');
|
|
2166
|
+
folderCreationDate = this.getChild('[data-automation-id="node-info-creation-date"]');
|
|
2167
|
+
folderModifiedDate = this.getChild('[data-automation-id="node-info-modify-date"]');
|
|
2168
2168
|
async getFolderSizeNumber() {
|
|
2169
2169
|
const textContent = await this.folderSize.textContent();
|
|
2170
2170
|
if (!textContent) {
|
|
2171
2171
|
throw new Error('Folder size text content is null or undefined');
|
|
2172
2172
|
}
|
|
2173
|
-
return
|
|
2173
|
+
return parseFloat(textContent.trim().split(/\s+/)[0].replace(/,/g, ''));
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
2176
2176
|
|
|
@@ -2293,7 +2293,7 @@ class ManageRules extends BaseComponent {
|
|
|
2293
2293
|
ruleDetailsEditButton = this.getChild('#edit-rule-btn');
|
|
2294
2294
|
ruleDetailsWhenText = this.getChild('[data-automation-id="rule-details-triggers-component"]');
|
|
2295
2295
|
ruleDetailsPerformActionsDiv = this.getChild('adf-card-view-selectitem [data-automation-id="select-box"]');
|
|
2296
|
-
|
|
2296
|
+
rulesEmptyList = this.getChild('adf-empty-content');
|
|
2297
2297
|
ruleActions = this.getChild('aca-rule-action');
|
|
2298
2298
|
ruleConditionsInGroup = this.getChild('aca-rule-composite-condition aca-rule-simple-condition');
|
|
2299
2299
|
ruleDescription = this.getChild('.aca-manage-rules__container__rule-details__header__title__description');
|
|
@@ -2307,7 +2307,7 @@ class ManageRules extends BaseComponent {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
2309
|
async checkIfRuleListEmpty() {
|
|
2310
|
-
return this.
|
|
2310
|
+
return this.rulesEmptyList.isVisible();
|
|
2311
2311
|
}
|
|
2312
2312
|
async checkIfRuleIsOnTheList(ruleName) {
|
|
2313
2313
|
await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
|
|
@@ -2970,10 +2970,11 @@ class ViewerComponent extends BaseComponent {
|
|
|
2970
2970
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
2971
2971
|
*/
|
|
2972
2972
|
class SearchInputComponent extends BaseComponent {
|
|
2973
|
-
static rootElement = 'aca-
|
|
2974
|
-
searchInput = this.
|
|
2975
|
-
searchButton = this.
|
|
2976
|
-
searchCloseButton = this.
|
|
2973
|
+
static rootElement = '.aca-content-header';
|
|
2974
|
+
searchInput = this.getChild('aca-search-input input');
|
|
2975
|
+
searchButton = this.getChild('button[title="Search"]');
|
|
2976
|
+
searchCloseButton = this.getChild('.aca-search-input--close-button');
|
|
2977
|
+
searchInButton = this.getChild('aca-search-in-menu button');
|
|
2977
2978
|
/**
|
|
2978
2979
|
* Method used in cases where user have possibility to navigate "inside" the element (it's clickable and has link attribute).
|
|
2979
2980
|
* Perform action .click() to navigate inside it
|
|
@@ -2984,10 +2985,9 @@ class SearchInputComponent extends BaseComponent {
|
|
|
2984
2985
|
constructor(page, rootElement = SearchInputComponent.rootElement) {
|
|
2985
2986
|
super(page, rootElement);
|
|
2986
2987
|
}
|
|
2987
|
-
async
|
|
2988
|
-
await this.
|
|
2989
|
-
await this.
|
|
2990
|
-
await this.spinnerWaitForReload();
|
|
2988
|
+
async searchFor(searchText) {
|
|
2989
|
+
await this.searchInput.fill(searchText);
|
|
2990
|
+
await this.searchButton.click();
|
|
2991
2991
|
}
|
|
2992
2992
|
}
|
|
2993
2993
|
|
|
@@ -3014,59 +3014,56 @@ class SearchInputComponent extends BaseComponent {
|
|
|
3014
3014
|
* You should have received a copy of the GNU Lesser General Public License
|
|
3015
3015
|
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
|
3016
3016
|
*/
|
|
3017
|
-
class
|
|
3018
|
-
static rootElement = '.
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
constructor(page, rootElement = SearchOverlayComponent.rootElement) {
|
|
3017
|
+
class SearchInDialogComponent extends BaseComponent {
|
|
3018
|
+
static rootElement = '.aca-search-in-panel';
|
|
3019
|
+
filesAndFoldersRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Files and folders');
|
|
3020
|
+
librariesRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Libraries');
|
|
3021
|
+
filesCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Files');
|
|
3022
|
+
foldersCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Folders');
|
|
3023
|
+
applyButton = this.getChild('button', { hasText: 'Apply' });
|
|
3024
|
+
resetButton = this.getChild('button', { hasText: 'Reset' });
|
|
3025
|
+
constructor(page, rootElement = SearchInDialogComponent.rootElement) {
|
|
3027
3026
|
super(page, rootElement);
|
|
3028
3027
|
}
|
|
3029
3028
|
async isFoldersOptionChecked() {
|
|
3030
|
-
return this.
|
|
3029
|
+
return this.foldersCheckbox.isChecked();
|
|
3031
3030
|
}
|
|
3032
3031
|
async isFilesOptionChecked() {
|
|
3033
|
-
return this.
|
|
3032
|
+
return this.filesCheckbox.isChecked();
|
|
3034
3033
|
}
|
|
3035
|
-
async
|
|
3036
|
-
|
|
3034
|
+
async resetOptions() {
|
|
3035
|
+
await this.resetButton.click();
|
|
3037
3036
|
}
|
|
3038
|
-
async
|
|
3037
|
+
async checkOnlyFolders() {
|
|
3038
|
+
await this.resetOptions();
|
|
3039
3039
|
if (await this.isFilesOptionChecked()) {
|
|
3040
|
-
await this.
|
|
3040
|
+
await this.filesCheckbox.click();
|
|
3041
3041
|
}
|
|
3042
|
-
if (await this.isFoldersOptionChecked()) {
|
|
3043
|
-
await this.
|
|
3044
|
-
}
|
|
3045
|
-
if (await this.isLibrariesOptionChecked()) {
|
|
3046
|
-
await this.searchLibrariesOption.click();
|
|
3042
|
+
if (!(await this.isFoldersOptionChecked())) {
|
|
3043
|
+
await this.foldersCheckbox.click();
|
|
3047
3044
|
}
|
|
3048
3045
|
}
|
|
3049
|
-
async checkOnlyFolders() {
|
|
3050
|
-
await this.clearOptions();
|
|
3051
|
-
await this.searchFoldersOption.click();
|
|
3052
|
-
}
|
|
3053
3046
|
async checkOnlyFiles() {
|
|
3054
|
-
await this.
|
|
3055
|
-
await this.
|
|
3047
|
+
await this.resetOptions();
|
|
3048
|
+
if (await this.isFoldersOptionChecked()) {
|
|
3049
|
+
await this.foldersCheckbox.click();
|
|
3050
|
+
}
|
|
3051
|
+
if (!(await this.isFilesOptionChecked())) {
|
|
3052
|
+
await this.filesCheckbox.click();
|
|
3053
|
+
}
|
|
3056
3054
|
}
|
|
3057
3055
|
async checkLibraries() {
|
|
3058
|
-
await this.
|
|
3059
|
-
await this.
|
|
3056
|
+
await this.resetOptions();
|
|
3057
|
+
await this.librariesRadioButton.click();
|
|
3060
3058
|
}
|
|
3061
3059
|
async checkFilesAndFolders() {
|
|
3062
|
-
await this.
|
|
3063
|
-
await this.
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
await this.searchButton.click({ force: true });
|
|
3060
|
+
await this.resetOptions();
|
|
3061
|
+
if (!(await this.isFilesOptionChecked())) {
|
|
3062
|
+
await this.filesCheckbox.click();
|
|
3063
|
+
}
|
|
3064
|
+
if (!(await this.isFoldersOptionChecked())) {
|
|
3065
|
+
await this.foldersCheckbox.click();
|
|
3066
|
+
}
|
|
3070
3067
|
}
|
|
3071
3068
|
}
|
|
3072
3069
|
|
|
@@ -3268,57 +3265,6 @@ class SearchFiltersDate extends BaseComponent {
|
|
|
3268
3265
|
}
|
|
3269
3266
|
await page.page.waitForTimeout(2000);
|
|
3270
3267
|
}
|
|
3271
|
-
/**
|
|
3272
|
-
* Method used in cases where we want to filter search results by Date
|
|
3273
|
-
*
|
|
3274
|
-
* @param searchPage page context for the test
|
|
3275
|
-
* @param filterType filter type for the Date filter
|
|
3276
|
-
* @param dateFilterTab tab in Date filter. Either Created or Modified
|
|
3277
|
-
* @param searchPhrase search phrase for the search
|
|
3278
|
-
* @param searchType type of items we want in search results e.g. files or folders
|
|
3279
|
-
* @param expectSearchResults expect a number of search results
|
|
3280
|
-
* @param inTheLastInputValue a value for 'in the last' input. e.g. in the last X days
|
|
3281
|
-
* @param startDay start day for time-frame search. DD-MMMM-YY
|
|
3282
|
-
* @param endDay end day for time-frame search. DD-MMMM-YY
|
|
3283
|
-
*/
|
|
3284
|
-
async filterFilesByDate(params) {
|
|
3285
|
-
const { searchPage, filterType, dateFilterTab, searchPhrase, searchType, expectSearchResults, inTheLastInputValue, startDay, endDay } = params;
|
|
3286
|
-
await searchPage.searchWithin(searchPhrase, searchType);
|
|
3287
|
-
await searchPage.dataTable.progressBarWaitForReload();
|
|
3288
|
-
await searchPage.searchFilters.dateFilter.click();
|
|
3289
|
-
if (dateFilterTab === 'Modified') {
|
|
3290
|
-
await searchPage.searchFiltersDate.openCreatedModifiedTab(searchPage, 'Modified');
|
|
3291
|
-
}
|
|
3292
|
-
switch (filterType) {
|
|
3293
|
-
case 'anytime':
|
|
3294
|
-
await searchPage.searchFiltersDate.anytimeButton.click();
|
|
3295
|
-
break;
|
|
3296
|
-
case 'inTheLast':
|
|
3297
|
-
await searchPage.searchFiltersDate.inTheLastButton.click();
|
|
3298
|
-
await searchPage.searchFiltersDate.inTheLastInput.fill(inTheLastInputValue);
|
|
3299
|
-
break;
|
|
3300
|
-
case 'between':
|
|
3301
|
-
await searchPage.searchFiltersDate.betweenButton.click();
|
|
3302
|
-
await searchPage.searchFiltersDate.betweenStartDate.fill(startDay);
|
|
3303
|
-
await searchPage.searchFiltersDate.betweenEndDate.fill(endDay);
|
|
3304
|
-
break;
|
|
3305
|
-
default:
|
|
3306
|
-
throw new Error('Invalid filter type');
|
|
3307
|
-
}
|
|
3308
|
-
await searchPage.searchFilters.menuCardApply.click();
|
|
3309
|
-
await searchPage.dataTable.progressBarWaitForReload();
|
|
3310
|
-
expect(await searchPage.dataTable.getRowsCount()).toEqual(expectSearchResults);
|
|
3311
|
-
let dateText;
|
|
3312
|
-
if (filterType === 'between') {
|
|
3313
|
-
if (dateFilterTab === 'Modified') {
|
|
3314
|
-
dateText = `Modified: ${startDay} - ${endDay}`;
|
|
3315
|
-
}
|
|
3316
|
-
else {
|
|
3317
|
-
dateText = `Created: ${startDay} - ${endDay}`;
|
|
3318
|
-
}
|
|
3319
|
-
await expect(searchPage.searchFilters.dateFilter).toContainText(dateText, { ignoreCase: true });
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
3268
|
async isModifiedTabSelected() {
|
|
3323
3269
|
return this.modifiedTab.getAttribute('aria-selected');
|
|
3324
3270
|
}
|
|
@@ -4144,8 +4090,8 @@ class SearchPage extends BasePage {
|
|
|
4144
4090
|
folderDialog = new AdfFolderDialogComponent(this.page);
|
|
4145
4091
|
dataTable = new DataTableComponent(this.page);
|
|
4146
4092
|
viewer = new ViewerComponent(this.page);
|
|
4147
|
-
|
|
4148
|
-
|
|
4093
|
+
searchInputComponent = new SearchInputComponent(this.page);
|
|
4094
|
+
searchInDialog = new SearchInDialogComponent(this.page);
|
|
4149
4095
|
searchSortingPicker = new SearchSortingPicker(this.page);
|
|
4150
4096
|
searchFilters = new SearchFilters(this.page);
|
|
4151
4097
|
searchFiltersTags = new SearchFiltersTags(this.page);
|
|
@@ -4160,29 +4106,33 @@ class SearchPage extends BasePage {
|
|
|
4160
4106
|
manageVersionsDialog = new ManageVersionsDialog(this.page);
|
|
4161
4107
|
folderInformationDialog = new FolderInformationDialogComponent(this.page);
|
|
4162
4108
|
async searchWithin(searchText, searchType) {
|
|
4163
|
-
await this.
|
|
4164
|
-
|
|
4109
|
+
if (!(await this.searchInputComponent.searchInput.isVisible())) {
|
|
4110
|
+
await this.acaHeader.searchButton.click();
|
|
4111
|
+
}
|
|
4112
|
+
await this.searchInputComponent.searchInButton.click();
|
|
4165
4113
|
switch (searchType) {
|
|
4166
4114
|
case 'files':
|
|
4167
|
-
await this.
|
|
4115
|
+
await this.searchInDialog.checkOnlyFiles();
|
|
4168
4116
|
break;
|
|
4169
4117
|
case 'folders':
|
|
4170
|
-
await this.
|
|
4118
|
+
await this.searchInDialog.checkOnlyFolders();
|
|
4171
4119
|
break;
|
|
4172
4120
|
case 'filesAndFolders':
|
|
4173
|
-
await this.
|
|
4121
|
+
await this.searchInDialog.checkFilesAndFolders();
|
|
4174
4122
|
break;
|
|
4175
4123
|
case 'libraries':
|
|
4176
|
-
await this.
|
|
4124
|
+
await this.searchInDialog.checkLibraries();
|
|
4177
4125
|
break;
|
|
4178
4126
|
default:
|
|
4179
4127
|
break;
|
|
4180
4128
|
}
|
|
4181
|
-
await this.
|
|
4129
|
+
await this.searchInDialog.applyButton.click();
|
|
4130
|
+
await this.clickSearchButton();
|
|
4131
|
+
await this.searchInputComponent.searchFor(searchText);
|
|
4182
4132
|
await this.dataTable.progressBarWaitForReload();
|
|
4183
4133
|
}
|
|
4184
4134
|
async clickSearchButton() {
|
|
4185
|
-
await this.
|
|
4135
|
+
await this.searchInputComponent.searchButton.click({ force: true });
|
|
4186
4136
|
}
|
|
4187
4137
|
}
|
|
4188
4138
|
|
|
@@ -4647,7 +4597,7 @@ const getGlobalConfig = {
|
|
|
4647
4597
|
testMatch: ['**/*.e2e.ts'],
|
|
4648
4598
|
use: {
|
|
4649
4599
|
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
|
4650
|
-
actionTimeout:
|
|
4600
|
+
actionTimeout: 40 * 1000,
|
|
4651
4601
|
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
4652
4602
|
baseURL: env.PLAYWRIGHT_E2E_HOST,
|
|
4653
4603
|
headless: env.PLAYWRIGHT_HEADLESS === 'true' || !!env.CI,
|
|
@@ -7413,5 +7363,5 @@ const TEST_FILES = {
|
|
|
7413
7363
|
* Generated bundle index. Do not edit.
|
|
7414
7364
|
*/
|
|
7415
7365
|
|
|
7416
|
-
export { APP_ROUTES, AcaHeader, ActionType, ActionTypes, ActionsDropdownComponent, AdfConfirmDialogComponent, AdfDeleteTrashComponent, AdfFolderDialogComponent, AdfInfoDrawerComponent, AdfLibraryDialogComponent, ApiClientFactory, BaseComponent, BasePage, Breadcrumb, CategoriesApi, Comparator, ConditionComponent, ConditionsTypes, ContentNodeSelectorDialog, CreateFromTemplateDialogComponent, DataTableComponent, DateTimePicker, EditDialog, ErrorComponent, FavoritesLibrariesPage, FavoritesPage, FavoritesPageApi, Field, FileActionsApi, FolderInformationDialogComponent, GenericLogger, LinkRulesDialog, LogLevelsEnum, LoginPage, ManageRules, ManageRulesDialogComponent, ManageVersionsDialog, MatMenuComponent, MimeType, MyLibrariesPage, NodesApi, NodesPage, PaginationActionsType, PaginationComponent, PasswordOverlayDialogComponent, Person, PersonalFilesPage, QueriesApi, RecentFilesPage, RulesApi, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags,
|
|
7366
|
+
export { APP_ROUTES, AcaHeader, ActionType, ActionTypes, ActionsDropdownComponent, AdfConfirmDialogComponent, AdfDeleteTrashComponent, AdfFolderDialogComponent, AdfInfoDrawerComponent, AdfLibraryDialogComponent, ApiClientFactory, BaseComponent, BasePage, Breadcrumb, CategoriesApi, Comparator, ConditionComponent, ConditionsTypes, ContentNodeSelectorDialog, CreateFromTemplateDialogComponent, DataTableComponent, DateTimePicker, EditDialog, ErrorComponent, FavoritesLibrariesPage, FavoritesPage, FavoritesPageApi, Field, FileActionsApi, FolderInformationDialogComponent, GenericLogger, LinkRulesDialog, LogLevelsEnum, LoginPage, ManageRules, ManageRulesDialogComponent, ManageVersionsDialog, MatMenuComponent, MimeType, MyLibrariesPage, NodesApi, NodesPage, PaginationActionsType, PaginationComponent, PasswordOverlayDialogComponent, Person, PersonalFilesPage, QueriesApi, RecentFilesPage, RulesApi, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags, SearchInDialogComponent, SearchInputComponent, SearchPage, SearchPageApi, SearchSortingPicker, ShareDialogComponent, SharedLinksApi, SharedPage, SidenavComponent, SitesApi, SnackBarComponent, SpinnerComponent, TEST_FILES, TagsApi, ToolbarComponent, TrashPage, TrashcanApi, UploadDialog, UploadNewVersionDialog, UserModel, Utils, ViewerComponent, ViewerOverlayDialogComponent, collaboratorDocToolbarMore, collaboratorEditRowToolbarMore, collaboratorLockCurrentUserToolbarMore, collaboratorLockOtherUserSearchToolbarMore, collaboratorLockOtherUserToolbarMore, collaboratorSharedToolbarPrimary, collaboratorToolbarPrimary, createSuiteProjects, errorColor, errorStrings, favoritesCollaboratorToolbarMore, file, fileDocx, fileDocxFav, fileDocxShared, fileDocxSharedFav, fileFav, fileFavLocked, fileGranularPermission, fileLocked, fileLockedByUser, fileShared, fileSharedFav, fileSharedFavLocked, fileSharedLocked, flattenNodeContentTree, folder, folderFav, folderFav2, folderFavFile, folderFile, getBrowserProjects, getExcludedTestsRegExpArray, getGlobalConfig, getUserState, infoColor, libraryErrors, logColor, logLevels, multipleSel, multipleSelAllFav, multipleSelFile, paths, random$1 as random, test, testEmailDomain, timeouts, users, waitForApi, warnColor };
|
|
7417
7367
|
//# sourceMappingURL=alfresco-aca-playwright-shared.mjs.map
|