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

+4 -4
View File
@@ -27,11 +27,11 @@ describe('Brazilian Portuguese locale', () => {
.sort(byCodeUnit)
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(603)
expect(inherited).toHaveLength(571)
expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(612)
expect(inherited).toHaveLength(583)
// If this fails, review the changed keys and wording before accepting a new hash. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('1bc5c2825a8e797b2b8e129d1c06b6baca568e95ea9a1e43ae9dacae4bc98801')
expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('c7ddbc412a3e758704289b4414372f2cbc0e26be4c0a0d95676cb3316ecae85a')
})
test('does not leak European Portuguese UI terms', () => {
@@ -49,6 +49,6 @@ describe('Brazilian Portuguese locale', () => {
expect(ptBR['resistance band']).toBe('faixa elástica')
expect(ptBR.soleus).toBe('sóleo')
expect(ptBR.Unpair).toBe('Desvincular')
expect(ptBR['Starter plan loaded — Mon Push · Wed Pull · Fri Legs']).toContain('Seg Push · Qua Pull')
expect(ptBR['Choose starter plan']).toBe('Escolha um plano inicial')
})
})
@@ -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))
})