Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2021-03-30 20:51:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Tue Mar 30 20:51:22 2021 rev:507 rq:881940 version:4.3.60

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2021-03-12 
13:31:41.530188866 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new.2401/yast2.changes    2021-03-30 
20:51:38.228132295 +0200
@@ -1,0 +2,7 @@
+Mon Mar 29 09:46:31 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Add a AbstractWidget#displayed? to determine whether
+  a widget is in the UI (bsc#1184115).
+- 4.3.60
+
+-------------------------------------------------------------------

Old:
----
  yast2-4.3.59.tar.bz2

New:
----
  yast2-4.3.60.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.rRj4Dt/_old  2021-03-30 20:51:39.056133223 +0200
+++ /var/tmp/diff_new_pack.rRj4Dt/_new  2021-03-30 20:51:39.060133227 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.3.59
+Version:        4.3.60
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

++++++ yast2-4.3.59.tar.bz2 -> yast2-4.3.60.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.3.59/library/cwm/src/lib/cwm/abstract_widget.rb 
new/yast2-4.3.60/library/cwm/src/lib/cwm/abstract_widget.rb
--- old/yast2-4.3.59/library/cwm/src/lib/cwm/abstract_widget.rb 2021-03-09 
09:41:31.000000000 +0100
+++ new/yast2-4.3.60/library/cwm/src/lib/cwm/abstract_widget.rb 2021-03-29 
14:49:41.000000000 +0200
@@ -188,6 +188,13 @@
       Yast::UI.SetFocus(Id(widget_id))
     end
 
+    # Determines whether the widget is currently displayed in the UI
+    #
+    # @return [Boolean]
+    def displayed?
+      Yast::UI.WidgetExists(Id(widget_id))
+    end
+
   protected
 
     # A helper to check if an event is invoked by this widget
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.3.59/library/cwm/src/lib/cwm/common_widgets.rb 
new/yast2-4.3.60/library/cwm/src/lib/cwm/common_widgets.rb
--- old/yast2-4.3.59/library/cwm/src/lib/cwm/common_widgets.rb  2021-03-09 
09:41:31.000000000 +0100
+++ new/yast2-4.3.60/library/cwm/src/lib/cwm/common_widgets.rb  2021-03-29 
14:49:41.000000000 +0200
@@ -25,12 +25,18 @@
   # A mix-in for widgets using the :Value property
   module ValueBasedWidget
     # Get widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @return [Object] a value according to specific widget type
     def value
       Yast::UI.QueryWidget(Id(widget_id), :Value)
     end
 
     # Set widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @param val [Object] a value according to specific widget type
     # @return [void]
     def value=(val)
@@ -196,11 +202,19 @@
     include ItemsSelection
     abstract_method :label
 
+    # Get widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @return [String] ID of the selected item
     def value
       Yast::UI.QueryWidget(Id(widget_id), :CurrentItem)
     end
 
+    # Set widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @param val [String] ID of the selected item
     def value=(val)
       Yast::UI.ChangeWidget(Id(widget_id), :CurrentItem, val)
@@ -217,11 +231,19 @@
     include ItemsSelection
     abstract_method :label
 
+    # Get widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @return [Array<String>] return IDs of selected items
     def value
       Yast::UI.QueryWidget(Id(widget_id), :SelectedItems)
     end
 
+    # Set widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     # @param val [Array<String>] IDs of newly selected items
     def value=(val)
       Yast::UI.ChangeWidget(Id(widget_id), :SelectedItems, val)
@@ -287,10 +309,19 @@
     # @!method hspacing
     #   @return [Fixnum] margin at both sides of the options list
 
+    # Get widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
     def value
       Yast::UI.QueryWidget(Id(widget_id), :CurrentButton)
     end
 
+    # Set widget value
+    #
+    # Calling this method only make sense when the widget is displayed (see 
#displayed?).
+    #
+    # @param val [Object] a value according to specific widget type
     def value=(val)
       Yast::UI.ChangeWidget(Id(widget_id), :CurrentButton, val)
     end
@@ -390,7 +421,8 @@
 
     # Updates the content
     #
-    # Depending on #keep_scroll?, the vertical scroll will be saved and 
restored.
+    # Depending on #keep_scroll?, the vertical scroll will be saved and 
restored. Calling this
+    # method only make sense when the widget is displayed (see #displayed?).
     #
     # @param val [String] the new content for the widget
     def value=(val)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-4.3.59/library/cwm/test/abstract_widget_test.rb 
new/yast2-4.3.60/library/cwm/test/abstract_widget_test.rb
--- old/yast2-4.3.59/library/cwm/test/abstract_widget_test.rb   2021-03-09 
09:41:31.000000000 +0100
+++ new/yast2-4.3.60/library/cwm/test/abstract_widget_test.rb   2021-03-29 
14:49:41.000000000 +0200
@@ -203,4 +203,37 @@
       TFocus.new.focus
     end
   end
+
+  describe "#displayed?" do
+    subject { TPresent.new }
+
+    class TPresent < CWM::AbstractWidget
+      self.widget_type = :empty
+
+      def initialize
+        self.widget_id = "test"
+      end
+    end
+
+    before do
+      allow(Yast::UI).to receive(:WidgetExists).with(Id("test"))
+        .and_return(present?)
+    end
+
+    context "when the widget is displayed in the UI" do
+      let(:present?) { true }
+
+      it "returns true" do
+        expect(subject.displayed?).to eq(true)
+      end
+    end
+
+    context "when the widget is not displayed in the UI" do
+      let(:present?) { false }
+
+      it "returns false" do
+        expect(subject.displayed?).to eq(false)
+      end
+    end
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.59/package/yast2.changes 
new/yast2-4.3.60/package/yast2.changes
--- old/yast2-4.3.59/package/yast2.changes      2021-03-09 09:41:31.000000000 
+0100
+++ new/yast2-4.3.60/package/yast2.changes      2021-03-29 14:49:41.000000000 
+0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Mar 29 09:46:31 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Add a AbstractWidget#displayed? to determine whether
+  a widget is in the UI (bsc#1184115).
+- 4.3.60
+
+-------------------------------------------------------------------
 Tue Mar  9 08:23:44 UTC 2021 - David Diaz <dgonza...@suse.com>
 
 - Use meaningful button labels when asking the user if would like
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-4.3.59/package/yast2.spec 
new/yast2-4.3.60/package/yast2.spec
--- old/yast2-4.3.59/package/yast2.spec 2021-03-09 09:41:31.000000000 +0100
+++ new/yast2-4.3.60/package/yast2.spec 2021-03-29 14:49:41.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        4.3.59
+Version:        4.3.60
 Release:        0
 Summary:        YaST2 Main Package
 License:        GPL-2.0-only

Reply via email to