@umbraco/playwright-testhelpers 17.1.0-beta.6 → 17.1.0-beta.7

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.
Files changed (147) hide show
  1. package/dist/lib/helpers/BaseApiHelper.d.ts +19 -0
  2. package/dist/lib/helpers/BaseApiHelper.js +87 -0
  3. package/dist/lib/helpers/BaseApiHelper.js.map +1 -0
  4. package/dist/lib/helpers/ConstantHelper.d.ts +0 -17
  5. package/dist/lib/helpers/ConstantHelper.js +0 -17
  6. package/dist/lib/helpers/ConstantHelper.js.map +1 -1
  7. package/dist/lib/helpers/ContentRenderUiHelper.js +3 -3
  8. package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
  9. package/dist/lib/helpers/ContentUiHelper.js +487 -353
  10. package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
  11. package/dist/lib/helpers/CurrentUserProfileUiHelper.js +10 -4
  12. package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
  13. package/dist/lib/helpers/DataTypeApiHelper.d.ts +9 -21
  14. package/dist/lib/helpers/DataTypeApiHelper.js +32 -125
  15. package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
  16. package/dist/lib/helpers/DataTypeUiHelper.js +332 -193
  17. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  18. package/dist/lib/helpers/DictionaryApiHelper.d.ts +8 -15
  19. package/dist/lib/helpers/DictionaryApiHelper.js +49 -77
  20. package/dist/lib/helpers/DictionaryApiHelper.js.map +1 -1
  21. package/dist/lib/helpers/DictionaryUiHelper.js +23 -17
  22. package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
  23. package/dist/lib/helpers/DocumentBlueprintApiHelper.d.ts +7 -13
  24. package/dist/lib/helpers/DocumentBlueprintApiHelper.js +44 -69
  25. package/dist/lib/helpers/DocumentBlueprintApiHelper.js.map +1 -1
  26. package/dist/lib/helpers/DocumentBlueprintUiHelper.js +10 -8
  27. package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
  28. package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +4 -18
  29. package/dist/lib/helpers/DocumentTypeApiHelper.js +4 -134
  30. package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
  31. package/dist/lib/helpers/DocumentTypeUiHelper.js +34 -22
  32. package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
  33. package/dist/lib/helpers/ExamineManagementUiHelper.js +6 -5
  34. package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
  35. package/dist/lib/helpers/FormsUiHelper.js +159 -119
  36. package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
  37. package/dist/lib/helpers/HealthCheckUiHelper.js +7 -7
  38. package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
  39. package/dist/lib/helpers/LanguageApiHelper.d.ts +10 -12
  40. package/dist/lib/helpers/LanguageApiHelper.js +34 -35
  41. package/dist/lib/helpers/LanguageApiHelper.js.map +1 -1
  42. package/dist/lib/helpers/LanguageUiHelper.js +19 -16
  43. package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
  44. package/dist/lib/helpers/LogViewerUiHelper.js +31 -22
  45. package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
  46. package/dist/lib/helpers/LoginUiHelper.js +7 -4
  47. package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
  48. package/dist/lib/helpers/MediaTypeApiHelper.d.ts +4 -18
  49. package/dist/lib/helpers/MediaTypeApiHelper.js +4 -134
  50. package/dist/lib/helpers/MediaTypeApiHelper.js.map +1 -1
  51. package/dist/lib/helpers/MediaTypeUiHelper.js +17 -11
  52. package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
  53. package/dist/lib/helpers/MediaUiHelper.js +45 -36
  54. package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
  55. package/dist/lib/helpers/MemberApiHelper.d.ts +4 -12
  56. package/dist/lib/helpers/MemberApiHelper.js +6 -54
  57. package/dist/lib/helpers/MemberApiHelper.js.map +1 -1
  58. package/dist/lib/helpers/MemberGroupApiHelper.d.ts +6 -11
  59. package/dist/lib/helpers/MemberGroupApiHelper.js +20 -35
  60. package/dist/lib/helpers/MemberGroupApiHelper.js.map +1 -1
  61. package/dist/lib/helpers/MemberGroupUiHelper.js +16 -13
  62. package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
  63. package/dist/lib/helpers/MemberTypeApiHelper.d.ts +5 -12
  64. package/dist/lib/helpers/MemberTypeApiHelper.js +16 -49
  65. package/dist/lib/helpers/MemberTypeApiHelper.js.map +1 -1
  66. package/dist/lib/helpers/MemberTypeUiHelper.js +3 -2
  67. package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
  68. package/dist/lib/helpers/MemberUiHelper.js +43 -25
  69. package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
  70. package/dist/lib/helpers/ModelsBuilderUiHelper.js +3 -2
  71. package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
  72. package/dist/lib/helpers/PackageApiHelper.d.ts +5 -4
  73. package/dist/lib/helpers/PackageApiHelper.js +47 -75
  74. package/dist/lib/helpers/PackageApiHelper.js.map +1 -1
  75. package/dist/lib/helpers/PackageUiHelper.js +36 -30
  76. package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
  77. package/dist/lib/helpers/PartialViewApiHelper.d.ts +5 -20
  78. package/dist/lib/helpers/PartialViewApiHelper.js +12 -146
  79. package/dist/lib/helpers/PartialViewApiHelper.js.map +1 -1
  80. package/dist/lib/helpers/PartialViewUiHelper.js +17 -14
  81. package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
  82. package/dist/lib/helpers/PathBasedTreeApiHelper.d.ts +32 -0
  83. package/dist/lib/helpers/PathBasedTreeApiHelper.js +164 -0
  84. package/dist/lib/helpers/PathBasedTreeApiHelper.js.map +1 -0
  85. package/dist/lib/helpers/ProfilingUiHelper.js +5 -3
  86. package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
  87. package/dist/lib/helpers/PublishedStatusUiHelper.js +8 -7
  88. package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
  89. package/dist/lib/helpers/RedirectManagementUiHelper.js +12 -7
  90. package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
  91. package/dist/lib/helpers/RelationTypeApiHelper.d.ts +7 -12
  92. package/dist/lib/helpers/RelationTypeApiHelper.js +28 -49
  93. package/dist/lib/helpers/RelationTypeApiHelper.js.map +1 -1
  94. package/dist/lib/helpers/RelationTypeUiHelper.js +16 -13
  95. package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
  96. package/dist/lib/helpers/ScriptApiHelper.d.ts +6 -22
  97. package/dist/lib/helpers/ScriptApiHelper.js +12 -165
  98. package/dist/lib/helpers/ScriptApiHelper.js.map +1 -1
  99. package/dist/lib/helpers/ScriptUiHelper.js +13 -9
  100. package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
  101. package/dist/lib/helpers/StylesheetApiHelper.d.ts +5 -20
  102. package/dist/lib/helpers/StylesheetApiHelper.js +13 -154
  103. package/dist/lib/helpers/StylesheetApiHelper.js.map +1 -1
  104. package/dist/lib/helpers/StylesheetUiHelper.js +14 -9
  105. package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
  106. package/dist/lib/helpers/TelemetryDataUiHelper.js +3 -2
  107. package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
  108. package/dist/lib/helpers/TemplateApiHelper.d.ts +8 -15
  109. package/dist/lib/helpers/TemplateApiHelper.js +51 -83
  110. package/dist/lib/helpers/TemplateApiHelper.js.map +1 -1
  111. package/dist/lib/helpers/TemplateUiHelper.js +25 -19
  112. package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
  113. package/dist/lib/helpers/TreeApiHelper.d.ts +15 -0
  114. package/dist/lib/helpers/TreeApiHelper.js +116 -0
  115. package/dist/lib/helpers/TreeApiHelper.js.map +1 -0
  116. package/dist/lib/helpers/UiBaseLocators.d.ts +228 -230
  117. package/dist/lib/helpers/UiBaseLocators.js +871 -834
  118. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  119. package/dist/lib/helpers/UserGroupApiHelper.d.ts +3 -13
  120. package/dist/lib/helpers/UserGroupApiHelper.js +3 -69
  121. package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
  122. package/dist/lib/helpers/UserGroupUiHelper.js +49 -32
  123. package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
  124. package/dist/lib/helpers/UserUiHelper.js +46 -43
  125. package/dist/lib/helpers/UserUiHelper.js.map +1 -1
  126. package/dist/lib/helpers/VariantBasedApiHelper.d.ts +23 -0
  127. package/dist/lib/helpers/VariantBasedApiHelper.js +81 -0
  128. package/dist/lib/helpers/VariantBasedApiHelper.js.map +1 -0
  129. package/dist/lib/helpers/WebhookApiHelper.d.ts +1 -0
  130. package/dist/lib/helpers/WebhookApiHelper.js +10 -11
  131. package/dist/lib/helpers/WebhookApiHelper.js.map +1 -1
  132. package/dist/lib/helpers/WebhookUiHelper.js +27 -11
  133. package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
  134. package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -1
  135. package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
  136. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +9 -4
  137. package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
  138. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +10 -5
  139. package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
  140. package/dist/lib/helpers/index.d.ts +4 -1
  141. package/dist/lib/helpers/index.js +9 -3
  142. package/dist/lib/helpers/index.js.map +1 -1
  143. package/dist/tsconfig.tsbuildinfo +1 -1
  144. package/package.json +1 -1
  145. package/dist/lib/helpers/BasePage.d.ts +0 -449
  146. package/dist/lib/helpers/BasePage.js +0 -547
  147. package/dist/lib/helpers/BasePage.js.map +0 -1
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataTypeUiHelper = void 0;
4
4
  const test_1 = require("@playwright/test");
