Skip to content

Commit

Permalink
Merge pull request #634 from yast/fix_update_nvram_checkbox
Browse files Browse the repository at this point in the history
fix update nvram single click action
  • Loading branch information
jreidinger committed Mar 1, 2021
2 parents 7c1aebb + e4457f7 commit 1b2464e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/bootloader/proposal_client.rb
Expand Up @@ -79,6 +79,8 @@ def initialize
"disable_boot_extended",
"enable_secure_boot",
"disable_secure_boot",
"enable_update_nvram",
"disable_update_nvram",
"enable_trusted_boot",
"disable_trusted_boot"
].freeze
Expand Down Expand Up @@ -368,6 +370,8 @@ def single_click_action(option, value)
end
when "trusted_boot"
bootloader.trusted_boot = value
when "update_nvram"
bootloader.update_nvram = value
when "secure_boot"
bootloader.secure_boot = value
if value && Yast::Arch.s390
Expand Down
9 changes: 9 additions & 0 deletions test/bootloader_proposal_client_test.rb
Expand Up @@ -57,6 +57,15 @@

expect(Yast::Bootloader.proposed_cfg_changed).to be true
end

it "works with update_nvram" do
bootloader = ::Bootloader::BootloaderFactory.current
bootloader.update_nvram = false

expect { subject.ask_user("chosen_id" => "enable_update_nvram") }
.to change { bootloader.update_nvram }.from(false).to(true)

end
end

context "gui id is passed" do
Expand Down

0 comments on commit 1b2464e

Please sign in to comment.