docs: pause-accounting + reorder session log
Finalize the pause-accounting + reorderable-handelingen + login-tab-fix feature: session log (goal/work/verification/outcome), a one-line roadmap status note, and an oxfmt pass over the changed files that strips a stray trailing comma after the last call argument in the worker Stopwatch (es5 trailing-comma style) — pure formatting, tests stay green.
This commit is contained in:
@@ -91,7 +91,7 @@ function renderStopwatch() {
|
||||
return render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Stopwatch />
|
||||
</QueryClientProvider>,
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -104,14 +104,18 @@ describe('Stopwatch', () => {
|
||||
resumeMutate = vi.fn();
|
||||
mockedUseActivities.mockReturnValue(query<ReturnType<typeof useActivities>>([FREZEN, PRINTEN]));
|
||||
mockedUseActiveSessions.mockReturnValue(query<ReturnType<typeof useActiveSessions>>([]));
|
||||
mockedUseStartSession.mockReturnValue(mutation<ReturnType<typeof useStartSession>>(startMutate));
|
||||
mockedUseStartSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useStartSession>>(startMutate)
|
||||
);
|
||||
mockedUseStopSession.mockReturnValue(mutation<ReturnType<typeof useStopSession>>(stopMutate));
|
||||
mockedUseDiscardSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useDiscardSession>>(discardMutate),
|
||||
mutation<ReturnType<typeof useDiscardSession>>(discardMutate)
|
||||
);
|
||||
mockedUsePauseSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof usePauseSession>>(pauseMutate)
|
||||
);
|
||||
mockedUsePauseSession.mockReturnValue(mutation<ReturnType<typeof usePauseSession>>(pauseMutate));
|
||||
mockedUseResumeSession.mockReturnValue(
|
||||
mutation<ReturnType<typeof useResumeSession>>(resumeMutate),
|
||||
mutation<ReturnType<typeof useResumeSession>>(resumeMutate)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -185,7 +189,7 @@ describe('Stopwatch', () => {
|
||||
const user = userEvent.setup();
|
||||
// Recover an active session so the screen renders the running UI.
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()]),
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()])
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -193,7 +197,7 @@ describe('Stopwatch', () => {
|
||||
await user.click(cancel);
|
||||
|
||||
expect(
|
||||
screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' }),
|
||||
screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' })
|
||||
).toBeInTheDocument();
|
||||
|
||||
await user.click(screen.getByRole('button', { name: 'Nogmaals tikken ter bevestiging' }));
|
||||
@@ -204,7 +208,7 @@ describe('Stopwatch', () => {
|
||||
it('pauses via the server when the display is tapped while running', async () => {
|
||||
const user = userEvent.setup();
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()]),
|
||||
query<ReturnType<typeof useActiveSessions>>([activeSession()])
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -221,7 +225,7 @@ describe('Stopwatch', () => {
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([
|
||||
activeSession({ paused_at: new Date().toISOString(), paused_seconds: 30 }),
|
||||
]),
|
||||
])
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
@@ -237,7 +241,7 @@ describe('Stopwatch', () => {
|
||||
mockedUseActiveSessions.mockReturnValue(
|
||||
query<ReturnType<typeof useActiveSessions>>([
|
||||
activeSession({ paused_at: new Date().toISOString(), paused_seconds: 30 }),
|
||||
]),
|
||||
])
|
||||
);
|
||||
renderStopwatch();
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ export default function Stopwatch() {
|
||||
setPauseStartedMs(null);
|
||||
setNowMs(Date.now());
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user