summaryrefslogtreecommitdiff
path: root/ui/tests/lib/components/CreateChannelForm.svelte.test.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-07-01 15:40:11 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-03 22:43:44 -0400
commit9b38cb1a62ede4900fde4ba47a7b065db329e994 (patch)
treeabf0b9d993ef03a53903aae03f375b78473952da /ui/tests/lib/components/CreateChannelForm.svelte.test.js
parent1cafeb5ec92c1dc4ad74fbed58b15a8ab2f3c0cf (diff)
Rename "channel" to "conversation" throughout the client.
Existing client state, stored in local storage, is migrated to new keys (that mention "conversation" instead of "channel" where appropriate) the first time the client loads.
Diffstat (limited to 'ui/tests/lib/components/CreateChannelForm.svelte.test.js')
-rw-r--r--ui/tests/lib/components/CreateChannelForm.svelte.test.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/tests/lib/components/CreateChannelForm.svelte.test.js b/ui/tests/lib/components/CreateChannelForm.svelte.test.js
index 197cb6b..8c7b3fb 100644
--- a/ui/tests/lib/components/CreateChannelForm.svelte.test.js
+++ b/ui/tests/lib/components/CreateChannelForm.svelte.test.js
@@ -1,37 +1,37 @@
import { render, screen } from '@testing-library/svelte';
import userEvent from '@testing-library/user-event';
import { beforeEach, expect, test, describe, it, vi } from 'vitest';
-import CreateChannelForm from '$lib/components/CreateChannelForm.svelte';
+import CreateConversationForm from '$lib/components/CreateConversationForm.svelte';
const user = userEvent.setup();
const mocks = vi.hoisted(() => ({
- createChannel: vi.fn(),
+ createConversation: vi.fn(),
}));
-describe('CreateChannelForm', async () => {
+describe('CreateConversationForm', async () => {
beforeEach(async () => {
- render(CreateChannelForm, {
- createChannel: mocks.createChannel,
+ render(CreateConversationForm, {
+ createConversation: mocks.createConversation,
});
});
- describe('creates channels', async () => {
+ describe('creates conversations', async () => {
it('with a non-empty name', async () => {
const input = screen.getByRole('textbox');
- await user.type(input, 'channel name');
+ await user.type(input, 'conversation name');
const create = screen.getByRole('button');
await user.click(create);
- expect(mocks.createChannel).toHaveBeenCalledExactlyOnceWith('channel name');
+ expect(mocks.createConversation).toHaveBeenCalledExactlyOnceWith('conversation name');
});
it('with an empty name', async () => {
const create = screen.getByRole('button');
await user.click(create);
- expect(mocks.createChannel).toHaveBeenCalledExactlyOnceWith('');
+ expect(mocks.createConversation).toHaveBeenCalledExactlyOnceWith('');
});
});
});