5
5
  const UiBaseLocators_1 = require("./UiBaseLocators");
6
- const ConstantHelper_1 = require("./ConstantHelper");
7
6
  class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
8
7
  moveToBtn;
9
8
  duplicateToBtn;
@@ -321,46 +320,57 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
321
320
  }
322
321
  async goToDataType(dataTypeName) {
323
322
  await this.clickRootFolderCaretButton();
324
- await this.click(this.sectionSidebar.getByLabel(dataTypeName, { exact: true }));
323
+ await (0, test_1.expect)(this.sectionSidebar.getByLabel(dataTypeName, { exact: true })).toBeVisible();
324
+ await this.sectionSidebar.getByLabel(dataTypeName, { exact: true }).click();
325
325
  }
326
326
  async clickMoveToButton() {
327
- await this.click(this.moveToBtn);
327
+ await (0, test_1.expect)(this.moveToBtn).toBeVisible();
328
+ await this.moveToBtn.click();
328
329
  }
329
330
  async clickDuplicateToButton() {
330
- await this.click(this.duplicateToBtn);
331
+ await (0, test_1.expect)(this.duplicateToBtn).toBeVisible();
332
+ await this.duplicateToBtn.click();
331
333
  }
332
334
  async waitForDataTypeToBeCreated() {
333
- await this.waitForLoadState();
335
+ await this.page.waitForLoadState();
334
336
  }
335
337
  async isDataTypeTreeItemVisible(name, isVisible = true) {
336
- const hasShowChildren = await this.dataTypeTreeRoot.getAttribute('show-children') !== null;
337
- if (!hasShowChildren) {
338
- await this.click(this.dataTypeTreeRoot.locator(this.caretBtn).first());
338
+ {
339
+ const hasShowChildren = await this.dataTypeTreeRoot.getAttribute('show-children') !== null;
340
+ if (!hasShowChildren) {
341
+ await this.dataTypeTreeRoot.locator(this.caretBtn).first().click();
342
+ }
343
+ await this.isTreeItemVisible(name, isVisible);
339
344
  }
340
- await this.isTreeItemVisible(name, isVisible);
341
345
  }
342
346
  async waitForDataTypeToBeDeleted() {
343
- await this.waitForLoadState();
347
+ await this.page.waitForLoadState();
344
348
  }
345
349
  async waitForDataTypeToBeRenamed() {
346
- await this.waitForLoadState();
350
+ await this.page.waitForLoadState();
347
351
  }
348
352
  async clickNewDataTypeButton() {
349
- await this.click(this.newDataTypeBtn);
353
+ await (0, test_1.expect)(this.newDataTypeBtn).toBeVisible();
354
+ await this.newDataTypeBtn.click();
350
355
  }
351
356
  async clickNewDataTypeFolderButton() {
352
- await this.click(this.newFolderBtn);
357
+ await (0, test_1.expect)(this.newFolderBtn).toBeVisible();
358
+ await this.newFolderBtn.click();
353
359
  }
354
360
  async enterDataTypeName(name) {
355
- await this.click(this.dataTypeNameTxt);
356
- await this.enterText(this.dataTypeNameTxt, name);
361
+ await (0, test_1.expect)(this.dataTypeNameTxt).toBeVisible();
362
+ await this.dataTypeNameTxt.click();
363
+ await this.dataTypeNameTxt.clear();
364
+ await this.dataTypeNameTxt.fill(name);
357
365
  }
358
366
  async clickCreateFolderButton() {
359
- await this.click(this.createDataTypeFolderBtn);
360
- await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
367
+ await (0, test_1.expect)(this.createFolderBtn).toBeVisible();
368
+ await this.createDataTypeFolderBtn.click();
369
+ await this.page.waitForTimeout(500); // Wait for the action to complete
361
370
  }
362
371
  async clickUpdateFolderButton() {
363
- await this.click(this.updateDataTypeFolderBtn);
372
+ await (0, test_1.expect)(this.updateDataTypeFolderBtn).toBeVisible();
373
+ await this.updateDataTypeFolderBtn.click();
364
374
  }
365
375
  async deleteDataType(name) {
366
376
  await this.clickActionsMenuForDataType(name);
@@ -372,24 +382,27 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
372
382
  }
373
383
  async moveDataTypeToFolder(folderName) {
374
384
  await this.clickMoveToActionMenuOption();
375
- await this.click(this.sidebarModal.getByText(folderName, { exact: true }));
376
- await this.click(this.chooseModalBtn);
385
+ await (0, test_1.expect)(this.sidebarModal.getByText(folderName, { exact: true })).toBeVisible();
386
+ await this.sidebarModal.getByText(folderName, { exact: true }).click();
387
+ await this.chooseModalBtn.click();
377
388
  }
378
389
  async duplicateDataTypeToFolder(folderName) {
379
390
  await this.clickDuplicateToActionMenuOption();
380
- await this.click(this.sidebarModal.getByText(folderName, { exact: true }));
381
- await this.click(this.duplicateBtn);
391
+ await (0, test_1.expect)(this.sidebarModal.getByText(folderName, { exact: true })).toBeVisible();
392
+ await this.sidebarModal.getByText(folderName, { exact: true }).click();
393
+ await this.duplicateBtn.click();
382
394
  }
383
395
  async addMediaStartNode(mediaName) {
384
- await this.click(this.mediaCardItems.filter({ hasText: mediaName }));
396
+ await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: mediaName })).toBeVisible();
397
+ await this.mediaCardItems.filter({ hasText: mediaName }).click();
385
398
  await this.clickChooseModalButton();
386
399
  }
387
400
  async addContentStartNode(contentName) {
388
401
  await this.clickTextButtonWithName(contentName);
389
- await this.click(this.chooseModalBtn);
402
+ await this.chooseModalBtn.click();
390
403
  }
391
404
  async clickSelectAPropertyEditorButton() {
392
- await this.click(this.selectAPropertyEditorBtn);
405
+ await this.selectAPropertyEditorBtn.click();
393
406
  }
