@bigbinary/neeto-playwright-commons 1.9.6 → 1.9.7
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 +4 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +24 -1
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _playwright_test from '@playwright/test';
|
|
2
|
-
import { Page, APIRequestContext, Response, APIResponse, Fixtures, PlaywrightWorkerArgs, PlaywrightWorkerOptions, PlaywrightTestArgs, PlaywrightTestOptions, Browser, BrowserContext, FrameLocator,
|
|
2
|
+
import { Page, APIRequestContext, Response, Locator, APIResponse, Fixtures, PlaywrightWorkerArgs, PlaywrightWorkerOptions, PlaywrightTestArgs, PlaywrightTestOptions, Browser, BrowserContext, FrameLocator, CDPSession } from '@playwright/test';
|
|
3
3
|
import * as mailosaur_lib_models from 'mailosaur/lib/models';
|
|
4
4
|
import MailosaurClient from 'mailosaur';
|
|
5
5
|
import { I18nPlaywrightFixture } from 'playwright-i18next-fixture';
|
|
@@ -232,6 +232,29 @@ declare class CustomCommands {
|
|
|
232
232
|
* @endexample
|
|
233
233
|
*/
|
|
234
234
|
uploadImage: (localImagePath: string) => Promise<void>;
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* Command to verify the tooltip content. It takes the following parameters:
|
|
238
|
+
*
|
|
239
|
+
* triggerElement: The element that triggers the tooltip.
|
|
240
|
+
*
|
|
241
|
+
* content: The content inside the tooltip.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
*
|
|
245
|
+
* await neetoPlaywrightUtilities.verifyTooltip({
|
|
246
|
+
* triggerElement: page.getByTestId("triggerElement"),
|
|
247
|
+
* content: "Tooltip content",
|
|
248
|
+
* });
|
|
249
|
+
* @endexample
|
|
250
|
+
*/
|
|
251
|
+
verifyTooltip: ({
|
|
252
|
+
triggerElement,
|
|
253
|
+
content
|
|
254
|
+
}: {
|
|
255
|
+
triggerElement: Locator;
|
|
256
|
+
content: string;
|
|
257
|
+
}) => Promise<void>;
|
|
235
258
|
}
|
|
236
259
|
interface EmailContentParams {
|
|
237
260
|
email: string;
|
package/index.js
CHANGED
|
@@ -2720,6 +2720,10 @@ class CustomCommands {
|
|
|
2720
2720
|
await uploadFile;
|
|
2721
2721
|
await expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadedImage)).toHaveAttribute("src", new RegExp(imageName), { timeout: 20000 });
|
|
2722
2722
|
};
|
|
2723
|
+
this.verifyTooltip = async ({ triggerElement, content, }) => {
|
|
2724
|
+
await triggerElement.hover();
|
|
2725
|
+
await expect(this.page.getByTestId(COMMON_SELECTORS.tooltip)).toContainText(content);
|
|
2726
|
+
};
|
|
2723
2727
|
this.page = page;
|
|
2724
2728
|
this.responses = [];
|
|
2725
2729
|
this.request = request;
|