Merge pull request #25941 from gmalicky/master

[@types/expect-puppeteer] Fix toMatchElement() definition
This commit is contained in:
Daniel Rosenwasser
2018-05-24 08:22:27 -07:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -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" });

View File

@@ -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>;
}