394
407
  async selectAPropertyEditor(propertyName, filterKeyword) {
395
408
  await this.typeToFilterTxt.fill(filterKeyword ? filterKeyword : propertyName);
@@ -397,215 +410,260 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
397
410
  }
398
411
  // Approved Color
399
412
  async clickIncludeLabelsToggle() {
400
- await this.click(this.includeLabelsToggle);
413
+ await this.includeLabelsToggle.click();
401
414
  }
402
415
  async removeColorByValue(value) {
403
- await this.click(this.page.locator(`[value="${value}"] uui-button svg`));
404
- await this.click(this.confirmToDeleteBtn);
416
+ await this.page.locator('[value="' + value + '"] uui-button svg').click();
417
+ await this.confirmToDeleteBtn.click();
405
418
  }
406
419
  async addColor(value) {
407
- await this.click(this.addColorBtn);
408
- await this.enterText(this.colorValueTxt, value);
420
+ await this.addColorBtn.click();
421
+ await this.colorValueTxt.clear();
422
+ await this.colorValueTxt.fill(value);
409
423
  }
410
424
  // Label
411
425
  async changeValueType(valueType) {
412
- await this.selectByText(this.page.getByLabel('Select a value type'), valueType);
426
+ await this.page.getByLabel('Select a value type').selectOption({ label: valueType });
413
427
  }
414
428
  // Date Picker
415
429
  async clickOffsetTimeToggle() {
416
- await this.click(this.offsetTimeToggle);
430
+ await this.offsetTimeToggle.click();
417
431
  }
418
432
  async enterDateFormatValue(value) {
419
- await this.enterText(this.dateFormatTxt, value);
433
+ await this.dateFormatTxt.clear();
434
+ await this.dateFormatTxt.fill(value);
420
435
  }
421
436
  // List View
422
437
  async enterPageSizeValue(value) {
423
- await this.enterText(this.pageSizeTxt, value);
438
+ await this.pageSizeTxt.clear();
439
+ await this.pageSizeTxt.fill(value);
424
440
  }
425
441
  async chooseOrderDirection(isAscending) {
426
442
  if (isAscending) {
427
- await this.click(this.ascendingRadioBtn);
443
+ await this.ascendingRadioBtn.click();
428
444
  }
429
445
  else {
430
- await this.click(this.descendingRadioBtn);
446
+ await this.descendingRadioBtn.click();
431
447
  }
432
448
  }
433
449
  async addColumnDisplayed(contentType, contentName, propertyAlias) {
434
- await this.click(this.chooseColumnsDisplayedBtn);
450
+ await this.chooseColumnsDisplayedBtn.click();
435
451
  await this.clickTextButtonWithName(contentType);
436
452
  await this.clickTextButtonWithName(contentName);
437
453
  await this.clickChooseContainerButton();
438
454
  await this.clickTextButtonWithName(propertyAlias);
439
455
  }
