Merge pull request #28657 from quicksnap/expect-puppeteer-formFill

expect-puppeteer - Add toFillForm
This commit is contained in:
Mine Starks
2018-09-06 11:23:20 -07:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
@@ -23,6 +23,9 @@ const testGlobal = async (instance: ElementHandle | Page) => {
await expect(instance).toUploadFile("selector", "filePath");
await expect(instance).toUploadFile("selector", "filePath", { timeout: 777 });
await expect(instance).toFillForm("selector", { foo: 'bar', baz: 123 });
await expect(instance).toFillForm("selector", { foo: 'bar', baz: 123 }, { timeout: 777 });
};
const testImported = async (instance: ElementHandle | Page) => {
+2 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for expect-puppeteer 2.2
// Type definitions for expect-puppeteer 3.3
// Project: https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer
// Definitions by: Josh Goldberg <https://github.com/JoshuaKGoldberg>
// Tanguy Krotoff <https://github.com/tkrotoff>
@@ -57,6 +57,7 @@ declare global {
toClick(selector: string, options?: ExpectToClickOptions): Promise<void>;
toDisplayDialog(block: () => Promise<void>): Promise<Dialog>;
toFill(selector: string, value: string, options?: ExpectTimingActions): Promise<void>;
toFillForm(selector: string, value: { [key: string]: any}, options?: ExpectTimingActions): Promise<void>;
toMatch(selector: string, options?: ExpectTimingActions): Promise<void>;
toMatchElement(selector: string, options?: ExpectToClickOptions): Promise<void>;
toSelect(selector: string, valueOrText: string, options?: ExpectTimingActions): Promise<void>;