mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
Merge pull request #25941 from gmalicky/master
[@types/expect-puppeteer] Fix toMatchElement() definition
This commit is contained in:
@@ -13,8 +13,9 @@ const testGlobal = async (instance: ElementHandle | Page) => {
|
||||
await expect(instance).toMatch("selector");
|
||||
await expect(instance).toMatch("selector", { timeout: 777 });
|
||||
|
||||
await expect(instance).toMatchElement("selector", "value");
|
||||
await expect(instance).toMatchElement("selector", "value", { polling: "mutation" });
|
||||
await expect(instance).toMatchElement("selector");
|
||||
await expect(instance).toMatchElement("selector", { polling: "raf", timeout: 777 });
|
||||
await expect(instance).toMatchElement("selector", { polling: "mutation", text: "text" });
|
||||
|
||||
await expect(instance).toSelect("selector", "valueOrText");
|
||||
await expect(instance).toSelect("selector", "valueOrText", { polling: "raf" });
|
||||
|
||||
4
types/expect-puppeteer/index.d.ts
vendored
4
types/expect-puppeteer/index.d.ts
vendored
@@ -42,7 +42,7 @@ interface ExpectPuppeteer {
|
||||
toDisplayDialog(block: () => Promise<void>): Promise<void>;
|
||||
toFill(selector: string, value: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatch(selector: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatchElement(selector: string, value: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatchElement(selector: string, options?: ExpectToClickOptions): Promise<void>;
|
||||
toSelect(selector: string, valueOrText: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toUploadFile(selector: string, filePath: string, options?: ExpectTimingActions): Promise<void>;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ declare global {
|
||||
toDisplayDialog(block: () => Promise<void>): Promise<void>;
|
||||
toFill(selector: string, value: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatch(selector: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatchElement(selector: string, value: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toMatchElement(selector: string, options?: ExpectToClickOptions): Promise<void>;
|
||||
toSelect(selector: string, valueOrText: string, options?: ExpectTimingActions): Promise<void>;
|
||||
toUploadFile(selector: string, filePath: string, options?: ExpectTimingActions): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user