Project

General

Profile

Bug #8012

Fix combo-box corner cases

Added by Radu Apetrii 6 months ago. Updated 5 months ago.

Status:
WIP
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:

History

#1 Updated by Radu Apetrii 6 months ago

  • Assignee set to Radu Apetrii
  • Status changed from New to WIP

There are quite a lot of corner cases regarding combo-boxes. While working on another task, I managed to identify a few by creating some tests. The point of this task is to have a solution for all of them, even if there will be more to come.

The tests that I've created until this moment of time are on testcases/uast/combo_box/screen_value, added in rev. 2388. They mainly target the screen-value of the combo-boxes with/without list-item-pairs. Also, there is a file called ComboBoxAnalyzer.java which highlights the mismatches in results between Progress and FWD. One can use that file after they've made sure that the generated results (i.e. combo-box1-Progress.txt and combo-box1-FWD.txt) are in the same folder.

I've used branch 7806b to make changes and test these cases. I'm not done with the implementation, but I wanted to point out the branch that I've been using.

Feel free to add more people to the watching list and to post other cases that provide wrong results.

#4 Updated by Radu Apetrii 5 months ago

I added to testcases/uast/combo_box/screen_value some more tests regarding ADD-LAST, ADD-FIRST, LIST-ITEM-PAIRS, SCREEN-VALUE, INSERT, DELETE and combinations of them. The commit is on testcases rev. 2389.

Also, on 7806b rev. 14839 I added some more changes related to combo-boxes:
  • Added a delete(long) function in ComboBoxWidget.
  • Done some better handling on the append-type methods (such as INSERT, ADD-FIRST, ADD-LAST).
  • Also, I rebased 7806b with trunk rev. 14835 since there were some changes of interest in one of the latest revisions.

As there are quite a lot of logic-based changes, I will create a separate post to explain each one of them.

#5 Updated by Radu Apetrii 5 months ago

After putting some thought into this, I came up with a format that, IMO, would make the changes relatively easy to read and examine. That is, present the problems in the following way: Hypothesis, Reason/Test that backs it up, Solution.

1. Calling SCREEN-VALUE before setting LIST-ITEM-PAIRS affects the next SCREEN-VALUE values.

2. When adding/inserting/deleting in/from LIST-ITEM-PAIRS, SCREEN-VALUE takes into account the first label used.

3. By setting multiple LIST-ITEM-PAIRS, SCREEN-VALUE can remain empty string only if it is not accessed (through a getter) in between the time.

4. Using append-type methods (such as INSERT, ADD-FIRST, ADD-LAST) instead of directly setting LIST-ITEM-PAIRS will not influence SCREEN-VALUE.

5. When setting SCREEN-VALUE, "" is not treated the same as " " (shocking, I know).

Most likely there are some cases that I've missed, but I will keep everyone up to date as soon as I find them. Also, 7806b reached rev. 14840 after I added the fix for point 3.

Currently, all 34 test files that I have created are working as in Progress. Also, navigating through a large customer application raised no errors. However, this needs extensive testing.

Also available in: Atom PDF