qspin / qtaste

[NEW RELEASE VERSION 3.0.0] The QTaste is an open-source functional and non-functional test environment offering services to developers and testers. It has been implemented following a data driven testing philosophy.
http://www.qtaste.org
GNU Lesser General Public License v3.0
6 stars 11 forks source link

JavaGUI selectTab & co don't fail on non existent tabs #162

Closed dergo closed 9 years ago

dergo commented 9 years ago

When JavaGUI selectTab(), selectTabId() or selectTabTitled() methods are called on an inexistent tab index, tab name or table title respectively, it executes successfully instead of throwing a QTasteTestFailException.

remybaranx commented 9 years ago

I think this issue is solved now. You can check TabbedPaneSelection and TabbedPaneSelectionException tests in Playback demo.

If you close this issue, don't forget to close the pull request #168 too.

dergo commented 9 years ago

TabbedPaneSelection:

TabbedPaneSelectionException:

exception = False
try:
   call()
except:
   exception = True
   ...
if not exception:
   fail()

do this:

try:
   call()
   fail()
except:
   ...
remybaranx commented 9 years ago

Corrections done.

To be able to check that the selection works, I have added 3 new methods in JavaGUI : getSelectedTabIndex, getSelectedTabTitle, getSelectedTabId.

For the TabbedPaneSelectionException, I have changed test data. Now, instead of TEST_CASE_ID (I understand the problem with it), I use SELECTION_METHOD and SELECTION_VALUE. I prefer to do like that instead of doing like in TabbedPaneSelection, because error cases are different in selection by index and selection by title/id.