def test_selecting_profile_from_scratch(prof_plugin, process_and_sleep): """Test selecting a profile. """ d = ProfileSelectionDialog(plugin=prof_plugin) d.show() process_and_sleep() d.profile = 'fp2' assert not d.connection assert not d.settings process_and_sleep() d.connection = 'false_connection1' d.settings = 'false_settings1' d.driver = 'tests.test.FalseDriver%s' % ('' if d.driver.endswith('2') else 2) assert not d.connection assert not d.settings process_and_sleep() d.connection = 'false_connection' d.settings = 'false_settings' process_and_sleep() d.central_widget().widgets()[-1].clicked = True process_app_events() assert d.result