1
0

ServerConnectWizard: don't set autoconnect on user cancel

Don't set the NETWORK_AUTO_CONNECT config if the user checked the custom
server config checkbox and then cancels the wizard, so the next time the
user starts the wizard they again will have the choice instead of
silently being forced into a random server.
Currently if the user cancels the wizard during the network config the
welcome component will already have set the NETWORK_AUTO_CONNECT config
to False (as the user selected the custom server checkbox), preventing
the wizard from starting again on the next startup.
This commit is contained in:
f321x
2026-01-26 13:33:48 +01:00
parent 10aecf66fd
commit 1c5408cccb
2 changed files with 9 additions and 7 deletions

View File

@@ -81,7 +81,7 @@ class ServerConnectWizardTestCase(WizardTestCase):
self.assertFalse(w.is_last_view(v_init.view, d))
v = w.resolve_next(v_init.view, d)
self.assertEqual('server_config', v.view)
self.assertEqual(False, self.config.NETWORK_AUTO_CONNECT)
self.assertFalse(self.config.cv.NETWORK_AUTO_CONNECT.is_set())
async def test_proxy(self):
w = ServerConnectWizard(DaemonMock(self.config))
@@ -110,7 +110,7 @@ class ServerConnectWizardTestCase(WizardTestCase):
self.assertFalse(w.is_last_view(v_init.view, d))
v = w.resolve_next(v_init.view, d)
self.assertEqual('proxy_config', v.view)
self.assertEqual(False, self.config.NETWORK_AUTO_CONNECT)
self.assertFalse(self.config.cv.NETWORK_AUTO_CONNECT.is_set())
d_proxy = {'enabled': False}
d.update({'proxy': d_proxy})
v = w.resolve_next(v.view, d)