76 lines
4.0 KiB
Plaintext
76 lines
4.0 KiB
Plaintext
FAIL src/admin-users-page.test.tsx
|
|
● users en to nb keeps pending read failure and draft without another request
|
|
|
|
expect(jest.fn()).toHaveBeenCalledTimes(expected)
|
|
|
|
Expected number of calls: 1
|
|
Received number of calls: 2
|
|
|
|
73 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
74 | if (state === 'pending') await act(async () => reject(new Error('synthetic unavailable users')));
|
|
> 75 | expect(mockedApi.get).toHaveBeenCalledTimes(1);
|
|
| ^
|
|
76 | expect(await screen.findByRole('button', { name: translations[to].retry })).toBeVisible();
|
|
77 | expect(screen.getAllByText(translations[to].adminUsersLoadFailed).length).toBeGreaterThan(0);
|
|
78 | expect(screen.queryByText(translations[from].adminUsersLoadFailed)).not.toBeInTheDocument();
|
|
|
|
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:75:25)
|
|
|
|
● users en to nb keeps visible read failure and draft without another request
|
|
|
|
expect(jest.fn()).toHaveBeenCalledTimes(expected)
|
|
|
|
Expected number of calls: 1
|
|
Received number of calls: 2
|
|
|
|
73 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
74 | if (state === 'pending') await act(async () => reject(new Error('synthetic unavailable users')));
|
|
> 75 | expect(mockedApi.get).toHaveBeenCalledTimes(1);
|
|
| ^
|
|
76 | expect(await screen.findByRole('button', { name: translations[to].retry })).toBeVisible();
|
|
77 | expect(screen.getAllByText(translations[to].adminUsersLoadFailed).length).toBeGreaterThan(0);
|
|
78 | expect(screen.queryByText(translations[from].adminUsersLoadFailed)).not.toBeInTheDocument();
|
|
|
|
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:75:25)
|
|
|
|
● users nb to en keeps pending read failure and draft without another request
|
|
|
|
expect(jest.fn()).toHaveBeenCalledTimes(expected)
|
|
|
|
Expected number of calls: 1
|
|
Received number of calls: 2
|
|
|
|
73 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
74 | if (state === 'pending') await act(async () => reject(new Error('synthetic unavailable users')));
|
|
> 75 | expect(mockedApi.get).toHaveBeenCalledTimes(1);
|
|
| ^
|
|
76 | expect(await screen.findByRole('button', { name: translations[to].retry })).toBeVisible();
|
|
77 | expect(screen.getAllByText(translations[to].adminUsersLoadFailed).length).toBeGreaterThan(0);
|
|
78 | expect(screen.queryByText(translations[from].adminUsersLoadFailed)).not.toBeInTheDocument();
|
|
|
|
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:75:25)
|
|
|
|
● users nb to en keeps visible read failure and draft without another request
|
|
|
|
expect(jest.fn()).toHaveBeenCalledTimes(expected)
|
|
|
|
Expected number of calls: 1
|
|
Received number of calls: 2
|
|
|
|
73 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
74 | if (state === 'pending') await act(async () => reject(new Error('synthetic unavailable users')));
|
|
> 75 | expect(mockedApi.get).toHaveBeenCalledTimes(1);
|
|
| ^
|
|
76 | expect(await screen.findByRole('button', { name: translations[to].retry })).toBeVisible();
|
|
77 | expect(screen.getAllByText(translations[to].adminUsersLoadFailed).length).toBeGreaterThan(0);
|
|
78 | expect(screen.queryByText(translations[from].adminUsersLoadFailed)).not.toBeInTheDocument();
|
|
|
|
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:75:25)
|
|
|
|
Test Suites: 1 failed, 1 total
|
|
Tests: 4 failed, 30 skipped, 34 total
|
|
Snapshots: 0 total
|
|
Time: 4.972 s
|
|
Ran all test suites matching src/admin-users-page.test.tsx with tests matching "read failure and draft".
|
|
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\admin-dialog-read-red.json
|