Skip to content

Commit ca34cb1

Browse files
committed
more fixes
1 parent 1161cbd commit ca34cb1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

integration/form-test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,23 +1079,23 @@ test.describe("Forms", () => {
10791079
let app = new PlaywrightFixture(appFixture, page);
10801080
let myFile = fixture.projectDir + "/myfile.txt";
10811081

1082+
const formData = page.locator("#formData");
1083+
const submit = page.locator("button");
1084+
10821085
await app.goto("/file-upload");
10831086
await app.uploadFile(`[name=filey]`, myFile);
10841087
await app.uploadFile(`[name=filey2]`, myFile, myFile);
1085-
await page.locator("button").click();
1086-
await page.locator("#formData").waitFor();
1087-
1088-
expect((await app.getElement("#formData")).val()).toBe(
1088+
await submit.click();
1089+
await expect(formData).toHaveValue(
10891090
"filey=myfile.txt&filey2=myfile.txt&filey2=myfile.txt&filey3="
10901091
);
10911092

10921093
await app.goto("/file-upload?method=post");
10931094
await app.uploadFile(`[name=filey]`, myFile);
10941095
await app.uploadFile(`[name=filey2]`, myFile, myFile);
1095-
await page.locator("button").click();
1096-
await page.locator("#formData").waitFor();
1096+
await submit.click();
10971097

1098-
expect((await app.getElement("#formData")).val()).toBe(
1098+
await expect(formData).toHaveValue(
10991099
"filey=myfile.txt&filey2=myfile.txt&filey2=myfile.txt&filey3="
11001100
);
11011101
});

0 commit comments

Comments
 (0)