@alfresco/aca-playwright-shared 7.3.0 → 7.4.0-22991957830

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.
@@ -2164,7 +2164,7 @@ class ManageRules extends BaseComponent {
2164
2164
  ruleDetailsDeleteButton = this.getChild('#delete-rule-btn');
2165
2165
  ruleDetailsEditButton = this.getChild('#edit-rule-btn');
2166
2166
  ruleDetailsPerformActionsDiv = this.getChild('adf-card-view-selectitem [data-automation-id="select-box"]');
2167
- rulesEmptyListTitle = this.getChild('.adf-empty-content__title');
2167
+ rulesEmptyList = this.getChild('adf-empty-content');
2168
2168
  ruleActions = this.getChild('aca-rule-action');
2169
2169
  ruleConditionsInGroup = this.getChild('aca-rule-composite-condition aca-rule-simple-condition');
2170
2170
  ruleDescription = this.getChild('.aca-manage-rules__container__rule-details__header__title__description');
@@ -2178,7 +2178,7 @@ class ManageRules extends BaseComponent {
2178
2178
  }
2179
2179
  }
2180
2180
  async checkIfRuleListEmpty() {
2181
- return this.rulesEmptyListTitle.isVisible();
2181
+ return this.rulesEmptyList.isVisible();
2182
2182
  }
