def METHOD_NAME(
        qtbot, connection_dialog_factory):
    """
    Test that the dialog remembers the user's kernel connection
    settings and ssh key passphrase when the user checks the
    save checkbox.
    """
    dlg = connection_dialog_factory.submit_filled_dialog(use_keyfile=True,
                                                         save_settings=True)
    # Press ok and save connection settings
    qtbot.mouseClick(dlg.accept_btns.button(QDialogButtonBox.Ok),
                     Qt.LeftButton)
    # create new dialog and check fields
    new_dlg = connection_dialog_factory.get_default_dialog()
    assert new_dlg.cf.text() == pytest.cf_path
    assert new_dlg.rm_group.isChecked()
    assert new_dlg.hn.text() == pytest.hn
    assert new_dlg.un.text() == pytest.un
    assert new_dlg.pn.text() == str(pytest.pn)
    assert new_dlg.kf.text() == pytest.kf
    if not running_in_ci():
        assert new_dlg.kfp.text() == pytest.kfp