@bigbinary/neeto-playwright-commons 1.5.0 → 1.5.2

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 CHANGED
@@ -17,7 +17,7 @@ interface ExecuteRecursivelyParams {
17
17
  }
18
18
  type ExecuteRecursively = (params: ExecuteRecursivelyParams) => Promise<void>;
19
19
  interface VerifySuccessToastParams {
20
- message: string;
20
+ message?: string;
21
21
  closeAfterVerification: boolean;
22
22
  }
23
23
  type VerifySuccessToast = (params: VerifySuccessToastParams) => Promise<void>;
@@ -188,6 +188,7 @@ declare const COMMON_SELECTORS: {
188
188
  subheader: string;
189
189
  settingsLink: string;
190
190
  ticketFieldTextInput: (label: string | number) => string;
191
+ tableSpinner: string;
191
192
  };
192
193
 
193
194
  declare const NEETO_EDITOR_SELECTORS: {
package/index.js CHANGED
@@ -135,6 +135,7 @@ const COMMON_SELECTORS = {
135
135
  subheader: "subheader",
136
136
  settingsLink: "Settings",
137
137
  ticketFieldTextInput: (label) => `${hyphenize(label)}-text-input`,
138
+ tableSpinner: ".ant-spin",
138
139
  };
139
140
 
140
141
  class CustomCommands {
@@ -166,7 +167,7 @@ class CustomCommands {
166
167
  const startTime = Date.now();
167
168
  await this.recursiveMethod(callback, condition, timeout, startTime);
168
169
  };
169
- this.verifySuccessToast = async ({ message, closeAfterVerification = true, }) => {
170
+ this.verifySuccessToast = async ({ message = null, closeAfterVerification = true, }) => {
170
171
  if (message) {
171
172
  await expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
172
173
  }
@@ -175,6 +176,7 @@ class CustomCommands {
175
176
  }
176
177
  closeAfterVerification &&
177
178
  (await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
179
+ await expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
178
180
  };
179
181
  this.reloadAndWait = async (requestCount) => {
180
182
  const reloadRequests = this.interceptMultipleResponses({