@alfresco/aca-playwright-shared 7.3.0-22137867753 → 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.
@@ -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
- rulesEmptyListTitle = this.getChild('.adf-empty-content__title');
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.rulesEmptyListTitle.isVisible();
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-page-layout';
2974
- searchInput = this.page.locator('#app-control-input');
2975
- searchButton = this.page.locator('.aca-search-input--search-button');
2976
- searchCloseButton = this.page.locator('.aca-search-input--close-button');
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 performDoubleClickFolderOrFileToOpen(name) {
2988
- await this.getCellLinkByName(name).waitFor({ state: 'visible', timeout: timeouts.medium });
2989
- await this.getCellLinkByName(name).dblclick();
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 SearchOverlayComponent extends BaseComponent {
3018
- static rootElement = '.cdk-overlay-pane';
3019
- searchFilesOption = this.getChild('input#content-input');
3020
- searchFoldersOption = this.getChild('input#folder-input');
3021
- searchLibrariesOption = this.getChild('input#libraries-input');
3022
- searchInput = this.page.locator('#app-control-input');
3023
- searchButton = this.page.locator('app-search-input-control button[title="Search"]');
3024
- searchInputControl = this.page.locator('.app-search-control');
3025
- searchOptions = this.page.locator('.app-search-options');
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.searchFoldersOption.isChecked();
3029
+ return this.foldersCheckbox.isChecked();
3031
3030
  }
3032
3031
  async isFilesOptionChecked() {
3033
- return this.searchFilesOption.isChecked();
3032
+ return this.filesCheckbox.isChecked();
3034
3033
  }
3035
- async isLibrariesOptionChecked() {
3036
- return this.searchLibrariesOption.isChecked();
3034
+ async resetOptions() {
3035
+ await this.resetButton.click();
3037
3036
  }
3038
- async clearOptions() {
3037
+ async checkOnlyFolders() {
3038
+ await this.resetOptions();
3039
3039
  if (await this.isFilesOptionChecked()) {
3040
- await this.searchFilesOption.click();
3040
+ await this.filesCheckbox.click();
3041
3041
  }
3042
- if (await this.isFoldersOptionChecked()) {
3043
- await this.searchFoldersOption.click();
3042
+ if (!(await this.isFoldersOptionChecked())) {
3043
+ await this.foldersCheckbox.click();
3044
3044
  }
3045
- if (await this.isLibrariesOptionChecked()) {
3046
- await this.searchLibrariesOption.click();
3047
- }
3048
- }
3049
- async checkOnlyFolders() {
3050
- await this.clearOptions();
3051
- await this.searchFoldersOption.click();
3052
3045
  }
3053
3046
  async checkOnlyFiles() {
3054
- await this.clearOptions();
3055
- await this.searchFilesOption.click();
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.clearOptions();
3059
- await this.searchLibrariesOption.click();
3056
+ await this.resetOptions();
3057
+ await this.librariesRadioButton.click();
3060
3058
  }
3061
3059
  async checkFilesAndFolders() {
3062
- await this.clearOptions();
3063
- await this.searchFilesOption.click();
3064
- await this.searchFoldersOption.click();
3065
- }
3066
- async searchFor(input) {
3067
- await this.searchInput.clear();
3068
- await this.searchInput.fill(input);
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
 
@@ -4093,8 +4090,8 @@ class SearchPage extends BasePage {
4093
4090
  folderDialog = new AdfFolderDialogComponent(this.page);
4094
4091
  dataTable = new DataTableComponent(this.page);
4095
4092
  viewer = new ViewerComponent(this.page);
4096
- searchInput = new SearchInputComponent(this.page);
4097
- searchOverlay = new SearchOverlayComponent(this.page);
4093
+ searchInputComponent = new SearchInputComponent(this.page);
4094
+ searchInDialog = new SearchInDialogComponent(this.page);
4098
4095
  searchSortingPicker = new SearchSortingPicker(this.page);
4099
4096
  searchFilters = new SearchFilters(this.page);
4100
4097
  searchFiltersTags = new SearchFiltersTags(this.page);
@@ -4109,29 +4106,33 @@ class SearchPage extends BasePage {
4109
4106
  manageVersionsDialog = new ManageVersionsDialog(this.page);
4110
4107
  folderInformationDialog = new FolderInformationDialogComponent(this.page);
4111
4108
  async searchWithin(searchText, searchType) {
4112
- await this.acaHeader.searchButton.click();
4113
- await this.clickSearchButton();
4109
+ if (!(await this.searchInputComponent.searchInput.isVisible())) {
4110
+ await this.acaHeader.searchButton.click();
4111
+ }
4112
+ await this.searchInputComponent.searchInButton.click();
4114
4113
  switch (searchType) {
4115
4114
  case 'files':
4116
- await this.searchOverlay.checkOnlyFiles();
4115
+ await this.searchInDialog.checkOnlyFiles();
4117
4116
  break;
4118
4117
  case 'folders':
4119
- await this.searchOverlay.checkOnlyFolders();
4118
+ await this.searchInDialog.checkOnlyFolders();
4120
4119
  break;
4121
4120
  case 'filesAndFolders':
4122
- await this.searchOverlay.checkFilesAndFolders();
4121
+ await this.searchInDialog.checkFilesAndFolders();
4123
4122
  break;
4124
4123
  case 'libraries':
4125
- await this.searchOverlay.checkLibraries();
4124
+ await this.searchInDialog.checkLibraries();
4126
4125
  break;
4127
4126
  default:
4128
4127
  break;
4129
4128
  }
4130
- await this.searchOverlay.searchFor(searchText);
4129
+ await this.searchInDialog.applyButton.click();
4130
+ await this.clickSearchButton();
4131
+ await this.searchInputComponent.searchFor(searchText);
4131
4132
  await this.dataTable.progressBarWaitForReload();
4132
4133
  }
4133
4134
  async clickSearchButton() {
4134
- await this.searchInput.searchButton.click({ force: true });
4135
+ await this.searchInputComponent.searchButton.click({ force: true });
4135
4136
  }
4136
4137
  }
4137
4138
 
@@ -4596,7 +4597,7 @@ const getGlobalConfig = {
4596
4597
  testMatch: ['**/*.e2e.ts'],
4597
4598
  use: {
4598
4599
  /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4599
- actionTimeout: 0,
4600
+ actionTimeout: 40 * 1000,
4600
4601
  /* Base URL to use in actions like `await page.goto('/')`. */
4601
4602
  baseURL: env.PLAYWRIGHT_E2E_HOST,
4602
4603
  headless: env.PLAYWRIGHT_HEADLESS === 'true' || !!env.CI,
@@ -7362,5 +7363,5 @@ const TEST_FILES = {
7362
7363
  * Generated bundle index. Do not edit.
7363
7364
  */
7364
7365
 
7365
- 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, SearchInputComponent, SearchOverlayComponent, 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 };
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 };
7366
7367
  //# sourceMappingURL=alfresco-aca-playwright-shared.mjs.map