Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0017038Openbravo ERPA. Platformpublic2011-05-06 10:422011-06-29 10:02
elopio 
iperdomo 
highmajorN/A
closedno change required 
5
pi 
3.0MP1 
Core
No
0017038: Improve testability of read-only fields in the status bar
For the automation framework, it is not so easy to access the values of the fields in the status bar.
Some parsing is required, and the tests will be error prone.
And it would be a lot easier if all the fields in the status bar were
separate label objects, accessible from an array in the leftStatusBar
object using the field names as keys.

An alternate solution, and not so nice, would be to add a name attribute to the spans. Something like:
<span class="OBStatusBarTextLabel_Field"
name="documentStatus">Draft</span>

There might be other solutions. Those are the ones I could think of today.
testability
Issue History
2011-05-06 10:42elopioNew Issue
2011-05-06 10:42elopioAssigned To => dbaz
2011-05-06 10:42elopioModules => Core
2011-05-11 08:59elopioTag Attached: testability
2011-06-15 15:07hgbotCheckin
2011-06-15 15:07hgbotNote Added: 0038359
2011-06-20 18:31iperdomoStatusnew => scheduled
2011-06-20 18:31iperdomoAssigned Todbaz => iperdomo
2011-06-20 18:31iperdomofix_in_branch => pi
2011-06-27 09:13iperdomoTarget Version => 3.0MP1
2011-06-27 09:13iperdomofix_in_branchpi =>
2011-06-28 18:43iperdomoNote Added: 0038568
2011-06-28 18:43iperdomoStatusscheduled => feedback
2011-06-29 10:02elopioNote Added: 0038576
2011-06-29 10:02elopioStatusfeedback => closed
2011-06-29 10:02elopioResolutionopen => no change required

Notes
(0038359)
hgbot   
2011-06-15 15:07   
Repository: tools/automation/int
Changeset: 09d3a0768869f42b0169234ecac344ef5d66537a
Author: Leo Arias <leo.arias <at> openbravo.com>
Date: Thu Jun 09 12:00:00 2011 -0600
URL: http://code.openbravo.com/tools/automation/int/rev/09d3a0768869f42b0169234ecac344ef5d66537a [^]

Revomed the data verification after the payment:
We still can't check fields in the status bar because of issue 17038.

---
M src-test/com/openbravo/test/integration/erp/testsuites/smoke/sales/SALb_AddSalesInvoicePayment.java
---
(0038568)
iperdomo   
2011-06-28 18:43   
The approach to improve the testability of statusbar fields is to use the hidden fields at the end of the form.

Each statusbar field has hidden field to track the the value. It could be used for this purpose.
(0038576)
elopio   
2011-06-29 10:02   
We could gather all the information needed for the test from the objects already present and accessible.
The list of the fields and its order was taken from the statusBarFields array of the OBForm object.
The title of the fields was taken from the HiddenField objects in OBForm.fields.
With this we could form the string that we expect to be displayed in the status bar, and assert that it is correct.
And in order to get the value of the fields, we can use this same objects. But this last functionality is not yet implemented in the tests.

Thanks to Iván for all the help.