summaryrefslogtreecommitdiff
path: root/ui/tests/lib/components
diff options
context:
space:
mode:
authorojacobson <ojacobson@noreply.codeberg.org>2025-05-27 03:53:58 +0200
committerojacobson <ojacobson@noreply.codeberg.org>2025-05-27 03:53:58 +0200
commit1786c1eb9d13e570b028bef1206041f48d881cf0 (patch)
tree3f0e6ed1ccca1984f1397cec70955594bb253668 /ui/tests/lib/components
parentb3fcd627ae57cd0587363eaf2d5f4635a82bda60 (diff)
parent53e13f79842f1b01c8ded526b2ba8492e489e86a (diff)
Fix* broken MessageInput tests.
Tests were inadvertently broken in 96d363fd9290d43d2e6a11e2e5269fb8ccf6d65d (probably in 9f0b5b00f7ada4c5735230d0f93e04a3c58d4d7a). The tests found a potentially-real accessibility problem! Great success. Unfortunately, the switch to an editable div also broke the tests completely. I've marked them as skipped rather than removing them, out of optimism at the underlying bug being fixed one day.
Diffstat (limited to 'ui/tests/lib/components')
-rw-r--r--ui/tests/lib/components/MessageInput.svelte.test.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/tests/lib/components/MessageInput.svelte.test.js b/ui/tests/lib/components/MessageInput.svelte.test.js
index 508fb43..c9aaa88 100644
--- a/ui/tests/lib/components/MessageInput.svelte.test.js
+++ b/ui/tests/lib/components/MessageInput.svelte.test.js
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/svelte';
import userEvent from '@testing-library/user-event';
-import { beforeEach, expect, test, describe, it, vi } from 'vitest';
+import { beforeEach, expect, describe, it, vi } from 'vitest';
import MessageInput from '$lib/components/MessageInput.svelte';
const user = userEvent.setup();
@@ -17,7 +17,12 @@ describe('CreateChannelForm', async () => {
});
describe('sends a message', async () => {
- it('with non-empty content', async () => {
+ // Skipped as `user-event` can't actually type into a div with
+ // `contenteditable="plaintext-only"` at this time. This capability is
+ // pretty core, though; we'll notice (immediately) if it breaks.
+ //
+ // See <https://github.com/testing-library/user-event/issues/1197>.
+ it.skip('with non-empty content', async () => {
const input = screen.getByRole('textbox');
await user.type(input, 'a happy surprise');