@alfresco/aca-playwright-shared 7.3.0-22215643628 → 7.3.0-22225077007

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
- rulesEmptyList = this.getChild('adf-empty-content');
2296
+ rulesEmptyListTitle = this.getChild('.adf-empty-content__title');
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.rulesEmptyList.isVisible();
2310
+ return this.rulesEmptyListTitle.isVisible();
2311
2311
  }
2312
2312
  async checkIfRuleIsOnTheList(ruleName) {
2313
2313
  await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
@@ -2970,11 +2970,10 @@ 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-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');
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');
2978
2977
  /**
2979
2978
  * Method used in cases where user have possibility to navigate "inside" the element (it's clickable and has link attribute).
2980
2979
  * Perform action .click() to navigate inside it
@@ -2985,9 +2984,10 @@ class SearchInputComponent extends BaseComponent {
2985
2984
  constructor(page, rootElement = SearchInputComponent.rootElement) {
2986
2985
  super(page, rootElement);
2987
2986
  }
2988
- async searchFor(searchText) {
2989
- await this.searchInput.fill(searchText);
2990
- await this.searchButton.click();
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();
2991
2991
  }
2992
2992
  }
2993
2993
 
@@ -3014,56 +3014,59 @@ 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 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) {
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) {
3026
3027
  super(page, rootElement);
3027
3028
  }
3028
3029
  async isFoldersOptionChecked() {
3029
- return this.foldersCheckbox.isChecked();
3030
+ return this.searchFoldersOption.isChecked();
3030
3031
  }
3031
3032
  async isFilesOptionChecked() {
3032
- return this.filesCheckbox.isChecked();
3033
+ return this.searchFilesOption.isChecked();
3033
3034
  }
3034
- async resetOptions() {
3035
- await this.resetButton.click();
3035
+ async isLibrariesOptionChecked() {
3036
+ return this.searchLibrariesOption.isChecked();
3036
3037
  }
3037
- async checkOnlyFolders() {
3038
- await this.resetOptions();
3038
+ async clearOptions() {
3039
3039
  if (await this.isFilesOptionChecked()) {
3040
- await this.filesCheckbox.click();
3041
- }
3042
- if (!(await this.isFoldersOptionChecked())) {
3043
- await this.foldersCheckbox.click();
3040
+ await this.searchFilesOption.click();
3044
3041
  }
3045
- }
3046
- async checkOnlyFiles() {
3047
- await this.resetOptions();
3048
3042
  if (await this.isFoldersOptionChecked()) {
3049
- await this.foldersCheckbox.click();
3043
+ await this.searchFoldersOption.click();
3050
3044
  }
3051
- if (!(await this.isFilesOptionChecked())) {
3052
- await this.filesCheckbox.click();
3045
+ if (await this.isLibrariesOptionChecked()) {
3046
+ await this.searchLibrariesOption.click();
3053
3047
  }
3054
3048
  }
3049
+ async checkOnlyFolders() {
3050
+ await this.clearOptions();
3051
+ await this.searchFoldersOption.click();
3052
+ }
3053
+ async checkOnlyFiles() {
3054
+ await this.clearOptions();
3055
+ await this.searchFilesOption.click();
3056
+ }
3055
3057
  async checkLibraries() {
3056
- await this.resetOptions();
3057
- await this.librariesRadioButton.click();
3058
+ await this.clearOptions();
3059
+ await this.searchLibrariesOption.click();
3058
3060
  }
3059
3061
  async checkFilesAndFolders() {
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
- }
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 });
3067
3070
  }
3068
3071
  }
3069
3072
 
@@ -4090,8 +4093,8 @@ class SearchPage extends BasePage {
4090
4093
  folderDialog = new AdfFolderDialogComponent(this.page);
4091
4094
  dataTable = new DataTableComponent(this.page);
4092
4095
  viewer = new ViewerComponent(this.page);
4093
- searchInputComponent = new SearchInputComponent(this.page);
4094
- searchInDialog = new SearchInDialogComponent(this.page);
4096
+ searchInput = new SearchInputComponent(this.page);
4097
+ searchOverlay = new SearchOverlayComponent(this.page);
4095
4098
  searchSortingPicker = new SearchSortingPicker(this.page);
4096
4099
  searchFilters = new SearchFilters(this.page);
4097
4100
  searchFiltersTags = new SearchFiltersTags(this.page);
@@ -4106,33 +4109,29 @@ class SearchPage extends BasePage {
4106
4109
  manageVersionsDialog = new ManageVersionsDialog(this.page);
4107
4110
  folderInformationDialog = new FolderInformationDialogComponent(this.page);
4108
4111
  async searchWithin(searchText, searchType) {
4109
- if (!(await this.searchInputComponent.searchInput.isVisible())) {
4110
- await this.acaHeader.searchButton.click();
4111
- }
4112
- await this.searchInputComponent.searchInButton.click();
4112
+ await this.acaHeader.searchButton.click();
4113
+ await this.clickSearchButton();
4113
4114
  switch (searchType) {
4114
4115
  case 'files':
4115
- await this.searchInDialog.checkOnlyFiles();
4116
+ await this.searchOverlay.checkOnlyFiles();
4116
4117
  break;
4117
4118
  case 'folders':
4118
- await this.searchInDialog.checkOnlyFolders();
4119
+ await this.searchOverlay.checkOnlyFolders();
4119
4120
  break;
4120
4121
  case 'filesAndFolders':
4121
- await this.searchInDialog.checkFilesAndFolders();
4122
+ await this.searchOverlay.checkFilesAndFolders();
4122
4123
  break;
4123
4124
  case 'libraries':
4124
- await this.searchInDialog.checkLibraries();
4125
+ await this.searchOverlay.checkLibraries();
4125
4126
  break;
4126
4127
  default:
4127
4128
  break;
4128
4129
  }
4129
- await this.searchInDialog.applyButton.click();
4130
- await this.clickSearchButton();
4131
- await this.searchInputComponent.searchFor(searchText);
4130
+ await this.searchOverlay.searchFor(searchText);
4132
4131
  await this.dataTable.progressBarWaitForReload();
4133
4132
  }
4134
4133
  async clickSearchButton() {
4135
- await this.searchInputComponent.searchButton.click({ force: true });
4134
+ await this.searchInput.searchButton.click({ force: true });
4136
4135
  }
4137
4136
  }
4138
4137
 
@@ -4597,7 +4596,7 @@ const getGlobalConfig = {
4597
4596
  testMatch: ['**/*.e2e.ts'],
4598
4597
  use: {
4599
4598
  /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4600
- actionTimeout: 40 * 1000,
4599
+ actionTimeout: 0,
4601
4600
  /* Base URL to use in actions like `await page.goto('/')`. */
4602
4601
  baseURL: env.PLAYWRIGHT_E2E_HOST,
4603
4602
  headless: env.PLAYWRIGHT_HEADLESS === 'true' || !!env.CI,
@@ -7363,5 +7362,5 @@ const TEST_FILES = {
7363
7362
  * Generated bundle index. Do not edit.
7364
7363
  */
7365
7364
 
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 };
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 };
7367
7366
  //# sourceMappingURL=alfresco-aca-playwright-shared.mjs.map