2183
2183
  async checkIfRuleIsOnTheList(ruleName) {
2184
2184
  await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
@@ -3229,8 +3229,10 @@ class SearchFilters extends BaseComponent {
3229
3229
  */
3230
3230
  class SearchInputComponent extends BaseComponent {
3231
3231
  static rootElement = 'aca-page-layout';
3232
+ searchInput = this.getChild('aca-search-input input');
3232
3233
  searchButton = this.page.locator('.aca-search-input--search-button');
3233
3234
  searchCloseButton = this.page.locator('.aca-search-input--close-button');
3235
+ searchInButton = this.getChild('aca-search-in-menu button');
3234
3236
  /**
3235
3237
  * Method used in cases where user have possibility to navigate "inside" the element (it's clickable and has link attribute).
3236
3238
  * Perform action .click() to navigate inside it
@@ -3241,10 +3243,9 @@ class SearchInputComponent extends BaseComponent {
3241
3243
  constructor(page, rootElement = SearchInputComponent.rootElement) {
3242
3244
  super(page, rootElement);
3243
3245
  }
3244
- async performDoubleClickFolderOrFileToOpen(name) {
3245
- await this.getCellLinkByName(name).waitFor({ state: 'visible', timeout: timeouts.medium });
3246
- await this.getCellLinkByName(name).dblclick();
3247
- await this.spinnerWaitForReload();
3246
+ async searchFor(searchText) {
3247
+ await this.searchInput.fill(searchText);
3248
+ await this.searchButton.click();
3248
3249
  }
3249
3250
  }
3250
3251
 
@@ -3282,85 +3283,6 @@ class SearchMenuCard extends BaseComponent {
3282
3283
  }
3283
3284
  }
3284
3285
 
3285
- /*!
3286
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
3287
- *
3288
- * Alfresco Example Content Application
3289
- *
3290
- * This file is part of the Alfresco Example Content Application.
3291
- * If the software was purchased under a paid Alfresco license, the terms of
3292
- * the paid license agreement will prevail. Otherwise, the software is
3293
- * provided under the following open source license terms:
3294
- *
3295
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
3296
- * it under the terms of the GNU Lesser General Public License as published by
3297
- * the Free Software Foundation, either version 3 of the License, or
3298
- * (at your option) any later version.
3299
- *
3300
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
3301
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3302
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3303
- * GNU Lesser General Public License for more details.
3304
- *
3305
- * You should have received a copy of the GNU Lesser General Public License
3306
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
3307
- */
3308
- class SearchOverlayComponent extends BaseComponent {
3309
- static rootElement = '.cdk-overlay-pane';
3310
- searchFilesOption = this.getChild('input#content-input');
3311
- searchFoldersOption = this.getChild('input#folder-input');
3312
- searchLibrariesOption = this.getChild('input#libraries-input');
3313
- searchInput = this.page.locator('#app-control-input');
3314
- searchButton = this.page.locator('app-search-input-control button[title="Search"]');
3315
- searchInputControl = this.page.locator('.app-search-control');
3316
- searchOptions = this.page.locator('.app-search-options');
3317
- constructor(page, rootElement = SearchOverlayComponent.rootElement) {
3318
- super(page, rootElement);
3319
- }
3320
- async isFoldersOptionChecked() {
3321
- return this.searchFoldersOption.isChecked();
3322
- }
3323
- async isFilesOptionChecked() {
3324
- return this.searchFilesOption.isChecked();
3325
- }
3326
- async isLibrariesOptionChecked() {
3327
- return this.searchLibrariesOption.isChecked();
3328
- }
3329
- async clearOptions() {
3330
- if (await this.isFilesOptionChecked()) {
3331
- await this.searchFilesOption.click();
3332
- }
3333
- if (await this.isFoldersOptionChecked()) {
3334
- await this.searchFoldersOption.click();
3335
- }
3336
- if (await this.isLibrariesOptionChecked()) {
3337
- await this.searchLibrariesOption.click();
3338
- }
3339
- }
3340
- async checkOnlyFolders() {
3341
- await this.clearOptions();
3342
- await this.searchFoldersOption.click();
3343
- }
3344
- async checkOnlyFiles() {
3345
- await this.clearOptions();
3346
- await this.searchFilesOption.click();
3347
- }
3348
- async checkLibraries() {
3349
- await this.clearOptions();
3350
- await this.searchLibrariesOption.click();
3351
- }
3352
- async checkFilesAndFolders() {
3353
- await this.clearOptions();
3354
- await this.searchFilesOption.click();
3355
- await this.searchFoldersOption.click();
3356
- }
3357
- async searchFor(input) {
3358
- await this.searchInput.clear();
3359
- await this.searchInput.fill(input);
3360
- await this.searchButton.click({ force: true });
3361
- }
3362
- }
3363
-
3364
3286
  /*!
3365
3287
  * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
3366
3288
  *
@@ -4036,6 +3958,82 @@ class SharedPage extends BasePage {
4036
3958
  manageVersionsDialog = new ManageVersionsDialog(this.page);
4037
3959
  }
4038
3960
 
3961
+ /*!
3962
+ * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
3963
+ *
3964
+ * Alfresco Example Content Application
3965
+ *
3966
+ * This file is part of the Alfresco Example Content Application.
3967
+ * If the software was purchased under a paid Alfresco license, the terms of
3968
+ * the paid license agreement will prevail. Otherwise, the software is
3969
+ * provided under the following open source license terms:
3970
+ *
3971
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
3972
+ * it under the terms of the GNU Lesser General Public License as published by
3973
+ * the Free Software Foundation, either version 3 of the License, or
3974
+ * (at your option) any later version.
3975
+ *
3976
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
3977
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3978
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3979
+ * GNU Lesser General Public License for more details.
3980
+ *
3981
+ * You should have received a copy of the GNU Lesser General Public License
3982
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
3983
+ */
3984
+ class SearchInDialogComponent extends BaseComponent {
3985
+ static rootElement = '.aca-search-in-panel';
3986
+ filesAndFoldersRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Files and folders');
3987
+ librariesRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Libraries');
3988
+ filesCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Files');
3989
+ foldersCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Folders');
3990
+ applyButton = this.getChild('button', { hasText: 'Apply' });
3991
+ resetButton = this.getChild('button', { hasText: 'Reset' });
3992
+ constructor(page, rootElement = SearchInDialogComponent.rootElement) {
3993
+ super(page, rootElement);
3994
+ }
3995
+ async isFoldersOptionChecked() {
3996
+ return this.foldersCheckbox.isChecked();
3997
+ }
3998
+ async isFilesOptionChecked() {
3999
+ return this.filesCheckbox.isChecked();
4000
+ }
4001
+ async resetOptions() {
4002
+ await this.resetButton.click();
4003
+ }
4004
+ async checkOnlyFolders() {
4005
+ await this.resetOptions();
4006
+ if (await this.isFilesOptionChecked()) {
4007
+ await this.filesCheckbox.click();
4008
+ }
4009
+ if (!(await this.isFoldersOptionChecked())) {
4010
+ await this.foldersCheckbox.click();
4011
+ }
4012
+ }
4013
+ async checkOnlyFiles() {
4014
+ await this.resetOptions();
4015
+ if (await this.isFoldersOptionChecked()) {
4016
+ await this.foldersCheckbox.click();
4017
+ }
4018
+ if (!(await this.isFilesOptionChecked())) {
4019
+ await this.filesCheckbox.click();
4020
+ }
4021
+ }
4022
+ async checkLibraries() {
4023
+ await this.resetOptions();
4024
+ await this.librariesRadioButton.click();
4025
+ }
4026
+ async checkFilesAndFolders() {
4027
+ await this.resetOptions();
4028
+ if (!(await this.isFilesOptionChecked())) {
4029
+ await this.filesCheckbox.click();
4030
+ }
4031
+ if (!(await this.isFoldersOptionChecked())) {
4032
+ await this.foldersCheckbox.click();
4033
+ }
4034
+ }
4035
+ }
4036
+
4039
4037
  /*!
4040
4038
  * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
4041
4039
  *
@@ -4069,8 +4067,8 @@ class SearchPage extends BasePage {
4069
4067
  folderDialog = new AdfFolderDialogComponent(this.page);
4070
4068
  dataTable = new DataTableComponent(this.page);
4071
4069
  viewer = new ViewerComponent(this.page);
4072
- searchInput = new SearchInputComponent(this.page);
4073
- searchOverlay = new SearchOverlayComponent(this.page);
4070
+ searchInputComponent = new SearchInputComponent(this.page);
4071
+ searchInDialog = new SearchInDialogComponent(this.page);
4074
4072
  searchSortingPicker = new SearchSortingPicker(this.page);
4075
4073
  searchFilters = new SearchFilters(this.page);
4076
4074
  searchFiltersTags = new SearchFiltersTags(this.page);
@@ -4086,29 +4084,33 @@ class SearchPage extends BasePage {
4086
4084
  folderInformationDialog = new FolderInformationDialogComponent(this.page);
4087
4085
  searchMenuCard = new SearchMenuCard(this.page);
4088
4086
  async searchWithin(searchText, searchType) {
4089
- await this.acaHeader.searchButton.click();
4090
- await this.clickSearchButton();
4087
+ if (!(await this.searchInputComponent.searchInput.isVisible())) {
4088
+ await this.acaHeader.searchButton.click();
4089
+ }
4090
+ await this.searchInputComponent.searchInButton.click();
4091
4091
  switch (searchType) {
4092
4092
  case 'files':
4093
- await this.searchOverlay.checkOnlyFiles();
4093
+ await this.searchInDialog.checkOnlyFiles();
4094
4094
  break;
4095
4095
  case 'folders':
4096
- await this.searchOverlay.checkOnlyFolders();
4096
+ await this.searchInDialog.checkOnlyFolders();
4097
4097
  break;
4098
4098
  case 'filesAndFolders':
4099
- await this.searchOverlay.checkFilesAndFolders();
4099
+ await this.searchInDialog.checkFilesAndFolders();
4100
4100
  break;
4101
4101
  case 'libraries':
4102
- await this.searchOverlay.checkLibraries();
4102
+ await this.searchInDialog.checkLibraries();
4103
4103
  break;
4104
4104
  default:
4105
4105
  break;
4106
4106
  }
4107
- await this.searchOverlay.searchFor(searchText);
4107
+ await this.searchInDialog.applyButton.click();
4108
+ await this.clickSearchButton();
4109
+ await this.searchInputComponent.searchFor(searchText);
4108
4110
  await this.dataTable.progressBarWaitForReload();
4109
4111
  }
4110
4112
  async clickSearchButton() {
4111
- await this.searchInput.searchButton.click({ force: true });
4113
+ await this.searchInputComponent.searchButton.click({ force: true });
4112
4114
  }
4113
4115
  }
4114
4116
 
@@ -4573,7 +4575,7 @@ const getGlobalConfig = {
4573
4575
  testMatch: ['**/*.e2e.ts'],
4574
4576
  use: {
4575
4577
  /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4576
- actionTimeout: 0,
4578
+ actionTimeout: 40 * 1000,
4577
4579
  /* Base URL to use in actions like `await page.goto('/')`. */
4578
4580
  baseURL: env.PLAYWRIGHT_E2E_HOST,
4579
4581
  headless: env.PLAYWRIGHT_HEADLESS === 'true' || !!env.CI,
@@ -7339,5 +7341,5 @@ const TEST_FILES = {
7339
7341
  * Generated bundle index. Do not edit.
7340
7342
  */
7341
7343
 
7342
- 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, RulesToolbarComponent, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags, SearchInputComponent, SearchMenuCard, SearchOverlayComponent, SearchPage, SearchPageApi, SearchSortingPicker, ShareDialogComponent, SharedLinksApi, SharedPage, SidenavComponent, SitesApi, SnackBarComponent, SpinnerComponent, TEST_FILES, TagsApi, 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 };
7344
+ 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, RulesToolbarComponent, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags, SearchInputComponent, SearchMenuCard, SearchPage, SearchPageApi, SearchSortingPicker, ShareDialogComponent, SharedLinksApi, SharedPage, SidenavComponent, SitesApi, SnackBarComponent, SpinnerComponent, TEST_FILES, TagsApi, 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 };
7343
7345
  //# sourceMappingURL=alfresco-aca-playwright-shared.mjs.map