@alfresco/aca-playwright-shared 7.3.0-22136719683 → 7.3.0-22137867753

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.
@@ -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).locator('a').waitFor({ state: 'attached' });
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-folder-info-header');
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="folder-info-number-of-files"]');
2164
- folderSize = this.getChild('[data-automation-id="folder-info-size"]');
2165
- folderLocation = this.getChild('[data-automation-id="folder-info-location"]');
2166
- folderCreationDate = this.getChild('[data-automation-id="folder-info-creation-date"]');
2167
- folderModifiedDate = this.getChild('[data-automation-id="folder-info-modify-date"]');
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 parseInt(textContent.split(' ')[0].replace(/,/g, ''), 10);
2173
+ return parseFloat(textContent.trim().split(/\s+/)[0].replace(/,/g, ''));
2174
2174
  }
2175
2175
  }
2176
2176
 
@@ -3268,57 +3268,6 @@ class SearchFiltersDate extends BaseComponent {
3268
3268
  }
3269
3269
  await page.page.waitForTimeout(2000);
3270
3270
  }
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
3271
  async isModifiedTabSelected() {
3323
3272
  return this.modifiedTab.getAttribute('aria-selected');
3324
3273
  }