440
456
  async removeColumnDisplayed(propertyAlias) {
441
- await this.click(this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove'));
457
+ await this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove').click();
442
458
  }
443
459
  async addLayouts(layoutName) {
444
- await this.click(this.chooseLayoutsBtn);
445
- await this.click(this.page.locator(`[name="${layoutName}"]`));
460
+ await (0, test_1.expect)(this.chooseLayoutsBtn).toBeVisible();
461
+ await this.chooseLayoutsBtn.click();
462
+ await (0, test_1.expect)(this.page.locator('[name="' + layoutName + '"]')).toBeVisible();
463
+ await this.page.locator('[name="' + layoutName + '"]').click();
446
464
  }
447
465
  async removeLayouts(layoutAlias) {
448
- await this.click(this.layoutsItems.filter({ has: this.page.getByText(layoutAlias, { exact: true }) }).getByText('Remove'));
466
+ await this.layoutsItems.filter({ has: this.page.getByText(layoutAlias, { exact: true }) }).getByText('Remove').click();
449
467
  }
450
468
  async chooseOrderByValue(value) {
451
- await this.selectByText(this.orderByDropDownBox, value);
469
+ await this.orderByDropDownBox.selectOption({ label: value });
452
470
  }
453
471
  async enterWorkspaceViewName(name) {
454
- await this.enterText(this.workspaceViewName, name);
472
+ await this.workspaceViewName.clear();
473
+ await this.workspaceViewName.fill(name);
455
474
  }
456
475
  async clickShowContentWorkspaceViewFirstToggle() {
457
- await this.click(this.showWorkspaceViewFirstToggle);
476
+ await this.showWorkspaceViewFirstToggle.click();
458
477
  }
459
478
  async clickEditInInfiniteEditorToggle() {
460
- await this.click(this.editInInfiniteEditorToggle);
479
+ await this.editInInfiniteEditorToggle.click();
461
480
  }
462
481
  async clickBulkActionPermissionsToggleByValue(value) {
463
- await this.click(this.page.locator(`uui-toggle[label='${value}'] #toggle`));
482
+ await this.page.locator("uui-toggle[label='" + value + "'] #toggle").click();
464
483
  }
465
484
  async clickSelectIconButton() {
485
+ await (0, test_1.expect)(this.selectIconBtn).toBeVisible();
466
486
  // Force click is needed
467
- await this.click(this.selectIconBtn, { force: true });
487
+ await this.selectIconBtn.click({ force: true });
468
488
  }
469
489
  async chooseWorkspaceViewIconByValue(value) {
470
- await this.click(this.page.locator(`[label="${value}"] svg`));
471
- await this.click(this.submitBtn);
490
+ await this.page.locator('[label="' + value + '"] svg').click();
491
+ await this.submitBtn.click();
472
492
  }
473
493
  // Image Cropper
474
494
  async enterCropValues(label, alias, width, height) {
475
- await this.enterText(this.labelTxt, label);
476
- await this.enterText(this.aliasTxt, alias);
477
- await this.enterText(this.widthTxt, width);
478
- await this.enterText(this.heightTxt, height);
495
+ await (0, test_1.expect)(this.labelTxt).toBeVisible();
496
+ await this.labelTxt.clear();
497
+ await this.labelTxt.fill(label);
498
+ await (0, test_1.expect)(this.aliasTxt).toBeVisible();
499
+ await this.aliasTxt.clear();
500
+ await this.aliasTxt.fill(alias);
501
+ await (0, test_1.expect)(this.widthTxt).toBeVisible();
502
+ await this.widthTxt.clear();
503
+ await this.widthTxt.fill(width);
504
+ await this.heightTxt.clear();
505
+ await this.heightTxt.fill(height);
479
506
  }
480
507
  async clickCreateCropButton() {
481
- await this.click(this.createCropBtn);
508
+ await (0, test_1.expect)(this.createCropBtn).toBeVisible();
509
+ await this.createCropBtn.click();
482
510
  }
483
511
  async clickEditCropButton() {
484
- await this.click(this.editCropBtn);
512
+ await (0, test_1.expect)(this.editCropBtn).toBeVisible();
513
+ await this.editCropBtn.click();
485
514
  }
486
515
  async editCropByAlias(alias) {
487
- await this.click(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit'));
516
+ await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit')).toBeVisible();
517
+ await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit').click();
488
518
  }
489
519
  async removeCropByAlias(alias) {
490
- await this.click(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove'));
520
+ await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove')).toBeVisible();
521
+ await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove').click();
491
522
  }
492
523
  // Numeric
493
524
  async enterMinimumValue(value) {
494
- await this.enterText(this.minimumTxt, value);
525
+ await (0, test_1.expect)(this.minimumTxt).toBeVisible();
526
+ await this.minimumTxt.clear();
527
+ await this.minimumTxt.fill(value);
495
528
  }
496
529
  async enterMaximumValue(value) {
497
- await this.enterText(this.maximumTxt, value);
530
+ await (0, test_1.expect)(this.maximumTxt).toBeVisible();
531
+ await this.maximumTxt.clear();
532
+ await this.maximumTxt.fill(value);
498
533
  }
499
534
  async enterStepSizeValue(value) {
500
- await this.enterText(this.stepSizeTxt, value);
535
+ await (0, test_1.expect)(this.stepSizeTxt).toBeVisible();
536
+ await this.stepSizeTxt.clear();
537
+ await this.stepSizeTxt.fill(value);
501
538
  }
502
539
  async clickAllowDecimalsToggle() {
503
- await this.click(this.allowDecimalsToggle);
540
+ await (0, test_1.expect)(this.allowDecimalsToggle).toBeVisible();
541
+ await this.allowDecimalsToggle.click();
504
542
  }
505
543
  // Radiobox
506
544
  async removeOptionByName(name) {
507
- await this.click(this.page.locator(`uui-button[label='Remove ${name}'] svg`));
508
- await this.click(this.confirmToDeleteBtn);
545
+ await (0, test_1.expect)(this.page.locator("uui-button[label='Remove " + name + "'] svg")).toBeVisible();
546
+ await this.page.locator("uui-button[label='Remove " + name + "'] svg").click();
547
+ await this.confirmToDeleteBtn.click();
509
548
  }
510
549
  async enterOptionName(name) {
511
- await this.enterText(this.optionTxt.last(), name);
550
+ await (0, test_1.expect)(this.optionTxt.last()).toBeVisible();
551
+ await this.optionTxt.last().clear();
552
+ await this.optionTxt.last().fill(name);
512
553
  }
513
554
  async clickAddOptionButton() {
514
- await this.click(this.addOptionBtn);
555
+ await (0, test_1.expect)(this.addOptionBtn).toBeVisible();
556
+ await this.addOptionBtn.click();
515
557
  }
516
558
  // Textarea - Textstring
517
559
  async enterMaximumAllowedCharactersValue(value) {
518
- await this.enterText(this.maximumAllowedCharsTxt, value);
560
+ await (0, test_1.expect)(this.maximumAllowedCharsTxt).toBeVisible();
561
+ await this.maximumAllowedCharsTxt.clear();
562
+ await this.maximumAllowedCharsTxt.fill(value);
519
563
  }
520
564
  async enterNumberOfRowsValue(value) {
521
- await this.enterText(this.numberOfRowsTxt, value);
565
+ await (0, test_1.expect)(this.numberOfRowsTxt).toBeVisible();
566
+ await this.numberOfRowsTxt.clear();
567
+ await this.numberOfRowsTxt.fill(value);
522
568
  }
523
569
  async enterMaxHeightValue(value) {
524
- await this.enterText(this.maxHeightTxt, value);
570
+ await (0, test_1.expect)(this.maxHeightTxt).toBeVisible();
571
+ await this.maxHeightTxt.clear();
572
+ await this.maxHeightTxt.fill(value);
525
573
  }
526
574
  async enterMinHeightValue(value) {
527
- await this.enterText(this.minHeightTxt, value);
575
+ await this.minHeightTxt.clear();
576
+ await this.minHeightTxt.fill(value);
528
577
  }
529
578
  // Upload
530
579
  async enterAcceptedFileExtensions(value) {
531
- await this.enterText(this.acceptedFileExtensionsTxt.last(), value);
580
+ await this.acceptedFileExtensionsTxt.last().clear();
581
+ await this.acceptedFileExtensionsTxt.last().fill(value);
532
582
  }
533
583
  async removeAcceptedFileExtensionsByValue(value) {
534
- await this.click(this.page.locator(`uui-button[label='Remove ${value}'] svg`));
535
- await this.click(this.confirmToDeleteBtn);
584
+ await this.page.locator("uui-button[label='Remove " + value + "'] svg").click();
585
+ await this.confirmToDeleteBtn.click();
536
586
  }
537
587
  async clickAddAcceptedFileExtensionsButton() {
538
- await this.click(this.addAcceptedFileExtensionsBtn);
588
+ await this.addAcceptedFileExtensionsBtn.click();
539
589
  }
540
590
  // Multi URL Picker
541
591
  async enterMinimumNumberOfItemsValue(value) {
542
- await this.enterText(this.minimumNumberOfItemsTxt, value);
592
+ await this.minimumNumberOfItemsTxt.clear();
593
+ await this.minimumNumberOfItemsTxt.fill(value);
543
594
  }
544
595
  async enterMaximumNumberOfItemsValue(value) {
545
- await this.enterText(this.maximumNumberOfItemsTxt, value);
596
+ await this.maximumNumberOfItemsTxt.clear();
597
+ await this.maximumNumberOfItemsTxt.fill(value);
546
598
  }
547
599
  async clickIgnoreUserStartNodesToggle() {
548
- await this.click(this.ignoreUserStartNodesToggle);
600
+ await this.ignoreUserStartNodesToggle.click();
549
601
  }
550
602
  async chooseOverlaySizeByValue(value) {
551
- await this.selectByValue(this.overlaySizeDropDownBox, value);
603
+ await this.overlaySizeDropDownBox.selectOption({ value: value });
552
604
  }
553
605
  async clickHideAnchorQueryStringInputToggle() {
554
- await this.click(this.hideAnchorQueryStringInputToggle);
606
+ await this.hideAnchorQueryStringInputToggle.click();
555
607
  }
556
608
  // Media Picker
557
609
  async clickPickMultipleItemsToggle() {
558
- await this.click(this.pickMultipleItemsToggle);
610
+ await this.pickMultipleItemsToggle.click();
559
611
  }
560
612
  async clickEnableFocalPointToggle() {
561
- await this.click(this.enableFocalPointToggle);
613
+ await (0, test_1.expect)(this.enableFocalPointToggle).toBeVisible();
614
+ await this.enableFocalPointToggle.click();
562
615
  }
563
616
  async enterAmountValue(lowValue, highValue) {
564
- await this.enterText(this.amountLowValueTxt, lowValue);
565
- await this.enterText(this.amountHighValueTxt, highValue);
617
+ await this.amountLowValueTxt.clear();
618
+ await this.amountLowValueTxt.fill(lowValue);
619
+ await this.amountHighValueTxt.clear();
620
+ await this.amountHighValueTxt.fill(highValue);
566
621
  }
567
622
  async addAcceptedType(mediaTypeName) {
568
- await this.click(this.chooseAcceptedTypesBtn);
623
+ await this.chooseAcceptedTypesBtn.click();
569
624
  await this.clickTextButtonWithName(mediaTypeName);
570
- await this.click(this.chooseModalBtn);
625
+ await this.chooseModalBtn.click();
571
626
  }
572
627
  async removeAcceptedType(mediaTypeName) {
573
- await this.click(this.page.locator(`uui-ref-node-document-type[name="${mediaTypeName}"]`).getByLabel('Remove'));
574
- await this.click(this.confirmToRemoveBtn);
628
+ await this.page.locator('uui-ref-node-document-type[name="' + mediaTypeName + '"]').getByLabel('Remove').click();
629
+ await this.confirmToRemoveBtn.click();
575
630
  }
576
631
  async removeMediaStartNode(mediaName) {
577
- await this.click(this.page.locator(`uui-card-media[name="${mediaName}"]`).locator('[label="Remove"]'));
578
- await this.click(this.confirmToRemoveBtn);
632
+ await this.page.locator('uui-card-media[name="' + mediaName + '"]').locator('[label="Remove"]').click();
633
+ await this.confirmToRemoveBtn.click();
579
634
  }
580
635
  async clickChooseStartNodeButton() {
581
- await this.click(this.chooseStartNodeBtn);
636
+ await this.chooseStartNodeBtn.click();
582
637
  }
583
638
  // Richtext Editor
584
639
  async clickToolbarOptionByValue(values) {
585
640
  for (var index in values) {
586
- await this.click(this.toolbarCheckboxes.filter({ has: this.page.getByLabel(values[index]) }).locator('#ticker svg'));
641
+ await this.toolbarCheckboxes.filter({ has: this.page.getByLabel(values[index]) }).locator('#ticker svg').click();
587
642
  }
588
643
  }
589
644
  async addStylesheet(stylesheetName) {
590
- await this.click(this.addStylesheetBtn);
591
- await this.click(this.page.getByLabel(stylesheetName));
592
- await this.click(this.chooseModalBtn);
645
+ await this.addStylesheetBtn.click();
646
+ await this.page.getByLabel(stylesheetName).click();
647
+ await this.chooseModalBtn.click();
593
648
  }
594
649
  async enterDimensionsValue(width, height) {
595
- await this.enterText(this.dimensionsWidthTxt, width);
596
- await this.enterText(this.dimensionsHeightTxt, height);
650
+ await this.dimensionsWidthTxt.clear();
651
+ await this.dimensionsWidthTxt.fill(width);
652
+ await this.dimensionsHeightTxt.clear();
653
+ await this.dimensionsHeightTxt.fill(height);
597
654
  }
598
655
  async enterMaximumSizeForImages(value) {
599
- await this.enterText(this.maxImageSizeTxt, value);
656
+ await this.maxImageSizeTxt.clear();
657
+ await this.maxImageSizeTxt.fill(value);
600
658
  }
601
659
  async clickHideLabelToggle() {
602
- await this.click(this.hideLabelToggle);
660
+ await this.hideLabelToggle.click();
603
661
  }
604
662
  async clickInlineRadioButton() {
605
- await this.click(this.inlineRadioBtn);
663
+ await this.inlineRadioBtn.click();
606
664
  }
607
665
  async clickChooseWithPlusButton() {
608
- await this.click(this.chooseWithPlusBtn);
666
+ await this.chooseWithPlusBtn.click();
609
667
  }
610
668
  async addImageUploadFolder(mediaFolderName) {
611
669
  await this.clickChooseWithPlusButton();
@@ -613,7 +671,8 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
613
671
  await this.clickChooseModalButton();
614
672
  }
615
673
  async clickAddWithPlusButton() {
616
- await this.click(this.addWithPlusBtn);
674
+ await (0, test_1.expect)(this.addWithPlusBtn).toBeVisible();
675
+ await this.addWithPlusBtn.click();
617
676
  }
618
677
  async addAvailableBlocks(blockName) {
619
678
  await this.clickAddWithPlusButton();
@@ -623,136 +682,187 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
623
682
  }
624
683
  // Tags
625
684
  async enterDefineTagGroupValue(value) {
626
- await this.enterText(this.defineTagGroupTxt, value);
685
+ await (0, test_1.expect)(this.defineTagGroupTxt).toBeVisible();
686
+ await this.defineTagGroupTxt.clear();
687
+ await this.defineTagGroupTxt.fill(value);
627
688
  }
628
689
  async selectStorageTypeOption(option) {
629
- await this.selectByText(this.storageTypeDropDownBox, option);
690
+ await (0, test_1.expect)(this.storageTypeDropDownBox).toBeVisible();
691
+ await this.storageTypeDropDownBox.selectOption({ label: option });
630
692
  }
631
693
  // Content Picker
632
694
  async clickShowOpenButtonToggle() {
633
- await this.click(this.showOpenButtonToggle);
695
+ await (0, test_1.expect)(this.showOpenButtonToggle).toBeVisible();
696
+ await this.showOpenButtonToggle.click();
634
697
  }
635
698
  async removeContentStartNode(contentName) {
636
- const startNodeLocator = this.entityItem.filter({ has: this.page.locator(`[name="${contentName}"]`) });
637
- await this.hoverAndClick(startNodeLocator, startNodeLocator.getByLabel('Remove'));
699
+ const startNodeLocator = this.entityItem.filter({ has: this.page.locator('[name="' + contentName + '"]') });
700
+ await startNodeLocator.hover();
701
+ await startNodeLocator.getByLabel('Remove').click();
638
702
  await this.clickConfirmRemoveButton();
639
703
  }
640
704
  // Dropdown
641
705
  async clickEnableMultipleChoiceToggle() {
642
- await this.click(this.enableMultipleChoiceToggle);
706
+ await (0, test_1.expect)(this.enableMultipleChoiceToggle).toBeVisible();
707
+ await this.enableMultipleChoiceToggle.click();
643
708
  }
644
709
  async clickAddOptionsButton() {
645
- await this.click(this.addOptionsBtn);
710
+ await (0, test_1.expect)(this.addOptionsBtn).toBeVisible();
711
+ await this.addOptionsBtn.click();
646
712
  }
647
713
  // True/false
648
714
  async clickPresetValueToggle() {
649
- await this.click(this.presetValueToggle);
715
+ await (0, test_1.expect)(this.presetValueToggle).toBeVisible();
716
+ await this.presetValueToggle.click();
650
717
  }
651
718
  async clickShowToggleLabelsToggle() {
652
- await this.click(this.showToggleLabelsToggle);
719
+ await (0, test_1.expect)(this.showToggleLabelsToggle).toBeVisible();
720
+ await this.showToggleLabelsToggle.click();
653
721
  }
654
722
  async enterLabelOnValue(value) {
655
- await this.enterText(this.labelOnTxt, value);
723
+ await (0, test_1.expect)(this.labelOnTxt).toBeVisible();
724
+ await this.labelOnTxt.clear();
725
+ await this.labelOnTxt.fill(value);
656
726
  }
657
727
  async enterLabelOffValue(value) {
658
- await this.enterText(this.labelOffTxt, value);
728
+ await (0, test_1.expect)(this.labelOffTxt).toBeVisible();
729
+ await this.labelOffTxt.clear();
730
+ await this.labelOffTxt.fill(value);
659
731
  }
660
732
  // Block List Editor
661
733
  async clickAddBlockButton(index = 0) {
662
- await this.click(this.addBlockBtn.nth(index));
734
+ await (0, test_1.expect)(this.addBlockBtn.nth(index)).toBeVisible();
735
+ await this.addBlockBtn.nth(index).click();
663
736
  }
664
737
  async clickRemoveBlockWithName(name) {
665
738
  const blockWithNameLocator = this.page.locator('umb-block-type-card', { hasText: name });
666
- // The force click is necessary.
667
- await this.click(blockWithNameLocator.getByLabel('Remove block'), { force: true });
739
+ await (0, test_1.expect)(blockWithNameLocator).toBeVisible();
740
+ // The force click is necessary.
741
+ await blockWithNameLocator.getByLabel('Remove block').click({ force: true });
668
742
  }
669
743
  async enterMinAmount(value) {
670
- await this.enterText(this.minAmountTxt, value);
744
+ await (0, test_1.expect)(this.minAmountTxt).toBeVisible();
745
+ await this.minAmountTxt.clear();
746
+ await this.minAmountTxt.fill(value);
671
747
  }
672
748
  async enterMaxAmount(value) {
673
- await this.enterText(this.maxAmountTxt, value);
749
+ await (0, test_1.expect)(this.maxAmountTxt).toBeVisible();
750
+ await this.maxAmountTxt.clear();
751
+ await this.maxAmountTxt.fill(value);
674
752
  }
675
753
  async doesAmountContainErrorMessageWithText(errorMessage) {
676
- await this.isVisible(this.page.getByText(errorMessage));
754
+ return await (0, test_1.expect)(this.page.getByText(errorMessage)).toBeVisible();
677
755
  }
678
756
  async clickSingleBlockMode() {
679
- await this.click(this.singleBlockModeBtn);
757
+ await (0, test_1.expect)(this.singleBlockModeBtn).toBeVisible();
758
+ await this.singleBlockModeBtn.click();
680
759
  }
681
760
  async clickLiveEditingMode() {
682
- await this.click(this.liveEditingModeBtn);
761
+ await (0, test_1.expect)(this.liveEditingModeBtn).toBeVisible();
762
+ await this.liveEditingModeBtn.click();
683
763
  }
684
764
  async clickInlineEditingMode() {
685
- await this.click(this.inlineEditingModeBtn);
765
+ await (0, test_1.expect)(this.inlineEditingModeBtn).toBeVisible();
766
+ await this.inlineEditingModeBtn.click();
686
767
  }
687
768
  async enterPropertyEditorWidth(width) {
688
- await this.enterText(this.propertyEditorWidthTxt, width);
769
+ await (0, test_1.expect)(this.propertyEditorWidthTxt).toBeVisible();
770
+ await this.propertyEditorWidthTxt.clear();
771
+ await this.propertyEditorWidthTxt.fill(width);
689
772
  }
690
773
  async goToBlockWithName(name) {
691
- await this.click(this.page.getByRole('link', { name: name }));
774
+ await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
775
+ await this.page.getByRole('link', { name: name }).click();
692
776
  }
693
777
  async enterBlockLabelText(label) {
694
778
  await this.removeBlockLabelText();
695
779
  await this.labelTextTxt.fill(label);
696
780
  }
697
781
  async removeBlockLabelText() {
698
- await this.waitForVisible(this.labelTextTxt);
782
+ await (0, test_1.expect)(this.labelTextTxt).toBeVisible();
699
783
  await this.labelTextTxt.clear();
700
784
  }
701
785
  async clickAllowInRootForBlock() {
702
- await this.click(this.allowBlockAtRootToggle);
786
+ await (0, test_1.expect)(this.allowBlockAtRootToggle).toBeVisible();
787
+ await this.allowBlockAtRootToggle.click();
703
788
  }
704
789
  async clickAllowInAreasForBlock() {
705
- await this.click(this.allowInAreasToggle);
790
+ await (0, test_1.expect)(this.allowInAreasToggle).toBeVisible();
791
+ await this.allowInAreasToggle.click();
706
792
  }
707
793
  async updateBlockOverlaySize(size) {
708
- await this.selectByValue(this.overlaySizeOption, size);
794
+ await (0, test_1.expect)(this.overlaySizeOption).toBeVisible();
795
+ await this.overlaySizeOption.selectOption(size);
709
796
  }
710
797
  async addBlockContentModel(elementName) {
711
- await this.click(this.chooseContentModelBtn);
798
+ await (0, test_1.expect)(this.chooseContentModelBtn).toBeVisible();
799
+ await this.chooseContentModelBtn.click();
712
800
  await this.clickButtonWithName(elementName);
713
801
  await this.clickChooseButton();
714
802
  }
715
803
  async addBlockSettingsModel(elementName) {
716
- await this.click(this.chooseSettingsModelBtn, { timeout: ConstantHelper_1.ConstantHelper.timeout.long });
804
+ await (0, test_1.expect)(this.chooseSettingsModelBtn).toBeVisible();
805
+ await this.chooseSettingsModelBtn.click();
717
806
  await this.clickModalMenuItemWithName(elementName);
718
807
  await this.clickChooseModalButton();
719
808
  }
720
809
  async removeBlockContentModel() {
721
- await this.hoverAndClick(this.contentModelNode, this.removeExactContentModelNodeBtn);
810
+ await (0, test_1.expect)(this.contentModelNode).toBeVisible();
811
+ await this.contentModelNode.hover();
812
+ await (0, test_1.expect)(this.removeExactContentModelNodeBtn).toBeVisible();
813
+ await this.removeExactContentModelNodeBtn.click();
722
814
  }
723
815
  async removeBlockSettingsModel() {
724
- await this.hoverAndClick(this.settingsModelNode, this.removeExactSettingsModelNodeBtn);
816
+ await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
817
+ await this.settingsModelNode.hover();
818
+ await (0, test_1.expect)(this.removeExactSettingsModelNodeBtn).toBeVisible();
819
+ await this.removeExactSettingsModelNodeBtn.click();
725
820
  }
726
821
  async openBlockContentModel() {
727
- await this.hoverAndClick(this.contentModelNode, this.openBtn);
822
+ await (0, test_1.expect)(this.contentModelNode).toBeVisible();
823
+ await this.contentModelNode.hover();
824
+ await (0, test_1.expect)(this.openBtn).toBeVisible();
825
+ await this.openBtn.click();
728
826
  }
729
827
  async openBlockSettingsModel() {
730
- await this.hoverAndClick(this.settingsModelNode, this.openBtn);
828
+ await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
829
+ await this.settingsModelNode.hover();
830
+ await (0, test_1.expect)(this.openBtn).toBeVisible();
831
+ await this.openBtn.click();
731
832
  }
732
833
  async isElementWorkspaceOpenInBlock(elementTypeName) {
733
- await this.isVisible(this.documentTypeWorkspace.filter({ hasText: elementTypeName }));
834
+ return await (0, test_1.expect)(this.documentTypeWorkspace.filter({ hasText: elementTypeName })).toBeVisible();
734
835
  }
735
836
  async selectBlockBackgroundColor(color) {
736
- await this.click(this.backgroundColorBtn);
737
- await this.enterText(this.backgroundColorTxt, color);
837
+ await (0, test_1.expect)(this.backgroundColorBtn).toBeVisible();
838
+ await this.backgroundColorBtn.click();
839
+ await this.backgroundColorTxt.clear();
840
+ await this.backgroundColorTxt.fill(color);
738
841
  }
739
842
  async selectBlockIconColor(color) {
740
- await this.click(this.iconColorBtn);
741
- await this.enterText(this.iconColorTxt, color);
843
+ await (0, test_1.expect)(this.iconColorBtn).toBeVisible();
844
+ await this.iconColorBtn.click();
845
+ await this.iconColorTxt.clear();
846
+ await this.iconColorTxt.fill(color);
742
847
  }
743
848
  async clickExpandChildItemsForMediaButton() {
744
- await this.click(this.expandChildItemsForMediaBtn);
849
+ await (0, test_1.expect)(this.expandChildItemsForMediaBtn).toBeVisible();
850
+ await this.expandChildItemsForMediaBtn.click();
745
851
  }
746
852
  async clickRemoveCustomStylesheetWithName(name) {
747
- await this.click(this.customStylesheetLabel.locator(`[name="${name}"]`));
748
- await this.click(this.stylesheetRemoveBtn);
853
+ await (0, test_1.expect)(this.customStylesheetLabel.locator('[name="' + name + '"]')).toBeVisible();
854
+ await this.customStylesheetLabel.locator('[name="' + name + '"]').click();
855
+ await (0, test_1.expect)(this.stylesheetRemoveBtn).toBeVisible();
856
+ await this.stylesheetRemoveBtn.click();
749
857
  await this.clickConfirmRemoveButton();
750
858
  }
751
859
  async clickBlockGridHideContentEditorButton() {
752
- await this.click(this.hideContentEditorBlockGridBtn);
860
+ await (0, test_1.expect)(this.hideContentEditorBlockGridBtn).toBeVisible();
861
+ await this.hideContentEditorBlockGridBtn.click();
753
862
  }
754
863
  async chooseBlockCustomStylesheetWithName(name) {
755
- await this.click(this.chooseCustomStylesheetBtn);
864
+ await (0, test_1.expect)(this.chooseCustomStylesheetBtn).toBeVisible();
865
+ await this.chooseCustomStylesheetBtn.click();
756
866
  await this.openCaretButtonForName('wwwroot');
757
867
  await this.openCaretButtonForName('css');
758
868
  await this.clickLabelWithName(name, true);
@@ -760,7 +870,8 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
760
870
  }
761
871
  async chooseBlockThumbnailWithPath(mediaPath) {
762
872
  const mediaItems = mediaPath.split('/media/')[1].split('/');
763
- await this.click(this.chooseThumbnailAlias);
873
+ await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
874
+ await this.chooseThumbnailAlias.click();
764
875
  await this.openCaretButtonForName('wwwroot', true);
765
876
  await this.clickExpandChildItemsForMediaButton();
766
877
  for (let i = 0; i < mediaItems.length; i++) {
@@ -768,22 +879,27 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
768
879
  await this.clickLabelWithName(mediaItems[i], true);
769
880
  }
770
881
  else {
771
- await this.click(this.sidebarModal.locator(`uui-menu-item[label="${mediaItems[i]}"] #caret-button`));
882
+ await this.sidebarModal.locator('uui-menu-item[label="' + mediaItems[i] + '"] #caret-button').click();
772
883
  }
773
884
  }
774
885
  await this.clickChooseModalButton();
775
886
  }
776
887
  async clickBlockListHideContentEditorButton() {
777
- await this.click(this.hideContentEditorBlockListBtn);
888
+ await (0, test_1.expect)(this.hideContentEditorBlockListBtn).toBeVisible();
889
+ await this.hideContentEditorBlockListBtn.click();
778
890
  }
779
891
  async enterEditorWidth(value) {
780
- await this.enterText(this.editorWidthTxt, value);
892
+ await (0, test_1.expect)(this.editorWidthTxt).toBeVisible();
893
+ await this.editorWidthTxt.clear();
894
+ await this.editorWidthTxt.fill(value);
781
895
  }
782
896
  async enterCreateButtonLabel(value) {
783
- await this.enterText(this.createButtonLabelTxt, value);
897
+ await (0, test_1.expect)(this.createButtonLabelTxt).toBeVisible();
898
+ await this.createButtonLabelTxt.clear();
899
+ await this.createButtonLabelTxt.fill(value);
784
900
  }
785
901
  async enterGridColumns(value) {
786
- await this.waitForVisible(this.gridColumnsTxt);
902
+ await (0, test_1.expect)(this.gridColumnsTxt).toBeVisible();
787
903
  await this.gridColumnsTxt.clear();
788
904
  if (value === undefined) {
789
905
  return;
@@ -791,18 +907,21 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
791
907
  await this.gridColumnsTxt.fill(value.toString());
792
908
  }
793
909
  async clickShowResizeOptions() {
794
- await this.click(this.showResizeOptionsBtn);
910
+ await (0, test_1.expect)(this.showResizeOptionsBtn).toBeVisible();
911
+ await this.showResizeOptionsBtn.click();
795
912
  }
796
913
  async clickAvailableColumnSpans(columnSpans) {
797
914
  for (let index in columnSpans) {
798
- await this.click(this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }));
915
+ await (0, test_1.expect)(this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true })).toBeVisible();
916
+ await this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }).click();
799
917
  }
