@bigbinary/neeto-playwright-commons 6.1.0 → 6.1.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.d.ts +5 -1
- package/index.js +3 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ interface AssertCardDetailsProps {
|
|
|
40
40
|
cardLocator: Locator;
|
|
41
41
|
title: string;
|
|
42
42
|
description: string;
|
|
43
|
+
subLinkId?: string;
|
|
43
44
|
}
|
|
44
45
|
type ErrorHandlingResult<T> = {
|
|
45
46
|
success: true;
|
|
@@ -658,6 +659,8 @@ declare class CustomCommands {
|
|
|
658
659
|
*
|
|
659
660
|
* description: The description of the card.
|
|
660
661
|
*
|
|
662
|
+
* subLinkId (optional): The sidebar sub-link's test ID prefix, used to check it isn't highlighted. Defaults to title.
|
|
663
|
+
*
|
|
661
664
|
* @example
|
|
662
665
|
*
|
|
663
666
|
* await neetoPlaywrightUtilities.assertCardDetails({
|
|
@@ -670,7 +673,8 @@ declare class CustomCommands {
|
|
|
670
673
|
assertCardDetails: ({
|
|
671
674
|
cardLocator,
|
|
672
675
|
title,
|
|
673
|
-
description
|
|
676
|
+
description,
|
|
677
|
+
subLinkId
|
|
674
678
|
}: AssertCardDetailsProps) => Promise<[void, void, void]>;
|
|
675
679
|
/**
|
|
676
680
|
*
|
package/index.js
CHANGED
|
@@ -926,7 +926,7 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
926
926
|
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
927
927
|
errorText: "neeto-editor-error-text",
|
|
928
928
|
content: "editor-content",
|
|
929
|
-
imageUploadDeleteButton: "neeto-editor-image-menu-
|
|
929
|
+
imageUploadDeleteButton: "neeto-editor-image-menu-delete",
|
|
930
930
|
dynamicVariablesButton: "dynamic-variables-button",
|
|
931
931
|
emojiContainer: "neeto-editor-emoji-picker",
|
|
932
932
|
characterCount: "neeto-editor-character-count",
|
|
@@ -2587,10 +2587,10 @@ class CustomCommands {
|
|
|
2587
2587
|
});
|
|
2588
2588
|
await this.page.mouse.up();
|
|
2589
2589
|
};
|
|
2590
|
-
assertCardDetails = ({ cardLocator, title, description, }) => Promise.all([
|
|
2590
|
+
assertCardDetails = ({ cardLocator, title, description, subLinkId = title, }) => Promise.all([
|
|
2591
2591
|
expect(cardLocator.getByTestId(ADMIN_PANEL_SELECTORS.settingsItemHeading)).toHaveText(title),
|
|
2592
2592
|
expect(cardLocator.getByTestId(ADMIN_PANEL_SELECTORS.settingsItemDescription)).toHaveText(description),
|
|
2593
|
-
expect(this.page.getByTestId(COMMON_SELECTORS.sidebarSubLink(
|
|
2593
|
+
expect(this.page.getByTestId(COMMON_SELECTORS.sidebarSubLink(subLinkId))).toHaveCSS("background-color", COLOR.transparent),
|
|
2594
2594
|
]);
|
|
2595
2595
|
executeWithErrorHandling = async (asyncFn) => {
|
|
2596
2596
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
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",
|