mrbatch: pt-BR-Guard nachgezogen, Sheet-Mock kennt starterPlanSheet, Listenmodus folgt !92 (kein Auto-Weiterspringen)

This commit is contained in:
Duarte Santos committed 2026-09-04 16:57:42 +02:00
1 parent f767d007a5
commit 0f021aa06d
3 files changed
+9 -7

No files matched your search

@@ -41,7 +41,7 @@ vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))
vi.mock('../lib/mobile.js', () => ({ MOBILE: false, shareExport: vi.fn(), syncReminder: vi.fn() }))
vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))
vi.mock('../sheets.jsx', () => ({
loadStarterPlan: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),
loadStarterPlan: vi.fn(), starterPlanSheet: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),
importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(),
}))
+4 -2
View File
@@ -888,7 +888,9 @@ describe('workout list view', () => {
expect(focusButton(units()[0])).toBeTruthy()
})
it('completing a set in list mode advances the current exercise like cards do', async () => {
// Since !92 finishing an exercise no longer moves the current marker on its own (cards use
// Next, the list uses "Set current"); completion still starts the rest like cards do.
it('completing a set in list mode starts the rest and leaves the current marker in place, like cards do', async () => {
await mount([
exercise('plain-bench', [false], { asked: true }),
exercise('plain-row', [false], { asked: true }),
@@ -897,7 +899,7 @@ describe('workout list view', () => {
await toggleSet(0)
expect(mocks.S.active.entries[0].sets[0].done).toBe(true)
expect(mocks.S.active.cur).toBe(1)
expect(mocks.S.active.cur).toBe(0)
expect(mocks.startRest).toHaveBeenCalledWith(90, expect.any(Number))
})