mirror of
https://github.com/vector-im/element-web.git
synced 2026-04-18 12:01:57 +02:00
* Add more playwright axe tests to settings dialogs * Add utility to jest setupTests to detect React hydration errors * Iterate jest utility * Fix axe issue heading-order * Fix div-in-p issues * Fix setupTests.ts * Fix heading order * Make types happier * Fix hydration issues of thead containing text nodes * Update tests * Fix form-in-form React hydration issues * Fix li-in-li React hydration issues * Fix checked in form without onChange React hydration issue * Fix styling bleeding from _common.pcss * Update snapshots * Fix more remaining issues * Remove _common.pcss h2 rule altogether * Fix test * Update snapshots * Iterate * Iterate * Update snapshots * Simplify diff * Test * Update screenshots * Update screenshot
19 lines
551 B
TypeScript
19 lines
551 B
TypeScript
/*
|
|
Copyright 2026 Element Creations Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
import { onSubmitPreventDefault } from "../../../src/utils/form.ts";
|
|
|
|
describe("onSubmitPreventDefault", () => {
|
|
it("should preventDefault", () => {
|
|
const event = new SubmitEvent("submit");
|
|
const spy = jest.spyOn(event, "preventDefault");
|
|
|
|
onSubmitPreventDefault(event);
|
|
expect(spy).toHaveBeenCalled();
|
|
});
|
|
});
|