Hello community,
here is the log from the commit of package libyui-rest-api for openSUSE:Factory
checked in at 2020-10-18 16:21:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui-rest-api (Old)
and /work/SRC/openSUSE:Factory/.libyui-rest-api.new.3486 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-rest-api"
Sun Oct 18 16:21:12 2020 rev:9 rq:840451 version:0.5.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui-rest-api/libyui-rest-api.changes
2020-09-21 16:59:27.794708471 +0200
+++
/work/SRC/openSUSE:Factory/.libyui-rest-api.new.3486/libyui-rest-api.changes
2020-10-18 16:21:23.716490129 +0200
@@ -1,0 +2,19 @@
+Fri Oct 9 13:22:49 UTC 2020 - José Iván López González <[email protected]>
+
+- Use new parent lib SO version libyui.so.14 (bsc#1176402).
+- 0.5.7
+
+-------------------------------------------------------------------
+Thu Oct 1 14:54:18 UTC 2020 - Rodion Iafarov <[email protected]>
+
+- Remove log component from YHttpWidgetsActionHandler header file
+ bsc#1177159
+- 0.5.6
+
+-------------------------------------------------------------------
+Mon Sep 17 08:05:00 UTC 2020 - Joaquín Rivera <[email protected]>
+
+- Add item selection in YMenuBar (bsc#1175115)
+- 0.5.5
+
+-------------------------------------------------------------------
Old:
----
libyui-rest-api-0.5.4.tar.bz2
New:
----
libyui-rest-api-0.5.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libyui-rest-api.spec ++++++
--- /var/tmp/diff_new_pack.rRfcIj/_old 2020-10-18 16:21:24.268490375 +0200
+++ /var/tmp/diff_new_pack.rRfcIj/_new 2020-10-18 16:21:24.268490375 +0200
@@ -16,12 +16,12 @@
#
-%define so_version 13
+%define so_version 14
%define bin_name %{name}%{so_version}
%define libyui_devel_version libyui-devel >= 3.10.1
Name: libyui-rest-api
-Version: 0.5.4
+Version: 0.5.7
Release: 0
Summary: Libyui - REST API plugin, the shared part
License: LGPL-2.1-only OR LGPL-3.0-only
++++++ libyui-rest-api-0.5.4.tar.bz2 -> libyui-rest-api-0.5.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-rest-api-0.5.4/API_v1.md
new/libyui-rest-api-0.5.7/API_v1.md
--- old/libyui-rest-api-0.5.4/API_v1.md 2020-09-16 12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/API_v1.md 2020-10-09 16:52:42.000000000 +0200
@@ -195,10 +195,12 @@
curl -X POST 'http://localhost:9999/v1/widgets?id=names&action=select&row=1'
# select row with "test" cell value in the 2-nd column (counting from zero) in
table with id "names"
curl -X POST
'http://localhost:9999/v1/widgets?id=names&action=select&value=test&column=2'
-# select tree item with in tree with id "files"
-curl -X POST
'http://localhost:9999/v1/widgets?id=files&action=select&value=root|subnode|subnode'
+# select tree item with in tree with id "files" and path 'root|subnode|subnode
+curl -X POST
'http://localhost:9999/v1/widgets?id=files&action=select&value=root%7Csubnode%7Csubnode'
# press url (<a href=\"firewall\">(enable)</a>) in richtext
curl -X POST
'http://localhost:9999/v1/widgets?type=YRichText&action=select&value=firewall'
-# select menu item with label "Image" in parent menu item with label Document
in button menu
-curl -X POST
'http://localhost:9999/v1/widgets?type=YMenuButton&action=select&value=Document|Image'
+# select menu item with label "Image" in parent menu item with label
"Document" in menu button
+curl -X POST
'http://localhost:9999/v1/widgets?type=YMenuButton&action=select&value=Document%7CImage'
+# select menu bar item with label "&Folder" in parent menu item with label
"&Create" in menu bar
+curl -X POST
'http://localhost:9999/v1/widgets?type=YMenuBar&action=select&value=%26Create%7C%26Folder'
```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-rest-api-0.5.4/README.md
new/libyui-rest-api-0.5.7/README.md
--- old/libyui-rest-api-0.5.4/README.md 2020-09-16 12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/README.md 2020-10-09 16:52:42.000000000 +0200
@@ -14,7 +14,11 @@
# libyui-rest-api
Libyui UI REST API framework for integration testing.
-Project started by @lslezak, with support of @cwh42 and @OleksandrOrlov.
+Project started by [@lslezak][], with support of [@cwh42][] and
[@OleksandrOrlov][].
+
+[@lslezak]: https://github.com/lslezak
+[@cwh42]: https://github.com/cwh42
+[@oleksandrOrlov]: https://github.com/OleksandrOrlov
The solution allows to query the UI properties over HTTP using a REST API.
This allows to automate the UI interaction steps and avoid screen-based tools.
@@ -24,8 +28,8 @@
This repository contains the shared functionlity, you need to install
the additional bindings for the specific UI frontends
-((libyui-ncurses-rest-api)[https://github.com/libyui/libyui-ncurses-rest-api]
-or (libyui-qt-rest-api)[https://github.com/libyui/libyui-ncurses-rest-api]).
+([libyui-ncurses-rest-api](https://github.com/libyui/libyui-ncurses-rest-api)
+or [libyui-qt-rest-api](https://github.com/libyui/libyui-ncurses-rest-api)).
Please, find detailed API v1 description
[here](https://github.com/libyui/libyui-rest-api/blob/master/API_v1.md).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-rest-api-0.5.4/VERSION.cmake
new/libyui-rest-api-0.5.7/VERSION.cmake
--- old/libyui-rest-api-0.5.4/VERSION.cmake 2020-09-16 12:45:10.000000000
+0200
+++ new/libyui-rest-api-0.5.7/VERSION.cmake 2020-10-09 16:52:42.000000000
+0200
@@ -1,6 +1,6 @@
SET( VERSION_MAJOR "0")
SET( VERSION_MINOR "5" )
-SET( VERSION_PATCH "4" )
+SET( VERSION_PATCH "7" )
SET( VERSION
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" )
##### This is need for the libyui core, ONLY.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libyui-rest-api-0.5.4/package/libyui-rest-api.changes
new/libyui-rest-api-0.5.7/package/libyui-rest-api.changes
--- old/libyui-rest-api-0.5.4/package/libyui-rest-api.changes 2020-09-16
12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/package/libyui-rest-api.changes 2020-10-09
16:52:42.000000000 +0200
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Fri Oct 9 13:22:49 UTC 2020 - José Iván López González <[email protected]>
+
+- Use new parent lib SO version libyui.so.14 (bsc#1176402).
+- 0.5.7
+
+-------------------------------------------------------------------
+Thu Oct 1 14:54:18 UTC 2020 - Rodion Iafarov <[email protected]>
+
+- Remove log component from YHttpWidgetsActionHandler header file
+ bsc#1177159
+- 0.5.6
+
+-------------------------------------------------------------------
+Mon Sep 17 08:05:00 UTC 2020 - Joaquín Rivera <[email protected]>
+
+- Add item selection in YMenuBar (bsc#1175115)
+- 0.5.5
+
+-------------------------------------------------------------------
Wed Sep 16 10:14:16 UTC 2020 - Ladislav Slezák <[email protected]>
- Fixed compilation in SLE15-SP2 (related to the previous fix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-rest-api-0.5.4/package/libyui-rest-api.spec
new/libyui-rest-api-0.5.7/package/libyui-rest-api.spec
--- old/libyui-rest-api-0.5.4/package/libyui-rest-api.spec 2020-09-16
12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/package/libyui-rest-api.spec 2020-10-09
16:52:42.000000000 +0200
@@ -16,12 +16,12 @@
#
-%define so_version 13
+%define so_version 14
%define bin_name %{name}%{so_version}
%define libyui_devel_version libyui-devel >= 3.10.1
Name: libyui-rest-api
-Version: 0.5.4
+Version: 0.5.7
Release: 0
Summary: Libyui - REST API plugin, the shared part
License: LGPL-2.1-only OR LGPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libyui-rest-api-0.5.4/src/YHttpWidgetsActionHandler.cc
new/libyui-rest-api-0.5.7/src/YHttpWidgetsActionHandler.cc
--- old/libyui-rest-api-0.5.4/src/YHttpWidgetsActionHandler.cc 2020-09-16
12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/src/YHttpWidgetsActionHandler.cc 2020-10-09
16:52:42.000000000 +0200
@@ -19,6 +19,7 @@
#include "YDumbTab.h"
#include "YIntField.h"
#include "YItemSelector.h"
+#include "YMenuBar.h"
#include "YMenuButton.h"
#include "YMultiLineEdit.h"
#include "YProperty.h"
@@ -36,7 +37,6 @@
#include <sstream>
#include <cstdlib>
#include <string>
-#include <boost/algorithm/string.hpp>
#include "YHttpWidgetsActionHandler.h"
@@ -473,22 +473,11 @@
}
else if( dynamic_cast<YMenuButton*>(widget) )
{
- return action_handler<YMenuButton>( widget, body, [&] (YMenuButton
*mb) {
- // Vector of string to store path to the tree item
- std::vector<std::string> path;
- boost::split( path, value, boost::is_any_of( TreePathDelimiter
) );
- YMenuItem * item = mb->findItem( path );
- if ( item )
- {
- yuiMilestone() << "Activating Item by path :" << value <<
" in \"" << mb->label() << "\" MenuButton" << std::endl;
- mb->setKeyboardFocus();
- activate_widget( mb, item );
- }
- else
- {
- throw YUIException("Item with path: '" + value + "' cannot
be found in the MenuButton widget");
- }
- } );
+ return get_menu_selector_handler(
dynamic_cast<YMenuButton*>(widget), value, body );
+ }
+ else if( dynamic_cast<YMenuBar*>(widget) )
+ {
+ return get_menu_selector_handler( dynamic_cast<YMenuBar*>(widget),
value, body );
}
std::string error ( "Action 'select' is not supported for the selected
widget: \"" );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libyui-rest-api-0.5.4/src/YHttpWidgetsActionHandler.h
new/libyui-rest-api-0.5.7/src/YHttpWidgetsActionHandler.h
--- old/libyui-rest-api-0.5.4/src/YHttpWidgetsActionHandler.h 2020-09-16
12:45:10.000000000 +0200
+++ new/libyui-rest-api-0.5.7/src/YHttpWidgetsActionHandler.h 2020-10-09
16:52:42.000000000 +0200
@@ -31,11 +31,13 @@
#include "YInputField.h"
#include "YItem.h"
#include "YMultiSelectionBox.h"
+#include "YMenuItem.h"
#include "YSelectionBox.h"
#include "YTimeField.h"
#include "YWidgetFinder.h"
#include "YWidget.h"
+#include <boost/algorithm/string.hpp>
class YHttpWidgetsActionHandler : public YHttpHandler
{
@@ -158,6 +160,25 @@
}
} );
}
+
+ template<typename T>
+ int get_menu_selector_handler( T *widget, const std::string &value,
std::ostream& body ) {
+ return action_handler<T>( widget, body, [&] (T *menu_selector) {
+ // Vector of string to store path to the tree item
+ std::vector<std::string> path;
+ boost::split( path, value, boost::is_any_of( TreePathDelimiter ) );
+ YMenuItem * item = menu_selector->findItem( path );
+ if ( item )
+ {
+ menu_selector->setKeyboardFocus();
+ activate_widget( menu_selector, item );
+ }
+ else
+ {
+ throw YUIException("Item with path: '" + value + "' cannot be
found in the menu selector widget");
+ }
+ } );
+ }
};
#endif // YHttpWidgetsActionHandler_h