|
8 | 8 | } from '@sim/testing/mocks/api-client-request.mock' |
9 | 9 | import { stubResizeObserver } from '@sim/testing/mocks/browser-apis.mock' |
10 | 10 | import { emcnMock, emcnMockFns } from '@sim/testing/mocks/emcn.mock' |
11 | | -import { onlineManager, QueryClient, QueryClientProvider } from '@tanstack/react-query' |
| 11 | +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' |
12 | 12 | import { createRoot, type Root } from 'react-dom/client' |
13 | 13 | import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' |
14 | 14 | import { |
@@ -161,7 +161,6 @@ describe('DataRetentionSection across saves', () => { |
161 | 161 | }) |
162 | 162 |
|
163 | 163 | afterEach(() => { |
164 | | - onlineManager.setOnline(true) |
165 | 164 | act(() => root.unmount()) |
166 | 165 | container.remove() |
167 | 166 | queryClient.clear() |
@@ -233,18 +232,6 @@ describe('DataRetentionSection across saves', () => { |
233 | 232 | ) |
234 | 233 | }) |
235 | 234 |
|
236 | | - it('stops at once while offline instead of waiting to write on reconnect', async () => { |
237 | | - await click('Organization') |
238 | | - await click('keep logs 7 days') |
239 | | - onlineManager.setOnline(false) |
240 | | - await failNextReads(() => click('Save')) |
241 | | - |
242 | | - expect(emcnMockFns.mockToast.error).toHaveBeenCalledWith( |
243 | | - 'Could not confirm the latest retention settings. Nothing was saved.' |
244 | | - ) |
245 | | - expect(server.writes).toEqual([]) |
246 | | - }) |
247 | | - |
248 | 235 | it('removes nothing over the document from before the failure', async () => { |
249 | 236 | await click('Organization') |
250 | 237 | await failNextReads(() => click('Remove')) |
|
0 commit comments