@bigbinary/neeto-playwright-commons 1.8.36 → 1.8.38

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
@@ -1,5 +1,6 @@
1
1
  import * as _playwright_test from '@playwright/test';
2
2
  import { Page, APIRequestContext, Response, APIResponse, Fixtures, PlaywrightWorkerArgs, PlaywrightWorkerOptions, PlaywrightTestArgs, PlaywrightTestOptions, Browser, BrowserContext, FrameLocator, Locator, CDPSession } from '@playwright/test';
3
+ import * as mailosaur_lib_models from 'mailosaur/lib/models';
3
4
  import MailosaurClient from 'mailosaur';
4
5
  import { I18nPlaywrightFixture } from 'playwright-i18next-fixture';
5
6
  import { TFunction } from 'i18next';
@@ -40,6 +41,11 @@ interface ApiRequestProps {
40
41
  method?: HttpMethods;
41
42
  params?: ParamProps;
42
43
  }
44
+ interface WaitForPageLoadParams {
45
+ visiblityTimeout: number;
46
+ retryTimeout: number;
47
+ customPageContext: Page | undefined;
48
+ }
43
49
  type ApiRequest = (props: ApiRequestProps & Record<string, unknown>) => Promise<APIResponse | undefined>;
44
50
  interface FieldValue {
45
51
  field: string;
@@ -67,22 +73,24 @@ declare class CustomCommands {
67
73
  executeRecursively: ExecuteRecursively;
68
74
  verifySuccessToast: ({ message, closeAfterVerification, }?: Partial<VerifySuccessToastParams>) => Promise<void>;
69
75
  reloadAndWait: (requestCount: number, customPageContext?: Page, interceptMultipleResponsesProps?: Partial<Omit<InterceptMultipleResponsesParams, "times">>) => Promise<void>;
76
+ waitForPageLoad: ({ visiblityTimeout, customPageContext, }: WaitForPageLoadParams) => Promise<void>;
70
77
  apiRequest: ApiRequest;
71
78
  selectOptionFromDropdown: ({ selectValueContainer, selectMenu, value, options, }: SelectOptionFromDropdownParams) => Promise<void>;
72
79
  verifyFieldValue: VerifyFieldValue;
73
80
  }
74
81
 
75
- interface FetchOtpFromEmailFilterParameters {
82
+ interface EmailContentParams {
76
83
  email: string;
77
84
  subjectSubstring?: string;
78
85
  timeout?: number;
79
86
  receivedAfter?: Date;
80
87
  }
81
- type FetchOtpFromEmail = (props: FetchOtpFromEmailFilterParameters) => Promise<string | undefined>;
88
+ type FetchOtpFromEmail = (props: EmailContentParams) => Promise<string | undefined>;
82
89
  declare class MailosaurUtils {
83
90
  mailosaur: MailosaurClient;
84
91
  serverId: string;
85
92
  constructor(mailosaur: MailosaurClient);
93
+ getEmailContent: ({ email, subjectSubstring, timeout, receivedAfter, }: EmailContentParams) => Promise<mailosaur_lib_models.Message>;
86
94
  fetchOtpFromEmail: FetchOtpFromEmail;
87
95
  generateRandomMailosaurEmail: () => string;
88
96
  }