@umbraco/playwright-testhelpers 16.0.44 → 16.0.46

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.
@@ -422,6 +422,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
422
422
  selectAllRTETipTapEditorText(): Promise<void>;
423
423
  waitForContentToBePublished(): Promise<void>;
424
424
  waitForRecycleBinToBeEmptied(): Promise<void>;
425
+ clearTipTapEditor(): Promise<void>;
425
426
  clickBlockElementInRTEWithName(elementTypeName: string): Promise<void>;
426
427
  doesModalFormValidationMessageContainText(text: string): Promise<void>;
427
428
  enterSearchKeywordInTreePickerModal(keyword: string): Promise<void>;
@@ -1423,6 +1423,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1423
1423
  async waitForRecycleBinToBeEmptied() {
1424
1424
  await this.waitForNetworkToBeIdle();
1425
1425
  }
1426
+ async clearTipTapEditor() {
1427
+ await (0, test_1.expect)(this.tipTapEditor).toBeVisible();
1428
+ // We use the middle mouse button click so we don't accidentally open a block in the RTE. This solution avoids that.
1429
+ await this.tipTapEditor.click({ button: "middle" });
1430
+ await this.page.keyboard.press('Control+A');
1431
+ await this.page.keyboard.press('Backspace');
1432
+ }
1426
1433
  async clickBlockElementInRTEWithName(elementTypeName) {
1427
1434
  const blockElementLocator = this.page.locator('uui-ref-node umb-ufm-render').filter({ hasText: elementTypeName });
1428
1435
  await (0, test_1.expect)(blockElementLocator).toBeVisible();