refac: revamp the update flow in settings so the user has better visibility that it has to restart when update downloaded

This commit is contained in:
fsylvain committed 2026-10-04 17:42:46 +02:00
1 parent daf497576f
commit 68401d66e0
9 files changed
+70 -16

No files matched your search

@@ -311,6 +311,16 @@ describe('Settings, owner, Ready to install', () => {
expect(findButton("What's new in 2.3.0-beta")!.getAttribute('aria-expanded')).toBe('false')
const restart = findButton('Restart') as HTMLButtonElement
expect(restart.disabled).toBe(false)
const tag = updatesCard().querySelector('[data-testid="update-tag"]')
expect(tag?.textContent?.trim()).toBe('Pending')
expect(updatesCard().querySelector('svg.text-warning')).not.toBeNull()
expect(updatesCard().querySelector('svg.text-success')).toBeNull()
const block = updatesCard().querySelector('[aria-live]') as HTMLElement
expect(block.className).toContain('--rc-warning-soft')
expect(block.contains(restart)).toBe(true)
expect(restart.className).toContain('h-11')
expect(restart.className).toContain('md:h-8')
expect(updatesCard().querySelector('[class*="md:flex-row"]')).toBeNull()
const readsBefore = callsTo(STATUS_PATH).length
await tick(3000)