Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2019-11-20 10:26:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Wed Nov 20 10:26:50 2019 rev:437 rq:748851 version:4.2.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2019-10-27 13:36:10.972903540 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new.26869/yast2-installation.changes
 2019-11-20 10:26:52.086557868 +0100
@@ -1,0 +2,27 @@
+Fri Nov 15 08:58:40 UTC 2019 - Oliver Kurz <[email protected]>
+
+- Use linuxrc option "reboot_timeout" to configure the timeout
+  before reboot (bsc#1122493)
+- 4.2.23
+
+-------------------------------------------------------------------
+Thu Nov 14 09:56:21 UTC 2019 - David Diaz <[email protected]>
+
+- Save and restore the proposal vertical scroll (related to a
+  problem reseting the scroll position reported in bsc#1143558)
+- 4.2.22
+
+-------------------------------------------------------------------
+Sun Nov 10 18:56:53 UTC 2019 - David Diaz <[email protected]>
+
+- Improve the role selection dialog using a new scrollable widget
+  to select a role (related to bsc#1084674, bsc#bsc#1086187).
+- 4.2.21
+-------------------------------------------------------------------
+
+Thu Nov  7 09:32:00 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Implement upgrade for the Full medium (jsc#SLE-7101)
+- 4.2.20
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-4.2.19.tar.bz2

New:
----
  yast2-installation-4.2.23.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.Aw1LeV/_old  2019-11-20 10:26:52.718557994 +0100
+++ /var/tmp/diff_new_pack.Aw1LeV/_new  2019-11-20 10:26:52.722557995 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.2.19
+Version:        4.2.23
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -37,7 +37,7 @@
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:yast-rake)
 # Y2Packager::ProductControlProduct
-BuildRequires:  yast2 >= 4.2.22
+BuildRequires:  yast2 >= 4.2.32
 # Y2Packager::MediumType
 BuildRequires:  yast2-packager >= 4.2.27
 # Y2Storage::Inhibitors including systemd masking
@@ -77,7 +77,7 @@
 # writing settings in the first installation stage.
 Requires:       yast2-services-manager >= 3.2.1
 # Y2Packager::ProductControlProduct
-Requires:       yast2 >= 4.2.22
+Requires:       yast2 >= 4.2.32
 Requires:       yast2-network >= 4.0.13
 # for AbortException and handle direct abort
 Requires:       yast2-ruby-bindings >= 4.0.6
@@ -94,6 +94,8 @@
 %{systemd_requires}
 %endif
 
+# SingleItemSelector not enforcing an initial selection
+Conflicts:      libyui < 3.8.2
 # Pkg::SourceProvideSignedFile Pkg::SourceProvideDigestedFile
 # pkg-bindings are not directly required
 Conflicts:      yast2-pkg-bindings < 2.17.25

++++++ yast2-installation-4.2.19.tar.bz2 -> yast2-installation-4.2.23.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/package/yast2-installation.changes 
new/yast2-installation-4.2.23/package/yast2-installation.changes
--- old/yast2-installation-4.2.19/package/yast2-installation.changes    
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/package/yast2-installation.changes    
2019-11-15 11:43:06.000000000 +0100
@@ -1,4 +1,31 @@
 -------------------------------------------------------------------
+Fri Nov 15 08:58:40 UTC 2019 - Oliver Kurz <[email protected]>
+
+- Use linuxrc option "reboot_timeout" to configure the timeout
+  before reboot (bsc#1122493)
+- 4.2.23
+
+-------------------------------------------------------------------
+Thu Nov 14 09:56:21 UTC 2019 - David Diaz <[email protected]>
+
+- Save and restore the proposal vertical scroll (related to a
+  problem reseting the scroll position reported in bsc#1143558)
+- 4.2.22
+
+-------------------------------------------------------------------
+Sun Nov 10 18:56:53 UTC 2019 - David Diaz <[email protected]>
+
+- Improve the role selection dialog using a new scrollable widget
+  to select a role (related to bsc#1084674, bsc#bsc#1086187).
+- 4.2.21
+-------------------------------------------------------------------
+
+Thu Nov  7 09:32:00 UTC 2019 - Ladislav Slezák <[email protected]>
+
+- Implement upgrade for the Full medium (jsc#SLE-7101)
+- 4.2.20
+
+-------------------------------------------------------------------
 Fri Oct 25 11:44:58 UTC 2019 - Josef Reidinger <[email protected]>
 
 - implement upgrade for online medium (jsc#SLE-7214)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/package/yast2-installation.spec 
new/yast2-installation-4.2.23/package/yast2-installation.spec
--- old/yast2-installation-4.2.19/package/yast2-installation.spec       
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/package/yast2-installation.spec       
2019-11-15 11:43:06.000000000 +0100
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-installation
-Version:        4.2.19
+Version:        4.2.23
 Release:        0
 Group:          System/YaST
 License:        GPL-2.0-only
@@ -36,7 +36,7 @@
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
 BuildRequires:  rubygem(%{rb_default_ruby_abi}:yast-rake)
 # Y2Packager::ProductControlProduct
-BuildRequires:  yast2 >= 4.2.22
+BuildRequires:  yast2 >= 4.2.32
 # Y2Packager::MediumType
 BuildRequires:  yast2-packager >= 4.2.27
 # Y2Storage::Inhibitors including systemd masking
@@ -76,7 +76,7 @@
 # writing settings in the first installation stage.
 Requires:       yast2-services-manager >= 3.2.1
 # Y2Packager::ProductControlProduct
-Requires:       yast2 >= 4.2.22
+Requires:       yast2 >= 4.2.32
 Requires:       yast2-network >= 4.0.13
 # for AbortException and handle direct abort
 Requires:       yast2-ruby-bindings >= 4.0.6
@@ -94,6 +94,8 @@
 %endif
 
 
+# SingleItemSelector not enforcing an initial selection
+Conflicts:      libyui < 3.8.2
 # Pkg::SourceProvideSignedFile Pkg::SourceProvideDigestedFile
 # pkg-bindings are not directly required
 Conflicts:      yast2-pkg-bindings < 2.17.25
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/src/lib/installation/clients/inst_finish.rb 
new/yast2-installation-4.2.23/src/lib/installation/clients/inst_finish.rb
--- old/yast2-installation-4.2.19/src/lib/installation/clients/inst_finish.rb   
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/src/lib/installation/clients/inst_finish.rb   
2019-11-15 11:43:06.000000000 +0100
@@ -146,13 +146,12 @@
 
       # Do not call any SCR, it's already closed!
       # bugzilla #245742, #160301
-      if Linuxrc.usessh && !Linuxrc.vnc ||
-          # also live installation - bzilla #297691
-          Mode.live_installation
-        # Display the message and wait for user to accept it
-        Report.DisplayMessages(true, 0)
+      if Linuxrc.reboot_timeout
+        Report.DisplayMessages(true, Linuxrc.reboot_timeout)
       else
-        Report.DisplayMessages(true, 10)
+        # Display the message and wait for user to accept it
+        # also live installation - bzilla #297691
+        Report.DisplayMessages(true, (Linuxrc.usessh && !Linuxrc.vnc || 
Mode.live_installation) ? 0 : 10)
       end
       Report.LongMessage(Misc.boot_msg)
       Misc.boot_msg = ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/src/lib/installation/clients/inst_system_analysis.rb
 
new/yast2-installation-4.2.23/src/lib/installation/clients/inst_system_analysis.rb
--- 
old/yast2-installation-4.2.19/src/lib/installation/clients/inst_system_analysis.rb
  2019-10-25 16:27:23.000000000 +0200
+++ 
new/yast2-installation-4.2.23/src/lib/installation/clients/inst_system_analysis.rb
  2019-11-15 11:43:06.000000000 +0100
@@ -108,7 +108,9 @@
       actions_doing     << _("Searching for system files...")
       actions_functions << fun_ref(method(:FilesFromOlderSystems), "boolean 
()")
 
-      skip_software = Mode.update && Y2Packager::MediumType.online?
+      # skip the repository initialization on both Online and Full medium,
+      # do it only on the standard medium layout (openSUSE Leap)
+      skip_software = Mode.update && !Y2Packager::MediumType.standard?
       # we cannot initialize during update software manager until we know 
target partition
       # as base product is not known
       if !skip_software
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/src/lib/installation/proposal_runner.rb 
new/yast2-installation-4.2.23/src/lib/installation/proposal_runner.rb
--- old/yast2-installation-4.2.19/src/lib/installation/proposal_runner.rb       
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/src/lib/installation/proposal_runner.rb       
2019-11-15 11:43:06.000000000 +0100
@@ -199,16 +199,19 @@
     def input_loop
       loop do
         richtext_normal_cursor(Id(:proposal))
+
         # bnc #431567
         # Some proposal module can change it while called
         assign_next_button
 
+        restore_vertical_scroll
         input = Yast::UI.UserInput
 
+        log.info "Proposal - UserInput: '#{input}'"
         return :next if input == :accept
         return :abort if input == :cancel
 
-        log.info "Proposal - UserInput: '#{input}'"
+        save_vertical_scroll
         richtext_busy_cursor(Id(:proposal))
 
         case input
@@ -261,6 +264,14 @@
       nil
     end
 
+    def save_vertical_scroll
+      @proposal_vscroll = Yast::UI.QueryWidget(Id(:proposal), :VScrollValue)
+    end
+
+    def restore_vertical_scroll
+      Yast::UI.ChangeWidget(Id(:proposal), :VScrollValue, @proposal_vscroll)
+    end
+
     def switch_to_tab(input)
       @current_tab = input
       load_matching_submodules_list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/src/lib/installation/select_system_role.rb 
new/yast2-installation-4.2.23/src/lib/installation/select_system_role.rb
--- old/yast2-installation-4.2.19/src/lib/installation/select_system_role.rb    
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/src/lib/installation/select_system_role.rb    
2019-11-15 11:43:06.000000000 +0100
@@ -17,12 +17,11 @@
 #  To contact SUSE about this file by physical or electronic mail,
 #  you may find current contact information at www.suse.com
 
-require "cgi"
 require "yast"
 require "ui/installation_dialog"
+require "ui/text_helpers"
 require "installation/services"
 require "installation/system_role"
-require "ui/text_helpers"
 
 Yast.import "GetInstArgs"
 Yast.import "Packages"
@@ -35,11 +34,11 @@
   class SelectSystemRole < ::UI::InstallationDialog
     include UI::TextHelpers
 
-    NON_OVERLAY_ATTRIBUTES = [
-      "additional_dialogs",
-      "id",
-      "services"
-    ].freeze
+    MAX_LINE_LENGTH = 110
+    private_constant :MAX_LINE_LENGTH
+
+    TEXT_MODE_MAX_LINE_LENGTH = 70
+    private_constant :TEXT_MODE_MAX_LINE_LENGTH
 
     def initialize
       super
@@ -81,21 +80,28 @@
     end
 
     def dialog_content
-      @selected_role_id = SystemRole.current
-      @selected_role_id ||= roles.first && roles.first.id if 
SystemRole.default?
+      preselected_role_id = SystemRole.current
+      preselected_role_id ||= roles.first && roles.first.id if 
SystemRole.default?
 
-      HCenter(ReplacePoint(Id(:rp), role_buttons(selected_role_id: 
@selected_role_id)))
+      VBox(
+        Left(Label(Yast::ProductControl.GetTranslatedText("roles_text"))),
+        VSpacing(2),
+        SingleItemSelector(
+          Id(:role_selector),
+          roles_items(preselected_role_id)
+        )
+      )
     end
 
     def create_dialog
       clear_role
       ok = super
-      Yast::UI.SetFocus(Id(:roles_richtext)) if ok
+      Yast::UI.SetFocus(Id(:role_selector)) if ok
       ok
     end
 
     def next_handler
-      result = select_role(@selected_role_id)
+      result = select_role(selected_role_id)
       # We show the main role dialog; but the additional clients have
       # drawn over it, so draw it again and go back to input loop.
       # create_dialog do not create new dialog if it already exist like in this
@@ -108,20 +114,31 @@
       end
     end
 
-    # called if a specific FOO_handler is not defined
-    def handle_event(id)
-      role = SystemRole.find(id)
-      if role.nil?
-        log.info "Not a role: #{id.inspect}, skipping"
-        return
-      end
+  private
 
-      @selected_role_id = id
-      Yast::UI.ReplaceWidget(Id(:rp), role_buttons(selected_role_id: id))
-      Yast::UI.SetFocus(Id(:roles_richtext))
+    # Return a collection holding items to build the role selector
+    #
+    # @param preselected_role_id [String, nil] the id of the role that should 
be selected
+    # @return [Array<Item>] collection of role items
+    def roles_items(preselected_role_id)
+      max_line_length = Yast::UI.TextMode ? TEXT_MODE_MAX_LINE_LENGTH : 
MAX_LINE_LENGTH
+
+      roles.map do |role|
+        Item(
+          Id(role.id),
+          role.label,
+          wrap_text(role.description, max_line_length),
+          role.id == preselected_role_id
+        )
+      end
     end
 
-  private
+    # Return the current selected role id
+    #
+    # @return [String]
+    def selected_role_id
+      Yast::UI.QueryWidget(Id(:role_selector), :Value)
+    end
 
     # checks if there is only one role available
     def single_role?
@@ -263,68 +280,5 @@
       SystemRole.clear if refresh
       SystemRole.all
     end
-
-    # Returns the content for the role buttons
-    # @param selected_role_id [String] which role radiobutton gets selected
-    # @return [Yast::Term] Role buttons
-    def role_buttons(selected_role_id:)
-      role_rt_radios = roles.map do |role|
-        # FIXME: following workaround can be removed as soon as bsc#997402 is 
fixed:
-        # bsc#995082: System role descriptions use a character that is missing 
in console font
-        description = Yast::UI.TextMode ? role.description.tr("•", "*") : 
role.description
-
-        rb = richtext_radiobutton(id:       role.id,
-                                  label:    role.label,
-                                  selected: role.id == selected_role_id)
-
-        description = CGI.escape_html(description).gsub("\n", "<br>\n")
-        # extra empty paragraphs for better spacing
-        "<p></p>#{rb}<p></p><ul>#{description}</ul>"
-      end
-
-      intro_text = Yast::ProductControl.GetTranslatedText("roles_text")
-      VBox(
-        Left(Label(intro_text)),
-        VSpacing(2),
-        RichText(Id(:roles_richtext), 
div_with_direction(role_rt_radios.join("\n")))
-      )
-    end
-
-    def richtext_radiobutton(id:, label:, selected:)
-      if Yast::UI.TextMode
-        richtext_radiobutton_tui(id: id, label: label, selected: selected)
-      else
-        richtext_radiobutton_gui(id: id, label: label, selected: selected)
-      end
-    end
-
-    def richtext_radiobutton_tui(id:, label:, selected:)
-      check = selected ? "(x)" : "( )"
-      widget = "#{check} #{CGI.escape_html(label)}"
-      enabled_widget = "<a href=\"#{id}\">#{widget}</a>"
-      "#{enabled_widget}<br>"
-    end
-
-    IMAGE_DIR = "/usr/share/YaST2/theme/current/wizard".freeze
-
-    BUTTON_ON = "◉".freeze # U+25C9 Fisheye
-    BUTTON_OFF = "○".freeze # U+25CB White Circle
-
-    def richtext_radiobutton_gui(id:, label:, selected:)
-      # check for installation style, which is dark, FIXME: find better way
-      installation = ENV["Y2STYLE"] == "installation.qss"
-      if installation
-        image = selected ? "inst_radio-button-checked.png" : 
"inst_radio-button-unchecked.png"
-        # NOTE: due to a Qt bug, the first image does not get rendered 
properly. So we are
-        # rendering it twice (one with height and width set to "0").
-        bullet = "<img src=\"#{IMAGE_DIR}/#{image}\" height=\"0\" 
width=\"0\"></img>" \
-                 "<img src=\"#{IMAGE_DIR}/#{image}\"></img>"
-      else
-        bullet = selected ? BUTTON_ON : BUTTON_OFF
-      end
-      widget = "#{bullet} #{CGI.escape_html(label)}"
-      enabled_widget = "<a class='dontlooklikealink' 
href=\"#{id}\">#{widget}</a>"
-      "<p>#{enabled_widget}</p>"
-    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.2.19/test/select_system_role_test.rb 
new/yast2-installation-4.2.23/test/select_system_role_test.rb
--- old/yast2-installation-4.2.19/test/select_system_role_test.rb       
2019-10-25 16:27:23.000000000 +0200
+++ new/yast2-installation-4.2.23/test/select_system_role_test.rb       
2019-11-15 11:43:06.000000000 +0100
@@ -134,69 +134,82 @@
             "software" => { "desktop" => "knome" }, "additional_dialogs" => 
"a,b" }
         ]
       end
+      let(:user_input) { :next }
+      let(:going_back) { false }
+      let(:selected_role_id) { nil }
+      let(:current_role_id) { nil }
 
       before do
-        allow(Yast::ProductControl).to receive(:system_roles)
-          .and_return(control_file_roles)
+        allow(Yast::GetInstArgs).to receive(:going_back).and_return(going_back)
+
+        allow(Yast::ProductControl).to 
receive(:system_roles).and_return(control_file_roles)
+
+        allow(Installation::SystemRole).to 
receive(:current).and_return(current_role_id)
+
         allow(Installation::SystemRole).to receive(:select).with("foo")
           .and_return(Installation::SystemRole.new(id: "foo", order: 100))
         allow(Installation::SystemRole).to receive(:select).with("bar")
           .and_return(Installation::SystemRole.new(id: "bar", order: 200))
-      end
 
-      it "displays dialog, and sets ProductFeatures on Next" do
         allow(Yast::Wizard).to receive(:SetContents)
-        allow(Yast::UI).to receive(:UserInput)
-          .and_return("foo", :next)
+        allow(Yast::UI).to receive(:UserInput).and_return(*user_input)
 
-        expect(Yast::ProductFeatures).to receive(:ClearOverlay)
-        expect(Yast::ProductFeatures).to receive(:SetOverlay)
-
-        expect(subject.run).to eq(:next)
+        allow(subject).to 
receive(:selected_role_id).and_return(selected_role_id)
       end
 
-      it "displays dialog, and leaves ProductFeatures on Back" do
-        allow(Yast::Wizard).to receive(:SetContents)
-        allow(Yast::UI).to receive(:UserInput)
-          .and_return(:back)
-        expect(Yast::ProductFeatures).to receive(:ClearOverlay)
-        expect(Yast::ProductFeatures).to_not receive(:SetOverlay)
-
-        expect(subject.run).to eq(:back)
-      end
-
-      context "when a role contains additional dialogs" do
-        it "shows the first dialog when going forward" do
-          allow(Yast::Wizard).to receive(:SetContents)
-          allow(Yast::UI).to receive(:UserInput)
-            .and_return("bar", :next)
+      context "when user goes forward" do
+        let(:selected_role_id) { "foo" }
 
-          allow(Yast::WFM).to receive(:CallFunction).and_return(:next)
-          expect(Yast::WFM).to receive(:CallFunction).with("a", 
anything).and_return(:next)
+        it "displays dialog and sets ProductFeatures" do
+          expect(Yast::ProductFeatures).to receive(:ClearOverlay)
+          expect(Yast::ProductFeatures).to receive(:SetOverlay)
 
           expect(subject.run).to eq(:next)
         end
 
-        it "shows the last dialog when going back" do
-          allow(Installation::SystemRole).to 
receive(:current).and_return("bar")
-          allow(Yast::GetInstArgs).to receive(:going_back).and_return(true)
-          expect(Yast::Wizard).to_not receive(:SetContents)
-          expect(Yast::UI).to_not receive(:UserInput)
-          expect(Yast::UI).to_not receive(:QueryWidget)
+        context "and the role contains additional dialogs" do
+          let(:selected_role_id) { "bar" }
 
-          expect(Yast::WFM).to receive(:CallFunction).with("b", 
anything).and_return(:next)
+          it "shows the first dialog" do
+            allow(Yast::WFM).to receive(:CallFunction).and_return(:next)
+            expect(Yast::WFM).to receive(:CallFunction).with("a", 
anything).and_return(:next)
 
-          expect(subject.run).to eq(:next)
+            expect(subject.run).to eq(:next)
+          end
+        end
+      end
+
+      context "when user goes back" do
+        let(:current_role_id) { "bar" }
+        let(:user_input) { :back }
+
+        it "displays dialog and leaves ProductFeatures" do
+          expect(Yast::ProductFeatures).to receive(:ClearOverlay)
+          expect(Yast::ProductFeatures).to_not receive(:SetOverlay)
+
+          expect(subject.run).to eq(:back)
+        end
+
+        context "and the role contains additional dialogs" do
+          let(:going_back) { true }
+
+          it "shows the last dialog" do
+            expect(Yast::Wizard).to_not receive(:SetContents)
+            expect(Yast::UI).to_not receive(:UserInput)
+            expect(Yast::UI).to_not receive(:QueryWidget)
+
+            expect(Yast::WFM).to receive(:CallFunction).with("b", 
anything).and_return(:next)
+
+            expect(subject.run).to eq(:next)
+          end
         end
       end
 
       context "when re-selecting the same role" do
-        it "just proceeds without a popup" do
-          allow(Installation::SystemRole).to 
receive(:current).and_return("foo")
-          allow(Yast::Wizard).to receive(:SetContents)
-          allow(Yast::UI).to receive(:UserInput)
-            .and_return("foo", :next)
+        let(:current_role_id) { "foo" }
+        let(:selected_role_id) { "foo" }
 
+        it "just proceeds without a popup" do
           expect(Yast::Popup).to_not receive(:ContinueCancel)
 
           expect(Yast::ProductFeatures).to receive(:ClearOverlay)
@@ -207,12 +220,11 @@
       end
 
       context "when re-selecting a different role" do
-        it "displays a popup, and proceeds if Continue is answered" do
-          allow(Installation::SystemRole).to 
receive(:current).and_return("bar")
-          allow(Yast::Wizard).to receive(:SetContents)
-          allow(Yast::UI).to receive(:UserInput)
-            .and_return("foo", :next)
+        let(:current_role_id) { "bar" }
+        let(:selected_role_id) { "foo" }
+        let(:user_input) { [:next, :back] }
 
+        it "displays a popup, and proceeds if Continue is answered" do
           expect(Yast::Popup).to receive(:ContinueCancel)
             .and_return(true)
 
@@ -223,11 +235,6 @@
         end
 
         it "displays a popup, and does not proceed if Cancel is answered" do
-          allow(Installation::SystemRole).to 
receive(:current).and_return("bar")
-          allow(Yast::Wizard).to receive(:SetContents)
-          allow(Yast::UI).to receive(:UserInput)
-            .and_return("foo", :next, :back)
-
           expect(Yast::Popup).to receive(:ContinueCancel)
             .and_return(false)
           expect(Yast::ProductFeatures).to receive(:ClearOverlay)
@@ -238,15 +245,10 @@
       end
 
       context "when no roles is selected" do
-        it "shows error and does not continue" do
-          allow(Yast::Wizard).to receive(:SetContents)
-          allow(Yast::UI).to receive(:UserInput)
-            .and_return(:next, :back)
-          allow(Yast::UI).to receive(:QueryWidget)
-            .with(Id(:roles), :CurrentButton).and_return(nil)
-          allow(Installation::SystemRole).to receive(:default?)
-            .and_return(false)
+        let(:selected_role_id) { nil }
+        let(:user_input) { [:next, :back] }
 
+        it "shows error and does not continue" do
           expect(Yast::Popup).to receive(:Error)
           expect(Yast::ProductFeatures).to receive(:ClearOverlay)
           expect(Yast::ProductFeatures).to_not receive(:SetOverlay)


Reply via email to