feat: restart to apply update, privileged helper, rollback
This commit is contained in:
1 parent
70460e4170
commit
54e8fd5fed
63 files changed
+8635
-164
No files matched your search
@@ -290,7 +290,7 @@ describe('Settings, owner, Verifying', () => {
|
||||
})
|
||||
|
||||
describe('Settings, owner, Ready to install', () => {
|
||||
it('shows the success block, a disabled Restart, the notes and the hint, and stops polling', async () => {
|
||||
it('shows the success block, an enabled Restart, the notes and the hint, and stops polling', async () => {
|
||||
useTimers()
|
||||
await mountSettings({
|
||||
role: 'owner',
|
||||
@@ -310,18 +310,15 @@ 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(true)
|
||||
expect(restart.disabled).toBe(false)
|
||||
|
||||
const readsBefore = callsTo(STATUS_PATH).length
|
||||
restart.click()
|
||||
await flushPromises()
|
||||
await tick(3000)
|
||||
|
||||
expect(callsTo(STATUS_PATH)).toHaveLength(readsBefore)
|
||||
expect(requestMock.mock.calls.map(([path]) => path)).not.toContain(
|
||||
'/v1/system/update/restart',
|
||||
)
|
||||
expect(document.body.querySelector('[role="dialog"]')).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user