@bigbinary/neeto-playwright-commons 1.9.23 → 1.9.24
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 +6 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +12 -0
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -939,6 +939,18 @@ declare class SlackPage extends IntegrationBase {
|
|
|
939
939
|
neetoPlaywrightUtilities,
|
|
940
940
|
integrationRouteIndex
|
|
941
941
|
}: SlackPageParams);
|
|
942
|
+
/**
|
|
943
|
+
*
|
|
944
|
+
* Closes the coach mark modal that appears when a user logs in to Slack for the first time. It can be useful in scenarios where the coach mark is blocking the view of the elements that need to be interacted with. It takes the following parameters:
|
|
945
|
+
*
|
|
946
|
+
* slackWebappPage (optional): Playwright Page object for Slack web app.
|
|
947
|
+
*
|
|
948
|
+
* @example
|
|
949
|
+
*
|
|
950
|
+
* await slackPage.closeCoachMark(slackWebappPageInstance);
|
|
951
|
+
* @endexample
|
|
952
|
+
*/
|
|
953
|
+
closeCoachMark: (slackWebappPage?: Page) => Promise<void>;
|
|
942
954
|
/**
|
|
943
955
|
*
|
|
944
956
|
* Connects to slack integration and verifies the connection. It takes the following parameters:
|
package/index.js
CHANGED
|
@@ -13907,6 +13907,11 @@ class SlackPage extends IntegrationBase {
|
|
|
13907
13907
|
integration: "slack",
|
|
13908
13908
|
integrationRouteIndex,
|
|
13909
13909
|
});
|
|
13910
|
+
this.closeCoachMark = async (slackWebappPage = this.page) => {
|
|
13911
|
+
const slackWebappPageDataQa = getByDataQA(slackWebappPage);
|
|
13912
|
+
const closeCoachMarkButton = slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.coachMarkCloseButton);
|
|
13913
|
+
await closeCoachMarkButton.click();
|
|
13914
|
+
};
|
|
13910
13915
|
this.connectAndVerifyIntegration = async (redirectUrl, customSteps, channelToConfigure = SLACK_DEFAULT_CHANNEL) => {
|
|
13911
13916
|
await this.connect();
|
|
13912
13917
|
await this.page
|
|
@@ -14011,6 +14016,7 @@ class SlackPage extends IntegrationBase {
|
|
|
14011
14016
|
await slackWebappPage
|
|
14012
14017
|
.locator(SLACK_SELECTORS.redirectOpenInBrowser)
|
|
14013
14018
|
.click();
|
|
14019
|
+
await this.closeCoachMark(slackWebappPage);
|
|
14014
14020
|
}
|
|
14015
14021
|
else {
|
|
14016
14022
|
throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined.");
|