From cf2a8cfc6eb192526af94e3751abf255d49d01b4 Mon Sep 17 00:00:00 2001 From: louis Date: Thu, 23 Jan 2025 13:53:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Adjust=20Mastodon=20Form=20Label?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ticker/MastodonForm.test.tsx | 8 ++++---- src/components/ticker/MastodonForm.tsx | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/ticker/MastodonForm.test.tsx b/src/components/ticker/MastodonForm.test.tsx index cef6a475..89fb64fc 100644 --- a/src/components/ticker/MastodonForm.test.tsx +++ b/src/components/ticker/MastodonForm.test.tsx @@ -59,14 +59,14 @@ describe('MastodonForm', () => { expect(screen.getByRole('checkbox', { name: 'Active' })).toBeInTheDocument() expect(screen.getByLabelText('Server *')).toBeInTheDocument() - expect(screen.getByLabelText('Token *')).toBeInTheDocument() - expect(screen.getByLabelText('Secret *')).toBeInTheDocument() + expect(screen.getByLabelText('Client Key *')).toBeInTheDocument() + expect(screen.getByLabelText('Client Secret *')).toBeInTheDocument() expect(screen.getByLabelText('Access Token *')).toBeInTheDocument() expect(screen.getByRole('button', { name: 'Submit' })).toBeInTheDocument() await userEvent.click(screen.getByRole('checkbox', { name: 'Active' })) - await userEvent.type(screen.getByLabelText('Token *'), 'token') - await userEvent.type(screen.getByLabelText('Secret *'), 'secret') + await userEvent.type(screen.getByLabelText('Client Key *'), 'token') + await userEvent.type(screen.getByLabelText('Client Secret *'), 'secret') await userEvent.type(screen.getByLabelText('Access Token *'), 'access-token') fetchMock.mockResponseOnce(JSON.stringify({ status: 'success' })) diff --git a/src/components/ticker/MastodonForm.tsx b/src/components/ticker/MastodonForm.tsx index 09145826..c0d45ac3 100644 --- a/src/components/ticker/MastodonForm.tsx +++ b/src/components/ticker/MastodonForm.tsx @@ -33,9 +33,11 @@ const MastodonForm: FC = ({ callback, ticker }) => { - You need to create a Application for Ticker in Mastodon. Go to your profile settings in Mastodon. You find a menu point {`"`}Developer - {`"`} where you need to create an Application. After saving you see the required secrets and tokens. Required Scopes:{' '} - read write write:media write:statuses + You need to create a Application for Ticker in Mastodon. Go to your profile settings in Mastodon. You find a menu point "Developer" where you need + to create an Application. After saving you see the required secrets and tokens. + + + Required Scopes: read write write:media write:statuses @@ -50,12 +52,12 @@ const MastodonForm: FC = ({ callback, ticker }) => { - + - +