mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 17:23:05 +02:00
Add repeater region display. Closes #309.
This commit is contained in:
@@ -20,8 +20,8 @@ const mockHook: {
|
||||
radioSettings: null,
|
||||
advertIntervals: null,
|
||||
ownerInfo: null,
|
||||
|
||||
lppTelemetry: null,
|
||||
regions: null,
|
||||
},
|
||||
paneStates: {
|
||||
status: { loading: false, attempt: 0, error: null },
|
||||
@@ -31,8 +31,8 @@ const mockHook: {
|
||||
radioSettings: { loading: false, attempt: 0, error: null },
|
||||
advertIntervals: { loading: false, attempt: 0, error: null },
|
||||
ownerInfo: { loading: false, attempt: 0, error: null },
|
||||
|
||||
lppTelemetry: { loading: false, attempt: 0, error: null },
|
||||
regions: { loading: false, attempt: 0, error: null },
|
||||
},
|
||||
consoleHistory: [],
|
||||
consoleLoading: false,
|
||||
@@ -151,8 +151,8 @@ describe('RepeaterDashboard', () => {
|
||||
radioSettings: null,
|
||||
advertIntervals: null,
|
||||
ownerInfo: null,
|
||||
|
||||
lppTelemetry: null,
|
||||
regions: null,
|
||||
};
|
||||
mockHook.paneStates = {
|
||||
status: { loading: false, attempt: 0, error: null },
|
||||
@@ -162,8 +162,8 @@ describe('RepeaterDashboard', () => {
|
||||
radioSettings: { loading: false, attempt: 0, error: null },
|
||||
advertIntervals: { loading: false, attempt: 0, error: null },
|
||||
ownerInfo: { loading: false, attempt: 0, error: null },
|
||||
|
||||
lppTelemetry: { loading: false, attempt: 0, error: null },
|
||||
regions: { loading: false, attempt: 0, error: null },
|
||||
};
|
||||
mockHook.consoleHistory = [];
|
||||
mockHook.consoleLoading = false;
|
||||
|
||||
@@ -19,6 +19,7 @@ vi.mock('../api', () => ({
|
||||
repeaterAdvertIntervals: vi.fn(),
|
||||
repeaterOwnerInfo: vi.fn(),
|
||||
repeaterLppTelemetry: vi.fn(),
|
||||
repeaterRegions: vi.fn(),
|
||||
sendRepeaterCommand: vi.fn(),
|
||||
},
|
||||
}));
|
||||
@@ -351,6 +352,12 @@ describe('useRepeaterDashboard', () => {
|
||||
guest_password: null,
|
||||
});
|
||||
mockApi.repeaterLppTelemetry.mockResolvedValueOnce({ sensors: [] });
|
||||
mockApi.repeaterRegions.mockResolvedValueOnce({
|
||||
regions: [],
|
||||
raw: null,
|
||||
truncated: false,
|
||||
source: 'cli',
|
||||
});
|
||||
|
||||
const { result } = renderHook(() => useRepeaterDashboard(repeaterConversation));
|
||||
|
||||
@@ -366,6 +373,7 @@ describe('useRepeaterDashboard', () => {
|
||||
expect(mockApi.repeaterAdvertIntervals).toHaveBeenCalledTimes(1);
|
||||
expect(mockApi.repeaterOwnerInfo).toHaveBeenCalledTimes(1);
|
||||
expect(mockApi.repeaterLppTelemetry).toHaveBeenCalledTimes(1);
|
||||
expect(mockApi.repeaterRegions).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('refreshing neighbors fetches node info first', async () => {
|
||||
|
||||
Reference in New Issue
Block a user