@bigbinary/neeto-playwright-commons 4.2.1 → 4.2.3

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 (3) hide show
  1. package/index.d.ts +3 -2
  2. package/index.js +8 -6
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -6867,6 +6867,7 @@ declare const NEETO_EDITOR_SELECTORS: {
6867
6867
  neetoEditorHighlightTextColor: (textColorIndex: number) => string;
6868
6868
  neetoEditorHighlightBgColor: (bgColorIndex: number) => string;
6869
6869
  todoList: string;
6870
+ selectedText: string;
6870
6871
  commandListItem: (index: number) => string;
6871
6872
  itemBlockHeading: string;
6872
6873
  };
@@ -7400,7 +7401,7 @@ declare const PROFILE_SECTION_SELECTORS: {
7400
7401
  *
7401
7402
  * tableHeaderRoleTitle: Selector for the title in the roles table header.
7402
7403
  *
7403
- * permissionCheckbox: Selector for the permission checkbox.
7404
+ * permissionCheckbox(name): Builder for the add/edit-role pane permission checkbox, keyed on the permission name (e.g. meetings.create_meeting).
7404
7405
  *
7405
7406
  * editRoleButton: Selector for the edit role button in the roles table.
7406
7407
  *
@@ -7431,7 +7432,7 @@ declare const ROLES_SELECTORS: {
7431
7432
  headerColumn: string;
7432
7433
  dropDownIcon: string;
7433
7434
  tableHeaderRoleTitle: string;
7434
- permissionCheckbox: string;
7435
+ permissionCheckbox: (name: string) => string;
7435
7436
  editRoleButton: string;
7436
7437
  deleteRoleButton: string;
7437
7438
  permissionCard: string;
package/index.js CHANGED
@@ -1377,6 +1377,7 @@ const NEETO_EDITOR_SELECTORS = {
1377
1377
  neetoEditorHighlightTextColor: (textColorIndex) => `neeto-editor-highlight-text-color-dot-${textColorIndex}`,
1378
1378
  neetoEditorHighlightBgColor: (bgColorIndex) => `neeto-editor-highlight-background-color-dot-${bgColorIndex}`,
1379
1379
  todoList: "[data-type='todoList']",
1380
+ selectedText: ".selected-text",
1380
1381
  commandListItem: (index) => `neeto-editor-command-list-item-${index}`,
1381
1382
  itemBlockHeading: "neeto-editor-command-list-item-block-heading",
1382
1383
  };
@@ -1620,7 +1621,7 @@ const ROLES_SELECTORS = {
1620
1621
  headerColumn: "ntm-roles-table-header",
1621
1622
  dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
1622
1623
  tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
1623
- permissionCheckbox: "ntm-roles-permission-checkbox",
1624
+ permissionCheckbox: (name) => `ntm-roles-permission-checkbox-${hyphenate(name)}`,
1624
1625
  editRoleButton: "ntm-roles-table-edit-role-button",
1625
1626
  deleteRoleButton: "ntm-roles-table-delete-role-button",
1626
1627
  permissionCard: "ntm-roles-permission-card",
@@ -2385,11 +2386,12 @@ class CustomCommands {
2385
2386
  const isMacOS = os.platform() === "darwin";
2386
2387
  const rightArrowKey = isMacOS ? "Meta+ArrowRight" : "End";
2387
2388
  const downArrowKey = isMacOS ? "Meta+ArrowDown" : "PageDown";
2388
- await this.page.keyboard.press(rightArrowKey);
2389
- await this.page.keyboard.press(rightArrowKey);
2390
- await this.page.keyboard.press(downArrowKey);
2391
- // eslint-disable-next-line playwright/no-wait-for-timeout
2392
- await this.page.waitForTimeout(500); // Adding some delay for DOM to react
2389
+ await expect(async () => {
2390
+ await this.page.keyboard.press(rightArrowKey);
2391
+ await this.page.keyboard.press(rightArrowKey);
2392
+ await this.page.keyboard.press(downArrowKey);
2393
+ await expect(this.page.locator(NEETO_EDITOR_SELECTORS.selectedText)).toHaveCount(0, { timeout: 2_000 });
2394
+ }).toPass({ timeout: 15_000 });
2393
2395
  await this.page.keyboard.press("Enter");
2394
2396
  };
2395
2397
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-playwright-commons",
3
- "version": "4.2.1",
3
+ "version": "4.2.3",
4
4
  "description": "A package encapsulating common playwright code across neeto projects.",
5
5
  "repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
6
6
  "license": "apache-2.0",