@alfresco/aca-playwright-shared 8.0.0-27601283741 → 8.0.0-27620809198

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.
@@ -606,6 +606,12 @@ class PlaywrightBase {
606
606
  const spinner = this.page.locator('[role="progressbar"]');
607
607
  await spinner.waitFor({ state: 'attached', timeout: timeouts.medium }).catch(() => { });
608
608
  await spinner.waitFor({ state: 'detached', timeout: timeouts.normal }).catch(() => { });
609
+ if (await spinner.first().isVisible()) {
610
+ await spinner
611
+ .first()
612
+ .waitFor({ state: 'detached', timeout: timeouts.normal })
613
+ .catch(() => { });
614
+ }
609
615
  }
610
616
  }
611
617
 
@@ -2877,6 +2883,8 @@ class SearchFiltersDate extends BaseComponent {
2877
2883
  this.anytimeRadioButton = this.anytimeButton.locator(`input`);
2878
2884
  this.betweenButton = this.getChild(`[data-automation-id$='date-range-between']`);
2879
2885
  this.betweenRadioButton = this.betweenButton.locator(`input`);
2886
+ this.inTheLastRadioButton = this.getChild(`[data-automation-id="date-range-in-last"]`);
2887
+ this.quantityInput = this.getChild(`[data-automation-id="date-range-in-last-input"]`);
2880
2888
  }
2881
2889
  async openCreatedModifiedTab(page, tab) {
2882
2890
  switch (tab) {
@@ -4718,7 +4726,7 @@ class ApiClientFactory {
4718
4726
  await this.alfrescoApi.login(user, userPassword);
4719
4727
  }
4720
4728
  catch (error) {
4721
- logger.error(`[API Client Factory] Log in user ${user} failed ${error}`);
4729
+ logger.error(`[API Client Factory] Log in user ${user} failed ${JSON.stringify(error)}`);
4722
4730
  throw error;
4723
4731
  }
4724
4732
  }
@@ -4745,7 +4753,7 @@ class ApiClientFactory {
4745
4753
  logger.warn(`[API Client Factory] createUser: user "${user.username}" already exists, skipping creation`);
4746
4754
  return null;
4747
4755
  }
4748
- logger.error(`[API Client Factory] createUser failed: ${error}`);
4756
+ logger.error(`[API Client Factory] createUser failed: ${JSON.stringify(error)}`);
4749
4757
  throw error;
4750
4758
  }
4751
4759
  }
@@ -4755,7 +4763,7 @@ class ApiClientFactory {
4755
4763
  return await peopleApi.updatePerson(username, { password: newPassword });
4756
4764
  }
4757
4765
  catch (error) {
4758
- logger.error(`[API Client Factory] changePassword failed: ${error}`);
4766
+ logger.error(`[API Client Factory] changePassword failed: ${JSON.stringify(error)}`);
4759
4767
  return null;
4760
4768
  }
4761
4769
  }
@@ -5035,7 +5043,7 @@ async function toUploadFile(fileLocation) {
5035
5043
  buffer = await fs.promises.readFile(fileLocation);
5036
5044
  fileFixtureCache.set(fileLocation, buffer);
5037
5045
  }
5038
- return new File([buffer], path.basename(fileLocation));
5046
+ return new File([new Uint8Array(buffer)], path.basename(fileLocation));
5039
5047
  }
5040
5048
  class FileActionsApi {
5041
5049
  constructor() {
@@ -5222,7 +5230,7 @@ class FileActionsApi {
5222
5230
  return (await this.queryNodesSearchHighlight(searchTerm)).list?.pagination?.totalItems || 0;
5223
5231
  }
5224
5232
  catch (error) {
5225
- logger.warn(`queryNodesSearchHighlight failed for "${searchTerm}": ${error}`);
5233
+ logger.warn(`queryNodesSearchHighlight failed for "${searchTerm}": ${JSON.stringify(error)}`);
5226
5234
  return 0;
5227
5235
  }
5228
5236
  };
@@ -5231,7 +5239,7 @@ class FileActionsApi {
5231
5239
  logger.log(`waitForNodesSearchHighlight: Found ${data.expect} nodes with search term "${searchTerm}"`);
5232
5240
  }
5233
5241
  catch (error) {
5234
- logger.error(`Error: ${error}`);
5242
+ logger.error(`Error: ${JSON.stringify(error)}`);
5235
5243
  }
5236
5244
  }
5237
5245
  async updateNodeContent(nodeId, content, majorVersion = true, comment, newName) {
@@ -5246,7 +5254,7 @@ class FileActionsApi {
5246
5254
  return await this.apiService.nodes.updateNodeContent(nodeId, content, opts); // NOSONAR
5247
5255
  }
5248
5256
  catch (error) {
5249
- logger.error(`${this.constructor.name} ${this.updateNodeContent.name}: ${error}`);
5257
+ logger.error(`${this.constructor.name} ${this.updateNodeContent.name}: ${JSON.stringify(error)}`);
5250
5258
  return Promise.reject(error);
5251
5259
  }
5252
5260
  }