docs(i18n): qualify Admin confirmation and read continuity

This commit is contained in:
cesnimda
2026-11-17 08:46:31 +01:00
parent 4e224151db
commit 866b0dc1fb
22 changed files with 4230 additions and 0 deletions
@@ -0,0 +1,17 @@
# Pending Admin confirmation language and users-read continuity
17 November 2026. Source `4e224151db2c8208f7511def72b957784eacbf73` on `codex/a3-ui-10`, based on `07fbd5f7` (now published/ref-verified after Git recovered).
Self/other-user demotion and account-deletion confirmations opt into the existing live translation metadata. Account names remain literal, escaped interpolation data. The users resource now has a language-independent fallback input; the Admin presenter resolves its empty fallback during rendering. This removes the locale-triggered users GET and translates pending/already-visible fallback failures while retaining entered form data and structured server messages/error flags. The shared resource hook is unchanged.
Preserved: session/mount guards, final-admin restrictions, explicit confirmations, current-user warning, exact account deletion header, role payloads, queued202 wording, create admission/draft handling, focus and pending decisions. No actual roles, accounts, MFA factors or server data were changed; all writes are mocked.
## Evidence
- Original16 stale-confirmation cases FAILED across desktop/mobile, EN/NB and self/other-user actions.
- After copy migration, those16 reached the no-extra-read assertion and FAILED on the pre-existing language-triggered GET; intermediate24 pass/16 fail receipt retained. A requested nonexistent presentation test filename was not counted as a suite.
- Four additional pending/already-visible read-failure/draft cases FAILED before the resource-input fix. This red run used the intermediate metadata source; the read dependency was unchanged from `07fbd5f7`.
- Final44 cases/two actual suites PASSED (Admin34 plus shared contract10); earlier40/24 overlap. Non-incremental project TypeScript, two-file scoped lint and diff check PASSED.
- Native outputs, deterministic gzip and source-at-commit hashes: `evidence/admin-dialog/SOURCE_RECEIPTS.json`. AST refresh is queued after the concurrent CV worker returns the test/source lane; do not claim it completed yet.
No build/browser/native-device, real administration, formal security, whole A3 or European-locale acceptance. The prior Next security build qualification remains open. Rollback: revert only this bounded source commit; no schema/data migration. Other Admin recovery/provider and protected factor-management decisions remain separate.
@@ -0,0 +1,81 @@
{
"sourceCommit": "4e224151db2c8208f7511def72b957784eacbf73",
"sourcesLfSha256": {
"job-tracker-ui/src/admin-users-page.test.tsx": "e797c18e87ff68155b8aa9d0077d8b8bfa3a64a830bda0dd2fee5ef07e1f48ec",
"job-tracker-ui/src/views/AdminUsersPage.tsx": "cb50ca5bf5023511208365fc286f7bd03537e0707bb95113b8b37e6807fc113d"
},
"evidenceLfSha256": {
"red.json": "603c45d9e1227679f98dc563ade446a7da42775ea2a8da0b233870eaaae7e65d",
"red.txt": "cce640bfb939397f7ad919408d7c3a05ac273f75f8e728ae420ce9e110f21f15",
"read-red.json": "29e0c4632d36b8fd81006ff3f14e8ff82760043a67de7dc49f4d938150619146",
"read-red.txt": "44cc09260102d88db30901c6c85e14327ee9cd0560e7e3e46eec85718acf3397",
"green.json": "891206904cb9a47585b2d6867da70635b3b6b66575fb327ac5bca30c82486464",
"green.txt": "3b765b444e7c8d5a76bdc752cc04b97ba2b45ecbfa48be6079431b4413880e77",
"final.json": "784bc7eb48ab02df12bbde413ba8f6bba93eb4e7b1209651ca43cbef696192cd",
"final.txt": "9854fc95de67ca3e7583565412d32befc5fe2d53f8c6bcfbc807dc321755d723",
"typecheck.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"lint.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
"nativeReceipts": [
{
"path": "red.json",
"gzipPath": "red.json.gz",
"rawSha256": "603c45d9e1227679f98dc563ade446a7da42775ea2a8da0b233870eaaae7e65d",
"gzipSha256": "ff9538bfa500414c9f710cd603717f2a79b66d1e9c600837ca941429002138d3"
},
{
"path": "red.txt",
"gzipPath": "red.txt.gz",
"rawSha256": "2e4cc9e3885ddb6ca70b8abe4e5ec3e545bb9b3df65abaf212a5271f0c242d48",
"gzipSha256": "63038bc7c56f848bfe5c34f7844ff50c6df3aa3e3946828c4b07fc49e6dfb89a"
},
{
"path": "read-red.json",
"gzipPath": "read-red.json.gz",
"rawSha256": "29e0c4632d36b8fd81006ff3f14e8ff82760043a67de7dc49f4d938150619146",
"gzipSha256": "3ed39341e5761750cf3c76f702a7f26bef725d2ea84ada19bb38385537aebd10"
},
{
"path": "read-red.txt",
"gzipPath": "read-red.txt.gz",
"rawSha256": "6e9be1e2f3a9fe83241ae1e21fcd3739198c5fc0dfa436af57d8503b595ea1b6",
"gzipSha256": "28c9da363fc4793fe7825e36c5842b2fc1abb8d447f4be39da5e184642dc871e"
},
{
"path": "green.json",
"gzipPath": "green.json.gz",
"rawSha256": "891206904cb9a47585b2d6867da70635b3b6b66575fb327ac5bca30c82486464",
"gzipSha256": "0b055c3e41c678b14c70b6c373a7391278abbb5aba1664c5fc24f72c54d0eb07"
},
{
"path": "green.txt",
"gzipPath": "green.txt.gz",
"rawSha256": "b802e9422a6755c999e5b9034f72179d018b65bd259c6f0cead8373325e18d39",
"gzipSha256": "89ec2a323ee9cc0c238a0bdc44d4ce9b6d535f28a5c99245923fb982ad207e38"
},
{
"path": "final.json",
"gzipPath": "final.json.gz",
"rawSha256": "784bc7eb48ab02df12bbde413ba8f6bba93eb4e7b1209651ca43cbef696192cd",
"gzipSha256": "cfdea9ed195babb4fe8bba128dd016ece3f5bff5cf2ee4116c77a09b5df98ddc"
},
{
"path": "final.txt",
"gzipPath": "final.txt.gz",
"rawSha256": "3776ebbec5d698b4bb418228423bba4ba7ade81f5fe5bc8d7d3c4083cb52854f",
"gzipSha256": "fd57cd303a9e6745ab8d3389a6c28161c5e2a81fe4de8fa814ef811b369aa33a"
},
{
"path": "typecheck.txt",
"gzipPath": "typecheck.txt.gz",
"rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e"
},
{
"path": "lint.txt",
"gzipPath": "lint.txt.gz",
"rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e"
}
]
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
Test Suites: 2 passed, 2 total
Tests: 44 passed, 44 total
Snapshots: 0 total
Time: 21.839 s
Ran all test suites matching src/admin-users-page.test.tsx|src/dialog-text.test.tsx.
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\admin-dialog-final.json
File diff suppressed because one or more lines are too long
@@ -0,0 +1,311 @@
FAIL src/admin-users-page.test.tsx (13.331 s)
● Console
console.error
An update to AdminUsersPage inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act
146 | return () => { checkSessionCookie(); return lifetime.mounted && lifetime.generation===generation && !isSessionInvalidated() && getSessionContext()===context; };
147 | }, []);
> 148 | const finishAction=useCallback((active: () => boolean) => { owner.current.busy=false; if (active()) setBusy(false); }, []);
| ^
149 |
150 | const createUser=async () => {
151 | if (!canCreate) return;
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
at setBusy (src/views/AdminUsersPage.tsx:148:103)
at finishAction (src/views/AdminUsersPage.tsx:203:15)
● pending admin confirmation mobile=true demote self follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true demote self follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true demote other follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true demote other follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true delete self follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true delete self follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true delete other follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=true delete other follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false demote self follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false demote self follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false demote other follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false demote other follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false delete self follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false delete self follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false delete other follows en to nb without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
● pending admin confirmation mobile=false delete other follows nb to en without applying it
expect(jest.fn()).toHaveBeenCalledTimes(expected)
Expected number of calls: 1
Received number of calls: 2
83 | expect(within(opened).getByRole('button', { name: translations[to][demote ? 'adminUsersRemoveAdmin' : 'adminUsersDelete'] })).toBeVisible();
84 | expect(cancel).toHaveFocus();
> 85 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
| ^
86 | expect(mockedApi.put).not.toHaveBeenCalled(); expect(mockedApi.delete).not.toHaveBeenCalled();
87 | fireEvent.click(within(opened).getByRole('button', { name: translations[to].cancel }));
88 | await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());
at toHaveBeenCalledTimes (src/admin-users-page.test.tsx:85:25)
Test Suites: 1 failed, 1 passed, 2 total
Tests: 16 failed, 24 passed, 40 total
Snapshots: 0 total
Time: 17.186 s
Ran all test suites matching src/admin-users-page.test.tsx|src/dialog-text.test.tsx|src/account-admin-presentation.test.tsx.
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\admin-dialog-green.json
File diff suppressed because one or more lines are too long
@@ -0,0 +1,75 @@
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
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff