Skip to content

Commit 345c5a2

Browse files
committed
test(spaces): fix CreateSpaceModal icon picker assertion
EmojiPickerButton is a button, not an input — assert text content instead of value. Signed-off-by: crimsonsunset <jsangio1@gmail.com>
1 parent 22e3237 commit 345c5a2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/ts/components/CreateSpaceModal.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ describe('CreateSpaceModal', () => {
3939
expect(screen.getByTestId('create-space-submit-btn')).toBeEnabled();
4040
});
4141

42-
it('selecting an icon updates the preview and the custom field', () => {
42+
it('selecting an icon updates the preview and the emoji picker trigger', () => {
4343
render(<CreateSpaceModal open onClose={() => {}} />);
4444
fireEvent.click(screen.getByTestId('create-space-icon-🚀'));
4545
expect(screen.getByTestId('create-space-preview-icon')).toHaveTextContent('🚀');
46-
expect(screen.getByTestId('create-space-icon-custom')).toHaveValue('🚀');
46+
expect(screen.getByTestId('create-space-icon-custom')).toHaveTextContent('🚀');
4747
});
4848

4949
it('creates with the chosen name + icon, then fires onCreated and onClose', async () => {

0 commit comments

Comments
 (0)