mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 01:03:34 +02:00
improve MQTT error bubble up and massage communitymqtt + debug etc. for version management. Closes #70
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { SettingsAboutSection } from '../components/settings/SettingsAboutSection';
|
||||
|
||||
describe('SettingsAboutSection', () => {
|
||||
beforeEach(() => {
|
||||
vi.stubGlobal('__APP_VERSION__', '3.2.0-test');
|
||||
vi.stubGlobal('__COMMIT_HASH__', 'deadbeef');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
it('renders the debug support snapshot link', () => {
|
||||
render(<SettingsAboutSection />);
|
||||
render(
|
||||
<SettingsAboutSection
|
||||
health={{
|
||||
status: 'ok',
|
||||
radio_connected: true,
|
||||
radio_initializing: false,
|
||||
connection_info: 'Serial: /dev/ttyUSB0',
|
||||
app_info: {
|
||||
version: '3.2.0-test',
|
||||
commit_hash: 'deadbeef',
|
||||
},
|
||||
database_size_mb: 1.2,
|
||||
oldest_undecrypted_timestamp: null,
|
||||
fanout_statuses: {},
|
||||
bots_disabled: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
const link = screen.getByRole('link', { name: /Open debug support snapshot/i });
|
||||
expect(link).toHaveAttribute('href', '/api/debug');
|
||||
|
||||
Reference in New Issue
Block a user