800
918
  }
801
919
  async goToBlockAreasTab() {
802
- await this.click(this.areasTabBtn);
920
+ await (0, test_1.expect)(this.areasTabBtn).toBeVisible();
921
+ await this.areasTabBtn.click();
803
922
  }
804
923
  async enterMinRowSpan(value) {
805
- await this.waitForVisible(this.availableRowSpansLowValueTxt);
924
+ await (0, test_1.expect)(this.availableRowSpansLowValueTxt).toBeVisible();
806
925
  await this.availableRowSpansLowValueTxt.clear();
807
926
  if (value === undefined) {
808
927
  return;
@@ -810,7 +929,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
810
929
  await this.availableRowSpansLowValueTxt.fill(value.toString());
811
930
  }
812
931
  async enterMaxRowSpan(value) {
813
- await this.waitForVisible(this.availableRowSpansHighValueTxt);
932
+ await (0, test_1.expect)(this.availableRowSpansHighValueTxt).toBeVisible();
814
933
  await this.availableRowSpansHighValueTxt.clear();
815
934
  if (value === undefined) {
816
935
  return;
@@ -818,7 +937,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
818
937
  await this.availableRowSpansHighValueTxt.fill(value.toString());
819
938
  }
820
939
  async enterGridColumnsForArea(value) {
821
- await this.waitForVisible(this.areaGridColumnsTxt);
940
+ await (0, test_1.expect)(this.areaGridColumnsTxt).toBeVisible();
822
941
  await this.areaGridColumnsTxt.clear();
823
942
  if (value === undefined) {
824
943
  return;
@@ -826,28 +945,32 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
826
945
  await this.areaGridColumnsTxt.fill(value.toString());
827
946
  }
828
947
  async addAreaButton() {
829
- await this.click(this.addAreaBtn);
948
+ await (0, test_1.expect)(this.addAreaBtn).toBeVisible();
949
+ await this.addAreaBtn.click();
830
950
  }
831
951
  async goToAreaByAlias(alias) {
832
952
  const editAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('edit');
833
- // Force click is needed
834
- await this.click(editAreaWithAliasLocator, { force: true });
953
+ await (0, test_1.expect)(editAreaWithAliasLocator).toBeVisible();
954
+ await editAreaWithAliasLocator.click({ force: true });
835
955
  }
836
956
  async clickRemoveAreaByAlias(alias) {
837
957
  const removeAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('delete');
838
- // Force click is needed
839
- await this.click(removeAreaWithAliasLocator, { force: true });
958
+ await (0, test_1.expect)(removeAreaWithAliasLocator).toBeVisible();
959
+ await removeAreaWithAliasLocator.click({ force: true });
840
960
  await this.clickConfirmToDeleteButton();
841
961
  }
842
962
  async enterAreaAlias(alias) {
843
- await this.enterText(this.aliasAliasTxt, alias);
963
+ await (0, test_1.expect)(this.aliasAliasTxt).toBeVisible();
964
+ await this.aliasAliasTxt.clear();
965
+ await this.aliasAliasTxt.fill(alias);
844
966
  }
845
967
  async clickAreaSubmitButton() {
846
- await this.click(this.blockGridAreaWorkspaceSubmitBtn);
847
- await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
968
+ await (0, test_1.expect)(this.blockGridAreaWorkspaceSubmitBtn).toBeVisible();
969
+ await this.blockGridAreaWorkspaceSubmitBtn.click();
970
+ await this.page.waitForTimeout(500);
848
971
  }
849
972
  async enterCreateButtonLabelInArea(value) {
850
- await this.waitForVisible(this.createLabelTxt.nth(1));
973
+ await (0, test_1.expect)(this.createLabelTxt.nth(1)).toBeVisible();
851
974
  await this.createLabelTxt.nth(1).clear();
852
975
  if (value === undefined) {
853
976
  return;
@@ -855,7 +978,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
855
978
  await this.createLabelTxt.nth(1).fill(value);
856
979
  }
857
980
  async enterMinAllowedInArea(value) {
858
- await this.waitForVisible(this.minAllowedTxt);
981
+ await (0, test_1.expect)(this.minAllowedTxt).toBeVisible();
859
982
  await this.minAllowedTxt.clear();
860
983
  if (value === undefined) {
861
984
  return;
@@ -863,7 +986,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
863
986
  await this.minAllowedTxt.fill(value.toString());
864
987
  }
865
988
  async enterMaxAllowedInArea(value) {
866
- await this.waitForVisible(this.maxAllowedTxt);
989
+ await (0, test_1.expect)(this.maxAllowedTxt).toBeVisible();
867
990
  await this.maxAllowedTxt.clear();
868
991
  if (value === undefined) {
869
992
  return;
@@ -871,61 +994,72 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
871
994
  await this.maxAllowedTxt.fill(value.toString());
872
995
  }
873
996
  async clickAddSpecifiedAllowanceButton() {
874
- await this.click(this.addSpecifiedAllowanceBtn);
997
+ await (0, test_1.expect)(this.addSpecifiedAllowanceBtn).toBeVisible();
998
+ await this.addSpecifiedAllowanceBtn.click();
875
999
  }
876
1000
  async goToBlockAdvancedTab() {
877
- await this.click(this.advancedTabBtn);
1001
+ await (0, test_1.expect)(this.advancedTabBtn).toBeVisible();
1002
+ await this.advancedTabBtn.click();
878
1003
  }
879
1004
  async getLinkWithName(name) {
880
- await this.isVisible(this.page.getByRole('link', { name: name }));
1005
+ await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
881
1006
  return this.page.getByRole('link', { name: name });
882
1007
  }
883
1008
  async getAddButtonInGroupWithName(name) {
884
- await this.isVisible(this.page.locator('.group').filter({ hasText: name }).locator('#add-button'));
1009
+ await (0, test_1.expect)(this.page.locator('.group').filter({ hasText: name }).locator('#add-button')).toBeVisible();
885
1010
  return this.page.locator('.group').filter({ hasText: name }).locator('#add-button');
886
1011
  }
887
1012
  async clickRemoveStylesheetButton(stylesheetName) {
888
1013
  const removeButton = this.entityItem.filter({ hasText: stylesheetName }).getByLabel('Remove');
889
- await this.click(removeButton);
1014
+ await (0, test_1.expect)(removeButton).toBeVisible();
1015
+ await removeButton.click();
890
1016
  }
891
1017
  // TipTap
892
1018
  async deleteToolbarGroup(groupIndex, rowIndex = 0) {
893
1019
  const groupButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex).locator('.group').nth(groupIndex);
894
- await this.hover(groupButton);
1020
+ await (0, test_1.expect)(groupButton).toBeVisible();
1021
+ await groupButton.hover();
895
1022
  const actionsInGroup = groupButton.locator('.items').locator('uui-button');
896
1023
  const actionsCount = await actionsInGroup.count();
897
1024
  for (let i = 0; i < actionsCount; i++) {
898
- await this.click(actionsInGroup.first());
1025
+ await actionsInGroup.first().click();
899
1026
  }
900
- await this.click(groupButton.locator('[label="Remove group"]'));
1027
+ await groupButton.locator('[label="Remove group"]').click();
901
1028
  }
902
1029
  async deleteToolbarRow(rowIndex) {
903
1030
  const rowButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex);
904
- await this.hoverAndClick(rowButton, rowButton.locator('[label="Remove row"]'));
1031
+ await (0, test_1.expect)(rowButton).toBeVisible();
1032
+ await rowButton.hover();
1033
+ await rowButton.locator('[label="Remove row"]').click();
905
1034
  }
906
1035
  async clickAddRowToolbarButton() {
907
- await this.click(this.addRowToolbarBtn);
1036
+ await (0, test_1.expect)(this.addRowToolbarBtn).toBeVisible();
1037
+ await this.addRowToolbarBtn.click();
908
1038
  }
909
1039
  async clickAddGroupToolbarButton() {
910
- await this.click(this.addGroupToolbarBtn);
1040
+ await (0, test_1.expect)(this.addGroupToolbarBtn).toBeVisible();
1041
+ await this.addGroupToolbarBtn.click();
911
1042
  }
912
1043
  async clickExtensionItemWithName(name) {
913
- await this.click(this.tiptapExtensionsConfiguration.locator(`uui-checkbox[label="${name}"]`));
1044
+ await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]')).toBeVisible();
1045
+ await this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]').click();
914
1046
  }
915
1047
  async doesPropertyEditorHaveUiAlias(uiAlias) {
916
- await this.hasAttribute(this.propertyEditor, 'alias', uiAlias);
1048
+ await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('alias', uiAlias);
917
1049
  }
918
1050
  async doesPropertyEditorHaveName(name) {
919
- await this.hasAttribute(this.propertyEditor, 'name', name);
1051
+ await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('name', name);
920
1052
  }
921
1053
  async doesPropertyEditorHaveAlias(alias) {
922
- await this.hasAttribute(this.propertyEditor, 'property-editor-schema-alias', alias);
1054
+ await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('property-editor-schema-alias', alias);
923
1055
  }
924
1056
  async clickDataTypeButton() {
925
- await this.click(this.dataTypeBtn);
1057
+ await (0, test_1.expect)(this.dataTypeBtn).toBeVisible();
1058
+ await this.dataTypeBtn.click();
926
1059
  }
927
1060
  async clickDataTypesMenu() {
928
- await this.click(this.dataTypesMenu);
1061
+ await (0, test_1.expect)(this.dataTypesMenu).toBeVisible();
1062
+ await this.dataTypesMenu.click();
929
1063
  }
930
1064
  async doesSettingHaveValue(settings) {
931
1065
  for (let index = 0; index < Object.keys(settings).length; index++) {
@@ -936,37 +1070,42 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
936
1070
  }
937
1071
  }
938
1072
  async doesSettingItemsHaveCount(settings) {
939
- await this.hasCount(this.propertyEditorConfigItems, Object.keys(settings).length);
1073
+ await (0, test_1.expect)(this.propertyEditorConfigItems).toHaveCount(Object.keys(settings).length);
940
1074
  }
941
1075
  async doesSettingsContainText(text) {
942
- await this.containsText(this.propertyEditorConfig, text);
1076
+ await (0, test_1.expect)(this.propertyEditorConfig).toContainText(text);
943
1077
  }
944
1078
  async clickStatusbarItemInToolboxWithName(name) {
945
1079
  const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#toolbox uui-button').filter({ hasText: name });
946
- await this.click(statusbarItemLocator);
1080
+ await (0, test_1.expect)(statusbarItemLocator).toBeVisible();
1081
+ await statusbarItemLocator.click();
947
1082
  }
948
1083
  async clickStatusbarItemWithName(name) {
949
1084
  const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#statusbar uui-button').filter({ hasText: name });
950
- await this.click(statusbarItemLocator);
1085
+ await (0, test_1.expect)(statusbarItemLocator).toBeVisible();
1086
+ await statusbarItemLocator.click();
951
1087
  }
952
1088
  async isExtensionItemChecked(itemName, isChecked = true) {
953
- await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator(`uui-checkbox[label="${itemName}"] input`)).toBeChecked({ checked: isChecked });
1089
+ await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + itemName + '"] input')).toBeChecked({ checked: isChecked });
954
1090
  }
