summaryrefslogtreecommitdiff
path: root/ui/tests
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
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')
-rw-r--r--ui/tests/lib/components/CreateChannelForm.svelte.test.js18
-rw-r--r--ui/tests/lib/components/MessageInput.svelte.test.js2
2 files changed, 10 insertions, 10 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('');
});
});
});
diff --git a/ui/tests/lib/components/MessageInput.svelte.test.js b/ui/tests/lib/components/MessageInput.svelte.test.js
index c32ce11..b459737 100644
--- a/ui/tests/lib/components/MessageInput.svelte.test.js
+++ b/ui/tests/lib/components/MessageInput.svelte.test.js
@@ -9,7 +9,7 @@ const mocks = vi.hoisted(() => ({
sendMessage: vi.fn(),
}));
-describe('CreateChannelForm', async () => {
+describe('MessageInput', async () => {
beforeEach(async () => {
render(MessageInput, {
sendMessage: mocks.sendMessage,