Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2020-01-17 16:03:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Fri Jan 17 16:03:39 2020 rev:470 rq:765154 version:4.2.55

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2020-01-11 
14:47:54.081371010 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new.26092/yast2.changes   2020-01-17 
16:03:42.120392215 +0100
@@ -1,0 +2,16 @@
+Tue Jan 14 16:38:43 UTC 2020 - David Diaz <[email protected]>
+
+- Add a text helper to strip HTML tags (related bsc#1157780)
+- Moves text helpers to String refinements, keeping backward
+  compatibility.
+- 4.2.55
+
+-------------------------------------------------------------------
+Fri Jan 10 14:43:20 UTC 2020 - [email protected]
+
+- Do not refresh package installation overview if the medium has
+  been changed and the user has switched to the release notes tab.
+  (bsc#1129426, bsc#1159367)
+- 4.2.54
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.2.53.tar.bz2

New:
----
  yast2-4.2.55.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.d92NYY/_old  2020-01-17 16:03:43.644392935 +0100
+++ /var/tmp/diff_new_pack.d92NYY/_new  2020-01-17 16:03:43.664392944 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.53
+Version:        4.2.55
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only
@@ -117,8 +117,8 @@
 Conflicts:      yast2-installation < 4.2.9
 # moved cfg_mail.scr
 Conflicts:      yast2-mail < 3.1.7
-# Older packager use removed API
-Conflicts:      yast2-packager < 4.0.33
+# Older packager use removed API e.g. user_switched_to_details
+Conflicts:      yast2-packager < 4.2.44
 # Older snapper does not provide machine-readable output
 Conflicts:      snapper < 0.8.6
 

++++++ yast2-4.2.53.tar.bz2 -> yast2-4.2.55.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/general/src/lib/ui/text_helpers.rb 
new/yast2-4.2.55/library/general/src/lib/ui/text_helpers.rb
--- old/yast2-4.2.53/library/general/src/lib/ui/text_helpers.rb 2020-01-10 
17:18:34.000000000 +0100
+++ new/yast2-4.2.55/library/general/src/lib/ui/text_helpers.rb 2020-01-17 
09:40:03.000000000 +0100
@@ -17,64 +17,31 @@
 # current contact information at www.novell.com.
 # 
------------------------------------------------------------------------------
 
+require "yast2/refinements/string_manipulations"
+
 module UI
   # Provides a set of methods to manipulate and transform UI text
   module TextHelpers
-    # Wrap text breaking lines in the first whitespace that does not exceed 
given line width
-    #
-    # Additionally, it also allows retrieving only an excerpt of the wrapped 
text according to the
-    # maximum number of lines indicated, adding one more with the cut_text 
text when it is given.
-    #
-    # @param text [String] text to be wrapped
-    # @param line_width [Integer] max line length
-    # @param n_lines [Integer, nil] the maximum number of lines
-    # @param cut_text [String] the omission text to be used when the text 
should be cut
-    #
-    # @return [String]
-    def wrap_text(text, line_width = 76, n_lines: nil, cut_text: "")
-      return text if line_width > text.length
-
-      wrapped_text = text.lines.collect! do |line|
-        l = (line.length > line_width) ? 
line.gsub(/(.{1,#{line_width}})(?:\s+|$)/, "\\1\n") : line
-        l.strip
-      end
-
-      result = wrapped_text.join("\n")
-      result = head(result, n_lines, omission: cut_text) if n_lines
-      result
+    using ::Yast2::Refinements::StringManipulations
+
+    # (see Yast2::Refinements::StringManipulations#plain_text)
+    def plain_text(text, *args, &block)
+      text.plain_text(*args, &block)
+    end
+
+    # (see Yast2::Refinements::StringManipulations#wrap_text)
+    def wrap_text(text, *args)
+      text.wrap_text(*args)
     end
 
-    # Returns only the first requested lines of the given text
-    #
-    # If the omission param is given, an extra line holding it will be included
-    #
-    # @param text [String]
-    # @param max_lines [Integer]
-    # @param omission [String] the text to be added
-    #
-    # @return [String] the first requested lines if the text has more; full 
text otherwise
-    def head(text, max_lines, omission: "")
-      lines = text.lines
-
-      return text if lines.length <= max_lines
-
-      result = text.lines[0...max_lines]
-      result << omission unless omission.empty?
-      result.join
+    # (see Yast2::Refinements::StringManipulations#head)
+    def head(text, *args)
+      text.head(*args)
     end
 
-    # Wrap a given text in direction markers
-    #
-    # @param [String] text to be wrapped. This text may contain tags and they
-    #   will not be escaped
-    # @param [String] language code (it gets the current one by default)
-    # @return [String] wrapped text
+    # (see Yast2::Refinements::StringManipulations#div_with_direction)
     def div_with_direction(text, lang = nil)
-      Yast.import "Language"
-      lang ||= Yast::Language.language
-      # RTL languages: Arabic, Persian, Hebrew
-      direction = lang.start_with?("ar", "fa", "he") ? "rtl" : "ltr"
-      "<div dir=\"#{direction}\">#{text}</div>"
+      text.div_with_direction(lang)
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/general/src/lib/yast2/refinements/string_manipulations.rb
 
new/yast2-4.2.55/library/general/src/lib/yast2/refinements/string_manipulations.rb
--- 
old/yast2-4.2.53/library/general/src/lib/yast2/refinements/string_manipulations.rb
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-4.2.55/library/general/src/lib/yast2/refinements/string_manipulations.rb
  2020-01-17 09:40:03.000000000 +0100
@@ -0,0 +1,185 @@
+# Copyright (c) [2019] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+
+module Yast2
+  module Refinements
+    # Default HTML tags replacements
+    #
+    # @see #plain_text
+    # @return [Hash<String, String>]
+    DEFAULT_HTML_TAGS_REPLACEMENTS = {
+      "<br>"  => "\n",
+      "<br/>" => "\n",
+      "<br >" => "\n",
+      "</li>" => "\n",
+      "<ol>"  => "\n\n",
+      "<ul>"  => "\n\n",
+      "</p>"  => "\n\n"
+    }.freeze
+
+    # Refinements to make easier some string manipulations
+    #
+    # By using
+    #   "<p>Just an <b>HTML</b> example to be formatted".plain_text.wrap_text
+    # instead the helper alternative
+    #   wrap_text(plain_text("<p>Just an <b>HTML</b> example to be formatted"))
+    module StringManipulations
+      refine String do
+        # Get a new text version after ridding of HTML tags
+        #
+        # By default, a fully plain text will be returned, since some tags (see
+        # {Yast2::Refinements::DEFAULT_HTML_TAGS_REPLACEMENTS}) are going to 
be replaced by line
+        # breaks while the rest of them will be removed.
+        #
+        # The _tags_ param allows specifying which tags should be replaced or 
removed (keeping the rest
+        # of them untouched).
+        #
+        # Replacements can be provided
+        #   * as  tag => replacement collection via _replacements_ param, or
+        #   * using a block to perform desired changes for each match (more 
flexible and powerful)
+        #
+        # Note that all matched tags without a replacement are going to be 
replaced with `nil`. In other
+        # words, they will be deleted.
+        #
+        # @example Remove all HTML tags
+        #   text = "<p>YaST:</p><p>a <b>powerful</b> installation and 
configuration tool.</p>"
+        #   plain_text(text) #=> "YaST:\n\na powerful installation and 
configuration tool."
+        #
+        # @example Removing only the <p> tags
+        #   text = "<p>YaST:</p><p>a <b>powerful</b> installation and 
configuration tool.</p>"
+        #   plain_text(text, tags: ["p"])
+        #   #=> "YaST:\n\na <b>powerful</b> installation and configuration 
tool."
+        #
+        # @example Using custom replacements via _replacements_ param
+        #   text = "<p>YaST:</p><p>a <b>powerful</b> installation and 
configuration tool.</p>"
+        #   plain_text(text, replacements: { "<p>" => "\n- ", "<b>" => "*", 
"</b>" => "*" })
+        #     #=> "- YaST:\n- a *powerful* installation and configuration 
tool."
+        #
+        # @example Using custom replacements via block (will omit 
_replacements_ param)
+        #   text = "<p>YaST:</p><p>a <b>powerful</b> installation and 
configuration tool.</p>"
+        #   plain_text(text) do |tag|
+        #     case tag
+        #     when /<\/?p>/          then "\n"
+        #     when /<\/?em>/         then "_"
+        #     when /<\/?(b|strong)>/ then "*"
+        #     end
+        #   end
+        #   #=> "- YaST:\n\na *powerful* installation and _configuration_ 
tool."
+        #
+        #   text = "<p>YaST is both" \
+        #     "<ol>" \
+        #     "<li>an extremely flexible installer</li>" \
+        #     "<li>a powerful control center</li>" \
+        #     "</ol>" \
+        #     "</p>"
+        #   plain_text(text) do |tag|
+        #     case tag
+        #     when "<ol>"
+        #       @ordered = true
+        #       @index = 0
+        #       nil
+        #     when "<ul>"
+        #       @ordered = false
+        #       nil
+        #     when "<li>"
+        #       marker = @ordered ? "#{@index += 1}." : "•"
+        #       "\n  #{marker} "
+        #     end
+        #   end
+        #   #=> "YaST is both\n  1. an extremely flexible installer\n  2. a 
powerful control center"
+        #
+        # @param tags [Array<String>] specific tags to be replaced or deleted
+        # @param replacements [Hash<String, String>] a replacements 
dictionary, tag => replacement
+        # @param block [Proc] a block in charge to perform the changes. When 
given, it does not make
+        #   sense to specify _replacements_ param since the block has 
precedence over it.
+        #
+        # @return [String] the new version after ridding of undesired tags.
+        def plain_text(tags: nil, replacements: nil, &block)
+          regex = tags ? Regexp.union(tags.map { |t| /<[^>]*#{t}[^>]*>/i }) : 
/<.+?>/
+          replacements ||= Refinements::DEFAULT_HTML_TAGS_REPLACEMENTS
+
+          result = gsub(regex) do |match|
+            tag = match.to_s.downcase
+
+            block ? block.call(tag) : replacements[tag]
+          end
+
+          result.strip
+        end
+
+        # Wrap text breaking lines in the first whitespace that does not 
exceed given line width
+        #
+        # Additionally, it also allows retrieving only an excerpt of the 
wrapped text according to the
+        # maximum number of lines indicated, adding one more with the cut_text 
text when it is given.
+        #
+        # @param line_width [Integer] max line length
+        # @param n_lines [Integer, nil] the maximum number of lines
+        # @param cut_text [String] the omission text to be used when the text 
should be cut
+        #
+        # @return [String]
+        def wrap_text(line_width = 76, n_lines: nil, cut_text: "")
+          return self if line_width > length
+
+          wrapped_text = lines.collect! do |line|
+            l = (line.length > line_width) ? 
line.gsub(/(.{1,#{line_width}})(?:\s+|$)/, "\\1\n") : line
+            l.strip
+          end
+
+          result = wrapped_text.join("\n")
+          result = result.head(n_lines, omission: cut_text) if n_lines
+          result
+        end
+
+        # Returns only the first requested lines of the given text
+        #
+        # If the omission param is given, an extra line holding it will be 
included
+        #
+        # @param max_lines [Integer]
+        # @param omission [String] the text to be added
+        #
+        # @return [String] the first requested lines if the text has more; 
full text otherwise
+        def head(max_lines, omission: "")
+          lines = self.lines
+
+          return self if lines.length <= max_lines
+
+          result = self.lines[0...max_lines]
+          result << omission unless omission.empty?
+          result.join
+        end
+
+        # Wrap a text in direction markers
+        #
+        # The text may contain tags and they will not be escaped.
+        #
+        # @param [String] language code (it gets the current one by default)
+        # @return [String] wrapped text
+        def div_with_direction(lang = nil)
+          Yast.import "Language"
+          lang ||= Yast::Language.language
+          # RTL languages: Arabic, Persian, Hebrew
+          direction = lang.start_with?("ar", "fa", "he") ? "rtl" : "ltr"
+          "<div dir=\"#{direction}\">#{self}</div>"
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/general/src/lib/yast2/refinements.rb 
new/yast2-4.2.55/library/general/src/lib/yast2/refinements.rb
--- old/yast2-4.2.53/library/general/src/lib/yast2/refinements.rb       
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-4.2.55/library/general/src/lib/yast2/refinements.rb       
2020-01-17 09:40:03.000000000 +0100
@@ -0,0 +1,21 @@
+# Copyright (c) [2019] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "yast2/refinements/string_manipulations"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/general/test/text_helpers_test.rb 
new/yast2-4.2.55/library/general/test/text_helpers_test.rb
--- old/yast2-4.2.53/library/general/test/text_helpers_test.rb  2020-01-10 
17:18:34.000000000 +0100
+++ new/yast2-4.2.55/library/general/test/text_helpers_test.rb  2020-01-17 
09:40:03.000000000 +0100
@@ -147,4 +147,145 @@
       end
     end
   end
+
+  describe "#plain_text" do
+    let(:text) { "<p>YaST:</p><p>a <b>powerful</b> installation and 
<em>configuration</em> tool.</p>" }
+
+    context "when neither tags: nor replacements: are given" do
+      it "replaces tags with default replacements" do
+        expect(subject.plain_text(text))
+          .to eq("YaST:\n\na powerful installation and configuration tool.")
+      end
+
+      context "but is being used with a block" do
+        let(:result) do
+          subject.plain_text(text) do |tag|
+            case tag
+            when /<\/?b>/ then "*"
+            when /<\/?em>/ then "_"
+            when /<\/?p>/ then "\n"
+            end
+          end
+        end
+
+        it "replaces tags according to the block" do
+          expect(result).to eq("YaST:\n\na *powerful* installation and 
_configuration_ tool.")
+        end
+      end
+    end
+
+    context "when the tag list is given" do
+      let(:tags) { ["p", "em"] }
+
+      it "changes only the specified tags" do
+        expect(subject.plain_text(text, tags: tags))
+          .to eq("YaST:\n\na <b>powerful</b> installation and configuration 
tool.")
+      end
+
+      context "and a list of replacements is provided too" do
+        let(:replacements) do
+          { "<b>" => "*", "</b>" => "*", "<em>" => "_", "</em>" => "_" }
+        end
+
+        it "keeps unmatched tags" do
+          expect(subject.plain_text(text, tags: tags, replacements: 
replacements))
+            .to match(/a <b>powerful<\/b> installation/)
+        end
+
+        it "deletes matched tags without replacements" do
+          expect(subject.plain_text(text, tags: tags, replacements: 
replacements))
+            .to_not match(/<p>.*<\/p>/)
+        end
+
+        it "replaces matched tags with replacements" do
+          expect(subject.plain_text(text, tags: tags, replacements: 
replacements))
+            .to match(/and _configuration_ tool/)
+        end
+      end
+
+      context "and is being used with a block" do
+        let(:result) do
+          subject.plain_text(text, tags: tags) do |tag|
+            case tag
+            when /<\/?(b|strong)>/ then "*"
+            when /<\/?em>/ then "_"
+            end
+          end
+        end
+
+        it "keeps unmatched tags" do
+          expect(result).to match(/<b>powerful<\/b>/)
+        end
+
+        it "deletes matched tags without replacements" do
+          expect(result).to_not match(/<p>.*<\/p>/)
+        end
+
+        it "replaces matched tags according to the block" do
+          expect(result).to eq("YaST:a <b>powerful</b> installation and 
_configuration_ tool.")
+        end
+      end
+    end
+
+    context "when the list of replacements is given" do
+      let(:replacements) do
+        { "<b>" => "*", "</b>" => "*", "<em>" => "_", "</em>" => "_", "<p>" => 
"\n> " }
+      end
+
+      it "replaces matched tags using given replacements" do
+        expect(subject.plain_text(text, replacements: replacements))
+          .to eq("> YaST:\n> a *powerful* installation and _configuration_ 
tool.")
+      end
+
+      context "but a block is given too" do
+        let(:text) do
+          "<p>YaST is both" \
+            "<ol>" \
+              "<li>an extremely flexible installer</li>" \
+              "<li>a powerful control center</li>" \
+            "</ol>" \
+          "</p>"
+        end
+
+        let(:result) do
+          subject.plain_text(text) do |tag|
+            case tag
+            when "<ol>"
+              @ordered = true
+              @index = 0
+              nil
+            when "<ul>"
+              @ordered = false
+              nil
+            when "<li>"
+              marker = @ordered ? "#{@index += 1}." : "•"
+              "\n  #{marker} "
+            end
+          end
+        end
+
+        let(:expected) do
+          "YaST is both\n  1. an extremely flexible installer\n  2. a powerful 
control center"
+        end
+
+        it "replaces tags according to the block" do
+          expect(result).to eq(expected)
+        end
+      end
+
+      context "and a list of tags is provided too" do
+        let(:tags) { ["b"] }
+
+        it "keeps unmatched tags" do
+          expect(subject.plain_text(text, tags: tags, replacements: 
replacements))
+            .to match(/<p>.*and <em>configuration<\/em> tool.<\/p>/)
+        end
+
+        it "replaces matched tags with replacements" do
+          expect(subject.plain_text(text, tags: tags, replacements: 
replacements))
+            .to match(/a \*powerful\* installation/)
+        end
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/packages/src/modules/SlideShow.rb 
new/yast2-4.2.55/library/packages/src/modules/SlideShow.rb
--- old/yast2-4.2.53/library/packages/src/modules/SlideShow.rb  2020-01-10 
17:18:34.000000000 +0100
+++ new/yast2-4.2.55/library/packages/src/modules/SlideShow.rb  2020-01-17 
09:40:03.000000000 +0100
@@ -110,6 +110,8 @@
   class SlideShowClass < Module
     include Yast::Logger
 
+    attr_accessor :user_switched_to
+
     module UI_ID
       TOTAL_PROGRESS = :progressTotal
       CURRENT_PACKAGE = :progressCurrentPackage
@@ -138,11 +140,9 @@
       @slide_interval = 30 # FIXME: constant
       @language = "en"
       @widgets_created = false
-      @user_switched_to_details = false
+      @user_switched_to = :none
       @opened_own_wizard = false
       @inst_log = ""
-      @debug = false
-
       @user_abort = false
 
       # we need to remember the values for tab switching
@@ -658,6 +658,7 @@
     #
     # @param [Boolean] show_release_notes release notes tab will be shown.
     def RebuildDialog(show_release_notes = false)
+      log.info "Rebuilding partitioning/RPM_installation progress"
       contents = Empty()
 
       show_slides = Slides.HaveSlideSupport && Slides.HaveSlides
@@ -726,6 +727,29 @@
       nil
     end
 
+    # Redrawing the complete slide show if needed.
+    #
+    def Redraw
+      CheckForSlides()
+
+      # do not rebuild if the user reads the release notes
+      return if @user_switched_to == :release_notes
+
+      if Slides.HaveSlides && Slides.HaveSlideSupport
+        if !SlideShow.HaveSlideWidget
+          # (true) : Showing release tab if needed
+          RebuildDialog(true)
+          SwitchToDetailsView() if @user_switched_to == :details
+        end
+
+        # Don't override explicit user request!
+        SwitchToSlideView() if @user_switched_to != :details
+      elsif !ShowingDetails()
+        # (true) : Showing release tab if needed
+        RebuildDialog(true)
+      end
+    end
+
     # Open the slide show base dialog with empty work area (placeholder for
     # the image) and CD statistics.
     #
@@ -778,22 +802,28 @@
       button = deep_copy(button)
       if button == :showDetails && !ShowingDetails()
         Builtins.y2milestone("User asks to switch to details")
-        @user_switched_to_details = true
+        @user_switched_to = :details
         SwitchToDetailsView()
       elsif button == :showSlide && !ShowingSlide()
         if Slides.HaveSlides
-          @user_switched_to_details = false
+          if @user_switched_to == :release_notes
+            # The user is currently in the release notes tab.
+            # In order to not disturb him while reading the release notes
+            # we are not updating the tabs although the slide show has been
+            # changed in the background.
+            # Now the user is switching from release notes to slide show
+            # and we are updating the slide show now.
+            RebuildDialog(true) # true: showing the release tab
+          end
           SwitchToSlideView()
           LoadSlide(@current_slide_no)
         else
           UI.ChangeWidget(:dumbTab, :CurrentItem, :showDetails)
         end
+        @user_switched_to = :slides
       elsif @_rn_tabs.key?(button) && !ShowingRelNotes(button)
-        @user_switched_to_details = false
+        @user_switched_to = :release_notes
         SwitchToReleaseNotesView(button)
-      elsif button == :debugHotkey
-        @debug = !@debug
-        Builtins.y2milestone("Debug mode: %1", @debug)
       end
       # note: `abort is handled in SlideShowCallbacks::HandleInput()
 
@@ -1028,10 +1058,8 @@
     publish variable: :slide_interval, type: "integer"
     publish variable: :language, type: "string"
     publish variable: :widgets_created, type: "boolean"
-    publish variable: :user_switched_to_details, type: "boolean"
     publish variable: :opened_own_wizard, type: "boolean"
     publish variable: :inst_log, type: "string"
-    publish variable: :debug, type: "boolean"
     publish variable: :textmode, type: "boolean"
     publish variable: :display_width, type: "integer"
     publish variable: :relnotes, type: "string"
@@ -1053,11 +1081,8 @@
     publish function: :SetGlobalProgressLabel, type: "void (string)"
     publish function: :AppendMessageToInstLog, type: "void (string)"
     publish function: :HaveSlideWidget, type: "boolean ()"
-    publish function: :CheckForSlides, type: "void ()"
     publish function: :SetLanguage, type: "void (string)"
     publish function: :TableItem, type: "term (string, string, string, string, 
string)"
-    publish function: :SwitchToSlideView, type: "void ()"
-    publish function: :SwitchToDetailsView, type: "void ()"
     publish function: :SwitchToReleaseNotesView, type: "void (symbol)"
     publish function: :RebuildDialog, type: "void ()"
     publish function: :Reset, type: "void ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.2.53/library/packages/test/slide_show_test.rb 
new/yast2-4.2.55/library/packages/test/slide_show_test.rb
--- old/yast2-4.2.53/library/packages/test/slide_show_test.rb   2020-01-10 
17:18:34.000000000 +0100
+++ new/yast2-4.2.55/library/packages/test/slide_show_test.rb   2020-01-17 
09:40:03.000000000 +0100
@@ -3,6 +3,7 @@
 require_relative "test_helper"
 
 Yast.import "SlideShow"
+Yast.import "Slides"
 Yast.import "UI"
 
 describe "Yast::SlideShow" do
@@ -146,4 +147,109 @@
       expect(total_size).to eq(100)
     end
   end
+
+  describe "#Redraw" do
+    before do
+      Yast::SlideShow.main
+      allow(Yast::SlideShow).to receive(:CheckForSlides)
+    end
+    context "user is reading release notes" do
+      it "does not redraw the page" do
+        Yast::SlideShow.user_switched_to = :release_notes
+        expect(Yast::SlideShow).not_to receive(:RebuildDialog)
+        Yast::SlideShow.Redraw()
+      end
+    end
+    context "no user input" do
+      before do
+        Yast::SlideShow.user_switched_to = :none
+      end
+      context "slideshow is available" do
+        before do
+          allow(Yast::Slides).to receive(:HaveSlides).and_return(true)
+          allow(Yast::Slides).to receive(:HaveSlideSupport).and_return(true)
+        end
+        it "shows slideshow" do
+          expect(Yast::SlideShow).to receive(:SwitchToSlideView)
+          Yast::SlideShow.Redraw()
+        end
+      end
+      context "slideshow is not available" do
+        it "redraws the page" do
+          expect(Yast::SlideShow).to receive(:RebuildDialog)
+          Yast::SlideShow.Redraw()
+        end
+      end
+    end
+  end
+
+  describe "#HandleInput" do
+    before do
+      Yast::SlideShow.main
+    end
+    context "switching to details" do
+      before do
+        allow(Yast::SlideShow).to receive(:ShowingDetails).and_return(false)
+      end
+      it "switches to detail view" do
+        expect(Yast::SlideShow).to receive(:SwitchToDetailsView)
+        Yast::SlideShow.HandleInput(:showDetails)
+      end
+      it "saves user selection" do
+        Yast::SlideShow.HandleInput(:showDetails)
+        expect(Yast::SlideShow.user_switched_to).to eq(:details)
+      end
+    end
+    context "switching to slide show" do
+      before do
+        allow(Yast::SlideShow).to receive(:ShowingSlide).and_return(false)
+        allow(Yast::Slides).to receive(:HaveSlides).and_return(true)
+      end
+      context "release notes have been selected before" do
+        before do
+          Yast::SlideShow.user_switched_to = :release_notes
+        end
+        it "redraws the page" do
+          expect(Yast::SlideShow).to receive(:RebuildDialog)
+          Yast::SlideShow.HandleInput(:showSlide)
+        end
+        it "switches to slide show" do
+          expect(Yast::SlideShow).to receive(:SwitchToSlideView)
+          Yast::SlideShow.HandleInput(:showSlide)
+        end
+      end
+      context "release notes have NOT been selected before" do
+        before do
+          Yast::SlideShow.user_switched_to = :none
+        end
+        it "does not redraw the page" do
+          expect(Yast::SlideShow).not_to receive(:RebuildDialog)
+          Yast::SlideShow.HandleInput(:showSlide)
+        end
+        it "switches to slide show" do
+          expect(Yast::SlideShow).to receive(:SwitchToSlideView)
+          Yast::SlideShow.HandleInput(:showSlide)
+        end
+      end
+      it "saves user selection" do
+        Yast::SlideShow.HandleInput(:showSlide)
+        expect(Yast::SlideShow.user_switched_to).to eq(:slides)
+      end
+    end
+    context "switching to release notes" do
+      before do
+        allow(Yast::SlideShow).to receive(:ShowingRelNotes).and_return(false)
+        Yast::SlideShow.add_relnotes_for_product("Foo", :releaseNotesFoo, [])
+      end
+      it "switches to realease notes view" do
+        expect(Yast::SlideShow).to receive(:SwitchToReleaseNotesView)
+        Yast::SlideShow.HandleInput(:rn_Foo)
+      end
+      it "saves user selection" do
+        Yast::SlideShow.HandleInput(:rn_Foo)
+        expect(Yast::SlideShow.user_switched_to).to eq(:release_notes)
+      end
+    end
+  end
+
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.53/package/yast2.changes 
new/yast2-4.2.55/package/yast2.changes
--- old/yast2-4.2.53/package/yast2.changes      2020-01-10 17:18:34.000000000 
+0100
+++ new/yast2-4.2.55/package/yast2.changes      2020-01-17 09:40:03.000000000 
+0100
@@ -1,4 +1,20 @@
 -------------------------------------------------------------------
+Tue Jan 14 16:38:43 UTC 2020 - David Diaz <[email protected]>
+
+- Add a text helper to strip HTML tags (related bsc#1157780)
+- Moves text helpers to String refinements, keeping backward
+  compatibility.
+- 4.2.55
+
+-------------------------------------------------------------------
+Fri Jan 10 14:43:20 UTC 2020 - [email protected]
+
+- Do not refresh package installation overview if the medium has
+  been changed and the user has switched to the release notes tab.
+  (bsc#1129426, bsc#1159367)
+- 4.2.54
+
+-------------------------------------------------------------------
 Fri Jan 10 13:43:20 UTC 2020 - Ancor Gonzalez Sosa <[email protected]>
 
 - Fixed error during upgrade if Btrfs is used and '/var/lib/YaST2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.2.53/package/yast2.spec 
new/yast2-4.2.55/package/yast2.spec
--- old/yast2-4.2.53/package/yast2.spec 2020-01-10 17:18:34.000000000 +0100
+++ new/yast2-4.2.55/package/yast2.spec 2020-01-17 09:40:03.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.2.53
+Version:        4.2.55
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only
@@ -117,8 +117,8 @@
 Conflicts:      yast2-installation < 4.2.9
 # moved cfg_mail.scr
 Conflicts:      yast2-mail < 3.1.7
-# Older packager use removed API
-Conflicts:      yast2-packager < 4.0.33
+# Older packager use removed API e.g. user_switched_to_details
+Conflicts:      yast2-packager < 4.2.44
 # Older snapper does not provide machine-readable output
 Conflicts:     snapper < 0.8.6
 


Reply via email to