Skip to content

Commit

Permalink
Download release notes in welcome screen if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Sep 18, 2017
1 parent edc505e commit 59df776
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/installation/clients/inst_complex_welcome.rb
Expand Up @@ -38,6 +38,7 @@
Yast.import "Stage"
Yast.import "Timezone"
Yast.import "Wizard"
Yast.import "WFM"
Yast.import "WorkflowManager"

module Yast
Expand All @@ -60,6 +61,7 @@ def main

textdomain "installation"

Yast::WFM.CallFunction("inst_download_release_notes") if selected_product
Yast::Wizard.EnableAbortButton

loop do
Expand All @@ -74,7 +76,7 @@ def main

# Handle dialog's result
#
# @param value [Symbol] Dialog's return value (:next, :language_changed, etc.)
# @param value [Symbol] Dialog's return value (:next or :abort)
# @return [Symbol,nil] Client's return value. Nil if client should not
# finish yet.
def handle_dialog_result(value)
Expand Down
14 changes: 14 additions & 0 deletions test/inst_complex_welcome_test.rb
Expand Up @@ -97,6 +97,20 @@
subject.main
end

it "downloads release notes" do
expect(Yast::WFM).to receive(:CallFunction).with("inst_download_release_notes")
subject.main
end

context "when no base product is selected" do
let(:product) { nil }

it "does not download release notes" do
expect(Yast::WFM).to_not receive(:CallFunction).with("inst_download_release_notes")
subject.main
end
end

context "when back is pressed" do
let(:dialog_results) { [:back] }

Expand Down

0 comments on commit 59df776

Please sign in to comment.