mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-09 02:03:19 +02:00
Split up setting to be a bit neater
This commit is contained in:
@@ -149,11 +149,12 @@ vi.mock('../components/SettingsModal', () => ({
|
||||
SettingsModal: ({ desktopSection }: { desktopSection?: string }) => (
|
||||
<div data-testid="settings-modal-section">{desktopSection ?? 'none'}</div>
|
||||
),
|
||||
SETTINGS_SECTION_ORDER: ['radio', 'local', 'database', 'bot'],
|
||||
SETTINGS_SECTION_ORDER: ['radio', 'local', 'radio-app', 'database', 'bot'],
|
||||
SETTINGS_SECTION_LABELS: {
|
||||
radio: '📻 Radio',
|
||||
local: '🖥️ Local Configuration',
|
||||
database: '🗄️ Database & Messaging',
|
||||
'radio-app': '🗄️ Radio-App Management',
|
||||
database: '🗄️ Database',
|
||||
bot: '🤖 Bot',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -92,11 +92,12 @@ vi.mock('../components/SettingsModal', () => ({
|
||||
SettingsModal: ({ desktopSection }: { desktopSection?: string }) => (
|
||||
<div data-testid="settings-modal-section">{desktopSection ?? 'none'}</div>
|
||||
),
|
||||
SETTINGS_SECTION_ORDER: ['radio', 'local', 'database', 'bot'],
|
||||
SETTINGS_SECTION_ORDER: ['radio', 'local', 'radio-app', 'database', 'bot'],
|
||||
SETTINGS_SECTION_LABELS: {
|
||||
radio: 'Radio',
|
||||
local: 'Local Configuration',
|
||||
database: 'Database & Messaging',
|
||||
'radio-app': 'Radio-App Management',
|
||||
database: 'Database',
|
||||
bot: 'Bot',
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -178,7 +178,7 @@ function setMatchMedia(matches: boolean) {
|
||||
}
|
||||
|
||||
function openRadioSection() {
|
||||
const radioToggle = screen.getByRole('button', { name: /Radio/i });
|
||||
const radioToggle = screen.getByRole('button', { name: /^Radio$/i });
|
||||
fireEvent.click(radioToggle);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ describe('SettingsModal', () => {
|
||||
it('shows radio-unavailable message when config is null', () => {
|
||||
renderModal({ config: null });
|
||||
|
||||
const radioToggle = screen.getByRole('button', { name: /Radio/i });
|
||||
const radioToggle = screen.getByRole('button', { name: /^Radio$/i });
|
||||
expect(radioToggle).not.toBeDisabled();
|
||||
|
||||
fireEvent.click(radioToggle);
|
||||
@@ -500,7 +500,7 @@ describe('SettingsModal', () => {
|
||||
|
||||
renderModal({
|
||||
externalSidebarNav: true,
|
||||
desktopSection: 'database',
|
||||
desktopSection: 'radio-app',
|
||||
onSaveAppSettings,
|
||||
});
|
||||
|
||||
@@ -807,7 +807,7 @@ describe('SettingsModal', () => {
|
||||
|
||||
renderModal({
|
||||
externalSidebarNav: true,
|
||||
desktopSection: 'database',
|
||||
desktopSection: 'radio-app',
|
||||
onSaveAppSettings,
|
||||
});
|
||||
|
||||
@@ -832,7 +832,7 @@ describe('SettingsModal', () => {
|
||||
|
||||
renderModal({
|
||||
externalSidebarNav: true,
|
||||
desktopSection: 'database',
|
||||
desktopSection: 'radio-app',
|
||||
appSettings: {
|
||||
...baseSettings,
|
||||
tracked_telemetry_repeaters: [directKey],
|
||||
|
||||
Reference in New Issue
Block a user