Project

General

Profile

action #65100

Updated by riafarov over 4 years ago

Steps to reproduce: 

 1. Run 'timezone' yast2 module when libyui-rest-api is installed in the system (e.g. for ncurses: `sudo YUI_HTTP_PORT=9999 /sbin/yast2 timezone`, Qt: `xdg-su -c "env YUI_HTTP_PORT=9999 /sbin/yast2 timezone"`); 
 2. Select another region (e.g. select 'Russia' with `curl -X POST 'http://localhost:9999/v1/widgets?id=region&action=select&value=Russia'`); 
 3. Focus on 'Time Zone' selector. 

 Expected result: 
 Time Zone list is changed in accordance with the selected region. 
 Actual result: 
 Time Zone is remained unchanged. 

 NOTE1: 
 The same issue is reproduced for both YComboBox in Qt and YSelectionBox in ncurses. 
 NOTE2: 
 Please consider other elements which also require the event to be sent after updating. 

 ### Assumption: 
 The issue might happen because YComboBox and YSelectionBox do not implement `activate()` method (we just need to send relevant event), method, so that the method is not called in YHttpWidgetsActionHandler in libyui-rest-api: 

 ``` 
     /** 
     * Activate the item selected in the tree. Can be used in tests to simulate user input. 
     * 
     * Derived classes are required to implement this. 
     **/ 
     virtual void activate() = 0; 
 ```

Back