@bigbinary/neeto-playwright-commons 1.21.0 → 1.21.1
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.
- package/index.cjs.js +14 -19
- package/index.cjs.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +14 -19
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -192020,32 +192020,27 @@ class EditorPage {
|
|
|
192020
192020
|
};
|
|
192021
192021
|
this.verifyFontSize = async () => {
|
|
192022
192022
|
const fontsAndTexts = [];
|
|
192023
|
-
|
|
192024
|
-
|
|
192025
|
-
|
|
192026
|
-
const allButtons = await this.page
|
|
192023
|
+
const fontSizeDropdownButton = this.page.getByTestId(NEETO_EDITOR_SELECTORS.neetoEditorFixedMenuFontSize);
|
|
192024
|
+
await fontSizeDropdownButton.click();
|
|
192025
|
+
const headingButtons = await this.page
|
|
192027
192026
|
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
192028
192027
|
.getByRole("button")
|
|
192029
192028
|
.all();
|
|
192030
|
-
const
|
|
192029
|
+
const headingLevels = (await Promise.all(headingButtons.map(async (button) => {
|
|
192031
192030
|
const dataCy = await button.getAttribute("data-cy");
|
|
192032
|
-
|
|
192033
|
-
|
|
192034
|
-
: null;
|
|
192031
|
+
const headingLevel = dataCy === null || dataCy === void 0 ? void 0 : dataCy.split("-").pop();
|
|
192032
|
+
return /^h[1-5]$/.test(headingLevel || "") ? headingLevel : null;
|
|
192035
192033
|
}))).filter(Boolean);
|
|
192036
|
-
|
|
192037
|
-
|
|
192038
|
-
const fontKey =
|
|
192039
|
-
if (!fontKey)
|
|
192040
|
-
continue;
|
|
192041
|
-
const headingLevel = Number(fontKey.slice(1));
|
|
192034
|
+
const fontSizeDropdown = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fontSize);
|
|
192035
|
+
for (const headingLevel of headingLevels) {
|
|
192036
|
+
const fontKey = headingLevel;
|
|
192042
192037
|
const randomText = await this.fillRandomText();
|
|
192043
|
-
await
|
|
192044
|
-
|
|
192038
|
+
await fontSizeDropdown.click();
|
|
192039
|
+
await this.editorWrapper
|
|
192040
|
+
.getByTestId(FONT_SIZE_SELECTORS[fontKey])
|
|
192045
192041
|
.click();
|
|
192046
|
-
await button.click();
|
|
192047
192042
|
await test$1.expect(this.contentField.getByRole("heading", {
|
|
192048
|
-
level: headingLevel,
|
|
192043
|
+
level: Number(headingLevel === null || headingLevel === void 0 ? void 0 : headingLevel.slice(1)),
|
|
192049
192044
|
name: randomText,
|
|
192050
192045
|
})).toBeVisible();
|
|
192051
192046
|
fontsAndTexts.push({
|
|
@@ -193253,7 +193248,7 @@ class RolesPage {
|
|
|
193253
193248
|
const { permissions } = await this.roleApis
|
|
193254
193249
|
.fetch("permissions")
|
|
193255
193250
|
.then(response => response === null || response === void 0 ? void 0 : response.json());
|
|
193256
|
-
const permissionObjects = targetPermissions.
|
|
193251
|
+
const permissionObjects = targetPermissions.flatMap(permission => permissions.filter((p) => p.category === permission));
|
|
193257
193252
|
return ramda.pluck("id", permissionObjects);
|
|
193258
193253
|
};
|
|
193259
193254
|
this.getRoleIdAndOrganizationId = async (roleName) => {
|