Skip to content

Commit 64680d7

Browse files
committed
Fix tests
1 parent c591267 commit 64680d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/tests/functional/form_submission_tests.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ test("supports transforming a POST submission to a GET in a turbo:submit-start l
188188
test("supports transforming a GET submission to a POST in a turbo:submit-start listener", async ({ page }) => {
189189
await page.evaluate(() =>
190190
addEventListener("turbo:submit-start", (({ detail }) => {
191-
detail.formSubmission.method = "post"
191+
detail.formSubmission.method = "POST"
192192
detail.formSubmission.body.set("path", "/src/tests/fixtures/one.html")
193193
detail.formSubmission.body.set("greeting", "Hello, from an event listener")
194194
}))
@@ -992,7 +992,7 @@ test("link method form submission submits a single request", async ({ page }) =>
992992
const { fetchOptions } = await nextEventNamed(page, "turbo:before-fetch-request")
993993

994994
assert.ok(await noNextEventNamed(page, "turbo:before-fetch-request"))
995-
assert.equal(fetchOptions.method, "post", "[data-turbo-method] overrides the GET method")
995+
assert.equal(fetchOptions.method, "POST", "[data-turbo-method] overrides the GET method")
996996
assert.equal(requestCounter, 1, "submits a single HTTP request")
997997
})
998998

@@ -1006,7 +1006,7 @@ test("link method form submission inside frame submits a single request", async
10061006
const { fetchOptions } = await nextEventNamed(page, "turbo:before-fetch-request")
10071007

10081008
assert.ok(await noNextEventNamed(page, "turbo:before-fetch-request"))
1009-
assert.equal(fetchOptions.method, "post", "[data-turbo-method] overrides the GET method")
1009+
assert.equal(fetchOptions.method, "POST", "[data-turbo-method] overrides the GET method")
10101010
assert.equal(requestCounter, 1, "submits a single HTTP request")
10111011
})
10121012

@@ -1020,7 +1020,7 @@ test("link method form submission targeting frame submits a single request", asy
10201020
const { fetchOptions } = await nextEventNamed(page, "turbo:before-fetch-request")
10211021

10221022
assert.ok(await noNextEventNamed(page, "turbo:before-fetch-request"))
1023-
assert.equal(fetchOptions.method, "post", "[data-turbo-method] overrides the GET method")
1023+
assert.equal(fetchOptions.method, "POST", "[data-turbo-method] overrides the GET method")
10241024
assert.equal(requestCounter, 2, "submits a single HTTP request then follows a redirect")
10251025
})
10261026

src/tests/functional/visit_tests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ test("turbo:before-fetch-request event.detail", async ({ page }) => {
106106
await page.click("#same-origin-link")
107107
const { url, fetchOptions } = await nextEventNamed(page, "turbo:before-fetch-request")
108108

109-
assert.equal(fetchOptions.method, "get")
109+
assert.equal(fetchOptions.method, "GET")
110110
assert.ok(url.includes("/src/tests/fixtures/one.html"))
111111
})
112112

0 commit comments

Comments
 (0)