955
1091
  async doesBlockHaveThumbnailImage(thumbnailImageUrl) {
956
- await this.hasAttribute(this.blockThumbnailImage, 'src', thumbnailImageUrl);
1092
+ await (0, test_1.expect)(this.blockThumbnailImage).toHaveAttribute('src', thumbnailImageUrl);
957
1093
  }
958
1094
  async addTimeZones(timeZones) {
959
1095
  for (let i = 0; i < timeZones.length; i++) {
960
- await this.click(this.timeZoneDropDown);
961
- await this.click(this.timeZoneDropDown.getByText(timeZones[i]));
962
- await this.click(this.addTimeZoneBtn);
1096
+ (0, test_1.expect)(this.timeZoneDropDown).toBeVisible();
1097
+ await this.timeZoneDropDown.click();
1098
+ await this.timeZoneDropDown.getByText(timeZones[i]).click();
1099
+ await this.addTimeZoneBtn.click();
963
1100
  }
964
1101
  }
965
1102
  async clickChooseDataSourceButton() {
966
- await this.click(this.dataSourceChooseBtn);
1103
+ await (0, test_1.expect)(this.dataSourceChooseBtn).toBeVisible();
1104
+ await this.dataSourceChooseBtn.click();
967
1105
  }
968
1106
  async clickChooseThumbnailButton() {
969
- await this.click(this.chooseThumbnailAlias);
1107
+ await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
1108
+ await this.chooseThumbnailAlias.click();
970
1109
  }
971
1110
  }
972
1111
  exports.DataTypeUiHelper = DataTypeUiHelper;