@bigbinary/neeto-playwright-commons 1.22.21 → 1.22.23
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 +33 -8
- package/index.cjs.js.map +1 -1
- package/index.d.ts +21 -2
- package/index.js +33 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -147,6 +147,16 @@ class ApiKeysApi {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
class CustomDomainApi {
|
|
151
|
+
constructor(neetoPlaywrightUtilities) {
|
|
152
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
153
|
+
this.delete = (customDomain) => this.neetoPlaywrightUtilities.apiRequest({
|
|
154
|
+
url: `${BASE_URL}/custom_domains/${customDomain}`,
|
|
155
|
+
method: "delete",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
let MemberApis$1 = class MemberApis {
|
|
151
161
|
constructor(neetoPlaywrightUtilities) {
|
|
152
162
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
@@ -3478,6 +3488,7 @@ const COMMON_SELECTORS = {
|
|
|
3478
3488
|
checkboxInput: (option = "i-agree") => `${neetoCist.hyphenate(option)}-checkbox-input`,
|
|
3479
3489
|
radioInput: (option = "i-agree") => `${neetoCist.hyphenate(option)}-radio-input`,
|
|
3480
3490
|
selectOptionError: (option) => `${neetoCist.hyphenate(option)}-select-error`,
|
|
3491
|
+
button: (label) => `${neetoCist.hyphenate(label)}-button`,
|
|
3481
3492
|
customDropDownMenu: (label = "nui") => `${neetoCist.hyphenate(label)}-select-menu`,
|
|
3482
3493
|
};
|
|
3483
3494
|
|
|
@@ -3849,6 +3860,7 @@ const HELP_CENTER_SELECTORS = {
|
|
|
3849
3860
|
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
3850
3861
|
statusButton: "help-link-status-button",
|
|
3851
3862
|
communityButton: "help-link-community-button",
|
|
3863
|
+
subscriptionPlan: "subscription-plan",
|
|
3852
3864
|
};
|
|
3853
3865
|
|
|
3854
3866
|
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
@@ -3946,6 +3958,7 @@ const PROFILE_SECTION_SELECTORS = {
|
|
|
3946
3958
|
neetoAuthLink: "ntm-visit-auth-button",
|
|
3947
3959
|
profileSidebarCancelButton: "ntm-profile-cancel-button",
|
|
3948
3960
|
profileAvatar: "profile-avatar",
|
|
3961
|
+
actionHeaderUserName: "floating-action-menu-header-user-name",
|
|
3949
3962
|
actionHeaderUserEmail: "floating-action-menu-header-user-email",
|
|
3950
3963
|
submitButton: "ntm-profile-submit-button",
|
|
3951
3964
|
manageBillingAndSubscriptionsButton: "manage-billing-subscriptions-menu-button",
|
|
@@ -189290,8 +189303,12 @@ class HelpAndProfilePage {
|
|
|
189290
189303
|
.getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
|
|
189291
189304
|
.click();
|
|
189292
189305
|
const changelogPage = await changelogPagePromise;
|
|
189293
|
-
await
|
|
189306
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
189307
|
+
customPageContext: changelogPage,
|
|
189308
|
+
});
|
|
189309
|
+
await test$1.expect(changelogPage.getByRole("button", { name: ENGAGE_TEXTS.subscribe })).toBeVisible({ timeout: 10000 });
|
|
189294
189310
|
await test$1.expect(changelogPage).toHaveURL(this.changelogBaseURL);
|
|
189311
|
+
await changelogPage.close();
|
|
189295
189312
|
});
|
|
189296
189313
|
};
|
|
189297
189314
|
this.formatKeyboardShortcut = (shortcut, osPlatform = "windows") => {
|
|
@@ -189556,25 +189573,23 @@ class HelpAndProfilePage {
|
|
|
189556
189573
|
this.verifySubscriptionPlan = async (plan, product) => {
|
|
189557
189574
|
await test$1.test.step("1: Open Help Center links", () => this.openHelpCenter());
|
|
189558
189575
|
await test$1.test.step("2: Open and verify subscription plan", async () => {
|
|
189576
|
+
const subscriptionPlan = this.page.getByTestId(HELP_CENTER_SELECTORS.subscriptionPlan);
|
|
189559
189577
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
189560
|
-
await test$1.expect(
|
|
189578
|
+
await test$1.expect(subscriptionPlan).toHaveText(this.t("neetoMolecules.sidebar.currentPlan", {
|
|
189561
189579
|
subscriptionPlan: plan,
|
|
189562
189580
|
}));
|
|
189563
|
-
await
|
|
189564
|
-
.getByTestId(COMMON_SELECTORS.floatingActionMenuLink)
|
|
189565
|
-
.click();
|
|
189581
|
+
await subscriptionPlan.click();
|
|
189566
189582
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
189567
189583
|
await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.auth.billing));
|
|
189568
189584
|
if (!neetoCist.isPresent(product))
|
|
189569
189585
|
return;
|
|
189570
|
-
|
|
189571
|
-
const actionButtonName = plan === "Free" ? "Upgrade" : "Downgrade";
|
|
189586
|
+
const actionName = plan === "Free" ? "Upgrade" : "Downgrade";
|
|
189572
189587
|
const productRow = this.page.getByRole("row", {
|
|
189573
189588
|
name: `Neeto${product}`,
|
|
189574
189589
|
});
|
|
189575
189590
|
await Promise.all([
|
|
189576
189591
|
test$1.expect(productRow.getByRole("cell", { name: plan })).toBeVisible(),
|
|
189577
|
-
test$1.expect(productRow.
|
|
189592
|
+
test$1.expect(productRow.getByTestId(COMMON_SELECTORS.button(actionName))).toBeVisible(),
|
|
189578
189593
|
]);
|
|
189579
189594
|
});
|
|
189580
189595
|
};
|
|
@@ -193455,11 +193470,20 @@ class CustomDomainPage {
|
|
|
193455
193470
|
await this.neetoPlaywrightUtilities.verifyToast();
|
|
193456
193471
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.noDataTitle)).toBeVisible();
|
|
193457
193472
|
};
|
|
193473
|
+
this.disconnectViaRequest = async () => {
|
|
193474
|
+
if (shouldSkipCustomDomainSetup())
|
|
193475
|
+
return;
|
|
193476
|
+
const customDomain = this.getCustomDomain(this.subdomain);
|
|
193477
|
+
if (!neetoCist.isPresent(customDomain))
|
|
193478
|
+
return;
|
|
193479
|
+
await this.customDomainApi.delete(customDomain);
|
|
193480
|
+
};
|
|
193458
193481
|
this.page = page;
|
|
193459
193482
|
this.browser = browser;
|
|
193460
193483
|
this.product = product;
|
|
193461
193484
|
this.t = playwrightI18nextFixture.getI18nInstance().t;
|
|
193462
193485
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
193486
|
+
this.customDomainApi = new CustomDomainApi(neetoPlaywrightUtilities);
|
|
193463
193487
|
}
|
|
193464
193488
|
}
|
|
193465
193489
|
|
|
@@ -198824,6 +198848,7 @@ exports.CREDENTIALS = CREDENTIALS;
|
|
|
198824
198848
|
exports.CUSTOM_DOMAIN_SELECTORS = CUSTOM_DOMAIN_SELECTORS;
|
|
198825
198849
|
exports.CUSTOM_DOMAIN_SUFFIX = CUSTOM_DOMAIN_SUFFIX;
|
|
198826
198850
|
exports.CustomCommands = CustomCommands;
|
|
198851
|
+
exports.CustomDomainApi = CustomDomainApi;
|
|
198827
198852
|
exports.CustomDomainPage = CustomDomainPage;
|
|
198828
198853
|
exports.DATE_PICKER_SELECTORS = DATE_PICKER_SELECTORS;
|
|
198829
198854
|
exports.DATE_TEXTS = DATE_TEXTS;
|