@bigbinary/neeto-playwright-commons 1.22.13 → 1.22.14

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 CHANGED
@@ -49,6 +49,103 @@ function _interopNamespaceDefault(e) {
49
49
  var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs$d);
50
50
  var Path__namespace = /*#__PURE__*/_interopNamespaceDefault(Path);
51
51
 
52
+ const BASE_URL = "/api/v1";
53
+ const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
54
+ const ROUTES = {
55
+ neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
56
+ neetoAuth: NEETO_AUTH_BASE_URL(),
57
+ loginLink: "/login",
58
+ profile: "/profile",
59
+ admin: "/admin",
60
+ myProfile: "/my/profile",
61
+ authSettings: "/settings",
62
+ webhooks: "/webhooks",
63
+ login: `${BASE_URL}/login`,
64
+ signup: `${BASE_URL}/signups`,
65
+ subdomainAvailability: `${BASE_URL}/subdomain_availability`,
66
+ countries: `${BASE_URL}/countries`,
67
+ neetoApps: `${BASE_URL}/neeto_apps`,
68
+ directUploads: "/direct_uploads",
69
+ teamMembers: {
70
+ all: "/team_members*/**",
71
+ bulkUpdate: "/team_members/teams/bulk_update",
72
+ index: "/team_members/teams",
73
+ show: (id) => `/team_members/teams/${id}`,
74
+ },
75
+ attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
76
+ dashboard: "/dashboard",
77
+ neetoThankYou: "/neeto_thank_you_engine",
78
+ adminPanel: {
79
+ roles: "/admin/general/admin-panel/roles",
80
+ index: "/admin/general/admin-panel",
81
+ auditLogs: "/admin/admin-panel/general/audit-logs",
82
+ apiKeys: "/admin/admin-panel/general/apiKeys",
83
+ customDomain: "/admin/admin-panel/general/custom-domain",
84
+ ipRestriction: "/admin/admin-panel/general/ip-restriction",
85
+ },
86
+ auth: {
87
+ adminPanel: "/admin/admin-panel",
88
+ },
89
+ };
90
+ const API_ROUTES = {
91
+ teamMembers: {
92
+ all: "/team_members*/**",
93
+ bulkUpdate: "/team_members/teams/bulk_update",
94
+ index: "/team_members/teams",
95
+ show: (id) => `/team_members/teams/${id}`,
96
+ creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
97
+ },
98
+ integrations: {
99
+ zapier: {
100
+ api_keys: "/neeto_integrations/zapier/api_keys",
101
+ },
102
+ },
103
+ };
104
+ const THIRD_PARTY_ROUTES = {
105
+ webhooks: { site: "https://webhook.site/" },
106
+ slack: {
107
+ loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
108
+ },
109
+ zapier: {
110
+ login: "https://zapier.com/",
111
+ logOut: "https://zapier.com/logout",
112
+ zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
113
+ },
114
+ google: {
115
+ signin: "https://accounts.google.com/v3/signin/identifier?hl=en-gb&ifkv=ASKXGp0nW770RS7xin2puSwbGDpGCeaVKDtCgfpEU73fYmhMKbqUjukBQ5x8kdvEVxQ7OvcrnUo8sg&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S688843923%3A1704795906762870&theme=glif",
116
+ password: "https://accounts.google.com/v3/signin/challenge/pwd",
117
+ totpChallenge: "https://accounts.google.com/v3/signin/challenge/totp",
118
+ challengeSelection: "https://accounts.google.com/v3/signin/challenge/selection",
119
+ myAccount: "https://myaccount.google.com/",
120
+ chooseAccount: "accounts.google.com/o/oauth2/auth/oauthchooseaccount",
121
+ consentScreen: "accounts.google.com/signin/oauth/consent",
122
+ warningScreen: "accounts.google.com/signin/oauth/warning",
123
+ additionalInfoScreen: "accounts.google.com/signin/oauth/id",
124
+ consentSummary: "accounts.google.com/signin/oauth/v2/consentsummary",
125
+ },
126
+ };
127
+ const NEETO_ROUTES = {
128
+ imageUploader: "/neeto_image_uploader_engine",
129
+ };
130
+ const PROFILE_LINKS = {
131
+ neetoStatus: "https://neetostatus.com/",
132
+ neetoCommunity: "https://www.launchpass.com/neetohq",
133
+ };
134
+
135
+ class ApiKeysApi {
136
+ constructor(neetoPlaywrightUtilities) {
137
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
138
+ this.API_KEYS_BASE_URL = `neeto_api_keys_engine${BASE_URL}`;
139
+ this.create = (label, type = "general") => this.neetoPlaywrightUtilities.apiRequest({
140
+ url: `${this.API_KEYS_BASE_URL}/api_keys`,
141
+ method: "post",
142
+ body: {
143
+ api_key: { has_no_expiry: true, expires_at: null, label, type },
144
+ },
145
+ });
146
+ }
147
+ }
148
+
52
149
  let MemberApis$1 = class MemberApis {
53
150
  constructor(neetoPlaywrightUtilities) {
54
151
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
@@ -189074,89 +189171,6 @@ class EmbedBase {
189074
189171
  }
189075
189172
  }
189076
189173
 
189077
- const BASE_URL = "/api/v1";
189078
- const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
189079
- const ROUTES = {
189080
- neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
189081
- neetoAuth: NEETO_AUTH_BASE_URL(),
189082
- loginLink: "/login",
189083
- profile: "/profile",
189084
- admin: "/admin",
189085
- myProfile: "/my/profile",
189086
- authSettings: "/settings",
189087
- webhooks: "/webhooks",
189088
- login: `${BASE_URL}/login`,
189089
- signup: `${BASE_URL}/signups`,
189090
- subdomainAvailability: `${BASE_URL}/subdomain_availability`,
189091
- countries: `${BASE_URL}/countries`,
189092
- neetoApps: `${BASE_URL}/neeto_apps`,
189093
- directUploads: "/direct_uploads",
189094
- teamMembers: {
189095
- all: "/team_members*/**",
189096
- bulkUpdate: "/team_members/teams/bulk_update",
189097
- index: "/team_members/teams",
189098
- show: (id) => `/team_members/teams/${id}`,
189099
- },
189100
- attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
189101
- dashboard: "/dashboard",
189102
- neetoThankYou: "/neeto_thank_you_engine",
189103
- adminPanel: {
189104
- roles: "/admin/general/admin-panel/roles",
189105
- index: "/admin/general/admin-panel",
189106
- auditLogs: "/admin/admin-panel/general/audit-logs",
189107
- apiKeys: "/admin/admin-panel/general/apiKeys",
189108
- customDomain: "/admin/admin-panel/general/custom-domain",
189109
- ipRestriction: "/admin/admin-panel/general/ip-restriction",
189110
- },
189111
- auth: {
189112
- adminPanel: "/admin/admin-panel",
189113
- },
189114
- };
189115
- const API_ROUTES = {
189116
- teamMembers: {
189117
- all: "/team_members*/**",
189118
- bulkUpdate: "/team_members/teams/bulk_update",
189119
- index: "/team_members/teams",
189120
- show: (id) => `/team_members/teams/${id}`,
189121
- creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
189122
- },
189123
- integrations: {
189124
- zapier: {
189125
- api_keys: "/neeto_integrations/zapier/api_keys",
189126
- },
189127
- },
189128
- };
189129
- const THIRD_PARTY_ROUTES = {
189130
- webhooks: { site: "https://webhook.site/" },
189131
- slack: {
189132
- loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
189133
- },
189134
- zapier: {
189135
- login: "https://zapier.com/",
189136
- logOut: "https://zapier.com/logout",
189137
- zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
189138
- },
189139
- google: {
189140
- signin: "https://accounts.google.com/v3/signin/identifier?hl=en-gb&ifkv=ASKXGp0nW770RS7xin2puSwbGDpGCeaVKDtCgfpEU73fYmhMKbqUjukBQ5x8kdvEVxQ7OvcrnUo8sg&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S688843923%3A1704795906762870&theme=glif",
189141
- password: "https://accounts.google.com/v3/signin/challenge/pwd",
189142
- totpChallenge: "https://accounts.google.com/v3/signin/challenge/totp",
189143
- challengeSelection: "https://accounts.google.com/v3/signin/challenge/selection",
189144
- myAccount: "https://myaccount.google.com/",
189145
- chooseAccount: "accounts.google.com/o/oauth2/auth/oauthchooseaccount",
189146
- consentScreen: "accounts.google.com/signin/oauth/consent",
189147
- warningScreen: "accounts.google.com/signin/oauth/warning",
189148
- additionalInfoScreen: "accounts.google.com/signin/oauth/id",
189149
- consentSummary: "accounts.google.com/signin/oauth/v2/consentsummary",
189150
- },
189151
- };
189152
- const NEETO_ROUTES = {
189153
- imageUploader: "/neeto_image_uploader_engine",
189154
- };
189155
- const PROFILE_LINKS = {
189156
- neetoStatus: "https://neetostatus.com/",
189157
- neetoCommunity: "https://www.launchpass.com/neetohq",
189158
- };
189159
-
189160
189174
  const CHAT_WIDGET_TEXTS = {
189161
189175
  newConversation: "Ask a question",
189162
189176
  welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
@@ -193358,13 +193372,13 @@ class ApiKeysPage {
193358
193372
  await this.page.getByTestId(COMMON_SELECTORS.saveChangesButton).click();
193359
193373
  await this.neetoPlaywrightUtilities.verifyToast();
193360
193374
  };
193361
- this.verifyApiKey = ({ targetRow, label, date, }) => Promise.all([
193375
+ this.verifyApiKey = ({ targetRow, label, date }) => Promise.all([
193362
193376
  test$1.expect(targetRow.getByRole("cell", { name: label })).toBeVisible(),
193363
- test$1.expect(targetRow.getByTestId(TAGS_SELECTORS.tagContainer)).toHaveText(this.t("common.active")),
193364
193377
  test$1.expect(targetRow.getByRole("cell", { name: date })).toBeVisible(),
193365
193378
  test$1.expect(targetRow.getByRole("cell", {
193366
193379
  name: this.t("neetoApiKeys.common.never"),
193367
193380
  })).toBeVisible(),
193381
+ test$1.expect(targetRow.getByTestId(TAGS_SELECTORS.tagContainer)).toHaveText(this.t("neetoApiKeys.tags.active")),
193368
193382
  ]);
193369
193383
  this.editApiKey = async ({ label, expiryDate }) => {
193370
193384
  await this.page
@@ -193449,8 +193463,9 @@ class CustomDomainPage {
193449
193463
  const validateButton = this.page.getByTestId(CUSTOM_DOMAIN_SELECTORS.customDomainValidateButton);
193450
193464
  await Promise.all([
193451
193465
  test$1.expect(validateButton).toBeVisible(),
193452
- test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneBody).getByText(domain)).toBeVisible(),
193466
+ test$1.expect(this.page.getByTestId(COMMON_SELECTORS.paneHeader).getByText(domain)).toBeVisible(),
193453
193467
  ]);
193468
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
193454
193469
  await test$1.expect(async () => {
193455
193470
  await validateButton.click();
193456
193471
  await this.neetoPlaywrightUtilities.verifyToast({
@@ -195756,6 +195771,7 @@ exports.API_KEYS_SELECTORS = API_KEYS_SELECTORS;
195756
195771
  exports.API_ROUTES = API_ROUTES;
195757
195772
  exports.AUDIT_LOGS_TEXTS = AUDIT_LOGS_TEXTS;
195758
195773
  exports.AdminPanelPage = AdminPanelPage;
195774
+ exports.ApiKeysApi = ApiKeysApi;
195759
195775
  exports.ApiKeysPage = ApiKeysPage;
195760
195776
  exports.AuditLogsPage = AuditLogsPage;
195761
195777
  exports.BASE_URL = BASE_URL;