diff --git a/src/lib/installation/dialogs/complex_welcome.rb b/src/lib/installation/dialogs/complex_welcome.rb index f21a6875b..c9f90bcd3 100644 --- a/src/lib/installation/dialogs/complex_welcome.rb +++ b/src/lib/installation/dialogs/complex_welcome.rb @@ -171,8 +171,9 @@ def available_products? # @return [Yast::Term] Product selection content; Empty() if no products def license_or_product_content return Empty() unless available_products? + return product_selector if products.size > 1 - show_license? ? product_license : product_selector + show_license? ? product_license : Empty() end # UI to fill space if needed diff --git a/test/lib/dialogs/complex_welcome_test.rb b/test/lib/dialogs/complex_welcome_test.rb index 1c7b7a68e..898b1877c 100755 --- a/test/lib/dialogs/complex_welcome_test.rb +++ b/test/lib/dialogs/complex_welcome_test.rb @@ -46,7 +46,7 @@ end end - describe "#content" do + describe "#contents" do let(:license) { instance_double("Y2Packager::ProductLicense") } let(:sles_product) { instance_double("Y2Packager::ProductSpec", label: "SLES", license: license) } let(:sles_online_product) { instance_double("Y2Packager::ControlProductSpec", label: "SLES", license: license) } @@ -86,7 +86,13 @@ end context "when it is the offline medium" do let(:products) { [sles_offline_product] } - include_examples "show_selector" + + it "does not show the license or the product selection" do + expect(Y2Packager::Widgets::ProductLicense).to_not receive(:new) + expect(Installation::Widgets::ProductSelector).to_not receive(:new) + + widget.contents + end end end