@alfresco/aca-playwright-shared 7.5.0-26089953239 → 7.5.0-26220284331

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.
@@ -679,18 +679,12 @@ class SnackBarComponent extends BaseComponent {
679
679
  this.message = this.getChild('[data-automation-id="adf-snackbar-message-content"]').first();
680
680
  this.actionButton = this.getChild('[data-automation-id="adf-snackbar-message-content-action-button"]');
681
681
  this.closeIcon = this.getChild('.adf-snackbar-message-content-action-icon');
682
- this.getByMessageLocator = (message) => this.getChild(`[data-automation-id='adf-snackbar-message-content']`, { hasText: message }).first();
683
682
  }
684
683
  async getSnackBarMessage() {
685
684
  return this.message.innerText();
686
685
  }
687
686
  async getSnackBarActionText() {
688
- if (await this.actionButton.isVisible()) {
689
- return this.actionButton.textContent();
690
- }
691
- else {
692
- return '';
693
- }
687
+ return this.actionButton.innerText();
694
688
  }
695
689
  async verifySnackBarActionText(text) {
696
690
  expect(await this.message.textContent()).toContain(text);
@@ -1040,7 +1034,6 @@ class DataTableComponent extends BaseComponent {
1040
1034
  return this.contextMenuActions.getButtonByText(action);
1041
1035
  }
1042
1036
  async goThroughPagesLookingForRowWithName(name) {
1043
- await this.spinnerWaitForReload();
1044
1037
  if (await this.getRowByName(name).isVisible()) {
1045
1038
  return;
1046
1039
  }
@@ -2161,11 +2154,13 @@ class ManageRules extends BaseComponent {
2161
2154
  async countConditionsInGroup() {
2162
2155
  return this.ruleConditionsInGroup.count();
2163
2156
  }
2164
- async turnOffRuleToggle() {
2157
+ async turnOffRuleToggle(skipExpect) {
2165
2158
  await expect(async () => {
2166
2159
  await this.ruleToggle.hover({ timeout: 1000 });
2167
2160
  await this.ruleToggle.click();
2168
- await expect(this.ruleToggleFalse).toBeVisible();
2161
+ if (skipExpect !== 'skip expect') {
2162
+ await expect(this.ruleToggleFalse).toBeVisible();
2163
+ }
2169
2164
  }).toPass({
2170
2165
  intervals: [2_000],
2171
2166
  timeout: 20_000
@@ -2444,6 +2439,7 @@ class ConditionComponent extends ManageRulesDialogComponent {
2444
2439
  this.getOptionLocator = (optionName) => this.page.locator('[role=listbox] [role=option]', { hasText: optionName }).first();
2445
2440
  }
2446
2441
  async selectField(fields, index) {
2442
+ await this.fieldDropDown.nth(index).scrollIntoViewIfNeeded();
2447
2443
  await this.fieldDropDown.nth(index).click();
2448
2444
  const option = this.getOptionLocator(fields);
2449
2445
  await option.click();
@@ -2459,7 +2455,12 @@ class ConditionComponent extends ManageRulesDialogComponent {
2459
2455
  if (comparators) {
2460
2456
  await this.selectComparator(comparators, index);
2461
2457
  }
2462
- await this.valueField.nth(index).fill(value);
2458
+ if ((await this.valueField.count()) === 1) {
2459
+ await this.valueField.last().fill(value);
2460
+ }
2461
+ else {
2462
+ await this.valueField.nth(index).fill(value);
2463
+ }
2463
2464
  }
2464
2465
  async addConditionGroup(fields, value, index, comparators) {
2465
2466
  await this.addConditionGroupButton.last().click();
@@ -2723,7 +2724,7 @@ class ViewerComponent extends BaseComponent {
2723
2724
  }
2724
2725
  async waitForViewerToOpen() {
2725
2726
  await this.waitForViewerLoaderToFinish();
2726
- await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.large });
2727
+ await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.extraLarge });
2727
2728
  }
2728
2729
  async waitForViewerLoaderToFinish() {
2729
2730
  await this.viewerSpinner.waitFor({ state: 'attached', timeout: timeouts.medium }).catch(() => { });
@@ -3191,6 +3192,7 @@ class SearchInputComponent extends BaseComponent {
3191
3192
  this.getCellLinkByName = (name) => this.getChild('.adf-datatable-row[role="row"]', { hasText: name });
3192
3193
  }
3193
3194
  async searchFor(searchText) {
3195
+ await this.searchInput.click();
3194
3196
  await this.searchInput.fill(searchText);
3195
3197
  await this.searchButton.click();
3196
3198
  }
@@ -3973,8 +3975,8 @@ class SearchInDialogComponent extends BaseComponent {
3973
3975
  super(page, rootElement);
3974
3976
  this.filesAndFoldersRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Files and folders');
3975
3977
  this.librariesRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Libraries');
3976
- this.filesCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Files');
3977
- this.foldersCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Folders');
3978
+ this.filesCheckbox = this.getChild('#content [type="checkbox"]');
3979
+ this.foldersCheckbox = this.getChild('#folder [type="checkbox"]');
3978
3980
  this.applyButton = this.getChild('button', { hasText: 'Apply' });
3979
3981
  this.resetButton = this.getChild('button', { hasText: 'Reset' });
3980
3982
  }
@@ -4073,6 +4075,7 @@ class SearchPage extends BasePage {
4073
4075
  if (!(await this.searchInputComponent.searchInput.isVisible())) {
4074
4076
  await this.acaHeader.searchButton.click();
4075
4077
  }
4078
+ await this.searchInputComponent.searchFor(searchText);
4076
4079
  await this.searchInputComponent.searchInButton.click();
4077
4080
  switch (searchType) {
4078
4081
  case 'files':
@@ -4091,13 +4094,8 @@ class SearchPage extends BasePage {
4091
4094
  break;
4092
4095
  }
4093
4096
  await this.searchInDialog.applyButton.click();
4094
- await this.clickSearchButton();
4095
- await this.searchInputComponent.searchFor(searchText);
4096
4097
  await this.dataTable.spinnerWaitForReload();
4097
4098
  }
4098
- async clickSearchButton() {
4099
- await this.searchInputComponent.searchButton.click({ force: true });
4100
- }
4101
4099
  }
4102
4100
 
4103
4101
  /*!