You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Your form contains <input type="file"> fields, but is missing the `enctype="multipart/form-data"` attribute. This will lead to inconsistent behavior between enhanced and native forms. For more details, see https://github.com/sveltejs/kit/issues/9819. This will be upgraded to an error in v2.0.'
test('Submitting a form with a file input but no enctype="multipart/form-data" logs a warning',async({
832
+
page,
833
+
javaScriptEnabled
834
+
})=>{
835
+
test.skip(!javaScriptEnabled,'Skip when JavaScript is disabled');
836
+
test.skip(!process.env.DEV,'Skip when not in dev mode');
837
+
awaitpage.goto('/actions/file-without-enctype');
838
+
constlog_promise=page.waitForEvent('console');
839
+
awaitpage.click('button');
840
+
constlog=awaitlog_promise;
841
+
expect(log.text()).toBe(
842
+
'Your form contains <input type="file"> fields, but is missing the `enctype="multipart/form-data"` attribute. This will lead to inconsistent behavior between enhanced and native forms. For more details, see https://github.com/sveltejs/kit/issues/9819. This will be upgraded to an error in v2.0.'
843
+
);
844
+
});
845
+
831
846
test(`Accessing v2 deprecated properties results in a warning log`,async({
0 commit comments