Hello community,

here is the log from the commit of package yast2-users for openSUSE:Factory 
checked in at 2017-02-04 15:16:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-users.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-users"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes  2016-12-22 
16:00:46.350508150 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-users.new/yast2-users.changes     
2017-02-04 16:52:37.200480262 +0100
@@ -1,0 +2,6 @@
+Fri Jan 20 15:28:22 UTC 2017 - [email protected]
+
+- Password widget: a compact layout, do not steal focus (FATE#322328)
+- 3.2.8
+
+-------------------------------------------------------------------

Old:
----
  yast2-users-3.2.7.tar.bz2

New:
----
  yast2-users-3.2.8.tar.bz2

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

Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.8PmARv/_old  2017-02-04 16:52:37.828390861 +0100
+++ /var/tmp/diff_new_pack.8PmARv/_new  2017-02-04 16:52:37.832390292 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-users
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.2.7
+Version:        3.2.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-users-3.2.7.tar.bz2 -> yast2-users-3.2.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/.travis.yml 
new/yast2-users-3.2.8/.travis.yml
--- old/yast2-users-3.2.7/.travis.yml   2016-12-15 15:26:37.215075015 +0100
+++ new/yast2-users-3.2.8/.travis.yml   2017-01-30 15:41:43.874183420 +0100
@@ -1,15 +1,11 @@
-language: cpp
-compiler:
-    - gcc
+sudo: required
+language: bash
+services:
+  - docker
+
 before_install:
-    # disable rvm, use system Ruby
-    - rvm reset
-    - wget 
https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
-    - sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 
yast2-perl-bindings yast2-core-dev yast2-perl-bindings yast2-security 
libcrack2-dev doxygen libdigest-sha1-perl" -g "rspec:3.3.0 yast-rake gettext"
+  - docker build -t yast-users-image .
 script:
-    - rake check:syntax
-    - rake check:pot
-    - make -f Makefile.cvs
-    - make
-    - sudo make install
-    - Y2BASE_Y2DIR=$(pwd)/testsuite make check
+  # the "yast-travis-cpp" script is included in the base yastdevel/cpp image
+  # see https://github.com/yast/docker-yast-cpp/blob/master/yast-travis-cpp
+  - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" 
yast-users-image yast-travis-cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/Dockerfile 
new/yast2-users-3.2.8/Dockerfile
--- old/yast2-users-3.2.7/Dockerfile    1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-users-3.2.8/Dockerfile    2017-01-30 15:41:43.890183420 +0100
@@ -0,0 +1,9 @@
+FROM yastdevel/cpp
+RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
+  cracklib-devel \
+  perl-Digest-SHA1 \
+  yast2 \
+  yast2-perl-bindings \
+  yast2-security \
+  yast2-testsuite
+COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/package/yast2-users.changes 
new/yast2-users-3.2.8/package/yast2-users.changes
--- old/yast2-users-3.2.7/package/yast2-users.changes   2016-12-15 
15:26:37.267075015 +0100
+++ new/yast2-users-3.2.8/package/yast2-users.changes   2017-01-30 
15:41:43.938183420 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Jan 20 15:28:22 UTC 2017 - [email protected]
+
+- Password widget: a compact layout, do not steal focus (FATE#322328)
+- 3.2.8
+
+-------------------------------------------------------------------
 Wed Dec 14 14:35:57 UTC 2016 - [email protected]
 
 - Separate root password widget and keyboard layout test widget
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/package/yast2-users.spec 
new/yast2-users-3.2.8/package/yast2-users.spec
--- old/yast2-users-3.2.7/package/yast2-users.spec      2016-12-15 
15:26:37.267075015 +0100
+++ new/yast2-users-3.2.8/package/yast2-users.spec      2017-01-30 
15:41:43.938183420 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-users
-Version:        3.2.7
+Version:        3.2.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-users-3.2.7/src/lib/users/dialogs/inst_root_first.rb 
new/yast2-users-3.2.8/src/lib/users/dialogs/inst_root_first.rb
--- old/yast2-users-3.2.7/src/lib/users/dialogs/inst_root_first.rb      
2016-12-15 15:26:37.399075015 +0100
+++ new/yast2-users-3.2.8/src/lib/users/dialogs/inst_root_first.rb      
2017-01-30 15:41:44.178183420 +0100
@@ -71,7 +71,7 @@
         VStretch(),
         HSquash(
           VBox(
-            ::Users::PasswordWidget.new,
+            ::Users::PasswordWidget.new(focus: true),
             VSpacing(2.4),
             ::UI::Widgets::KeyboardLayoutTest.new
           )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/src/lib/users/widgets.rb 
new/yast2-users-3.2.8/src/lib/users/widgets.rb
--- old/yast2-users-3.2.7/src/lib/users/widgets.rb      2016-12-15 
15:26:37.447075015 +0100
+++ new/yast2-users-3.2.8/src/lib/users/widgets.rb      2017-01-30 
15:41:44.242183420 +0100
@@ -30,36 +30,57 @@
 Yast.import "UsersSimple"
 
 module Users
+  # The widget contains 2 password input fields
+  # to type and retype the password
   class PasswordWidget < CWM::CustomWidget
-    def initialize
+    # If `little_space` is `false` (the default), the widget will
+    # use a vertical layout, and include a "don't forget this" label.
+    #
+    # If `little_space` is `true`, the helpful label is omitted
+    # and the password fields are laid out horizontally.
+    # @param focus [Boolean] if set, then widget set focus to first password 
input field
+    def initialize(little_space: false, focus: false)
       textdomain "users"
+      @little_space = little_space
+      @focus = focus
     end
 
     def contents
-      VBox(
-        # advise users to remember their new password
-        Left(Label(_("Do not forget what you enter here."))),
-        VSpacing(0.8),
-        Password(
-          Id(:pw1),
-          Opt(:hstretch),
-          # Label: get password for user root
-          _("&Password for root User")
-        ),
-        VSpacing(0.8),
-        Password(
-          Id(:pw2),
-          Opt(:hstretch),
-          # Label: get same password again for verification
-          _("Con&firm Password")
-        )
+      pw1 = Password(
+        Id(:pw1),
+        Opt(:hstretch),
+        # Label: get password for user root
+        _("&Password for root User")
+      )
+      pw2 = Password(
+        Id(:pw2),
+        Opt(:hstretch),
+        # Label: get same password again for verification
+        _("Con&firm Password")
       )
+
+      if @little_space
+        HBox(
+          pw1,
+          HSpacing(1),
+          pw2
+        )
+      else
+        VBox(
+          # advise users to remember their new password
+          Left(Label(_("Do not forget what you enter here."))),
+          VSpacing(0.8),
+          pw1,
+          VSpacing(0.8),
+          pw2
+        )
+      end
     end
 
     def init
       # focus on first password, so user can immediately write. Also does not
       # break openQA current test
-      Yast::UI.SetFocus(Id(:pw1))
+      Yast::UI.SetFocus(Id(:pw1)) if @focus
       current_password = Yast::UsersSimple.GetRootPassword
       return if !current_password || current_password.empty?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-users-3.2.7/test/widgets_test.rb 
new/yast2-users-3.2.8/test/widgets_test.rb
--- old/yast2-users-3.2.7/test/widgets_test.rb  2016-12-15 15:26:37.575075015 
+0100
+++ new/yast2-users-3.2.8/test/widgets_test.rb  2017-01-30 15:41:44.486183420 
+0100
@@ -16,13 +16,26 @@
     expect(subject.contents).to be_a(Yast::Term)
   end
 
-  it "initializes password to current value" do
-    pwd = "paranoic"
-    allow(Yast::UsersSimple).to receive(:GetRootPassword).and_return(pwd)
-    expect(Yast::UI).to receive(:ChangeWidget).with(Id(:pw1), :Value, pwd)
-    expect(Yast::UI).to receive(:ChangeWidget).with(Id(:pw2), :Value, pwd)
+  context "initialization" do
+    it "initializes password to current value" do
+      pwd = "paranoic"
+      allow(Yast::UsersSimple).to receive(:GetRootPassword).and_return(pwd)
+      expect(Yast::UI).to receive(:ChangeWidget).with(Id(:pw1), :Value, pwd)
+      expect(Yast::UI).to receive(:ChangeWidget).with(Id(:pw2), :Value, pwd)
 
-    subject.init
+      subject.init
+    end
+
+    it "sets focus to first widget if focus: parameter set to object" do
+      expect(Yast::UI).to receive(:SetFocus).with(Id(:pw1))
+      subject = described_class.new(focus: true)
+      subject.init
+    end
+
+    it "does not modify focus without focus: parameter" do
+      expect(Yast::UI).to_not receive(:SetFocus).with(Id(:pw1))
+      subject.init
+    end
   end
 
   context "validation" do


Reply via email to