Re: UI test logger has wrong expectations on vertical tabs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.2.2022 20.33, Ilmari Lauhakangas wrote:
On 17.2.2022 17.54, Caolán McNamara wrote:
On Thu, 2022-02-17 at 17:32 +0200, Ilmari Lauhakangas wrote:
vcl/source/control/ivctrl.cxx has collectUIInformation with the
parent as the last parameter. It is run in
VerticalTabControl::SetCurPageId

I set a breakpoint there and indeed 'p GetPageParent()->get_id()'
returns an empty string.

GetPageParent() is in vcl/inc/verticaltabctrl.hxx and gets a VclVBox
object.

VclVBox is found in include/vcl/layout.hxx

So GetPageParent() is just m_xBox.get() and that m_xBox is the one
created in the ctor of VerticalTabControl. If it should have an id then
some m_xBox->set_id("whatever") would make that string non-blank.

I don't really know if that "Parent" is particularly useful for any
purpose? I don't think I see anything equivalent for the "normal"
horizontal TabControl, maybe it makes more sense to drop the "Parent"
argument instead of giving it an id.

Thanks, I created a patch: https://gerrit.libreoffice.org/c/core/+/130111

However, the logger thing needs more polish in general. The produced Python test

- might reference a variable before defining it
- seems to always contain at least some indentation errors

Also, as mentioned in the commit message of my patch:

self.xUITest.getTopFocusWindow() in a hyperlink dialog opening test does not contain the child "tabcontrol" and thus the test errors out.

Relevant code paths:
WindowUIObject::get_child in vcl/source/uitest/uiobject.cxx
UITest::getFocusTopWindow in vcl/source/uitest/uitest.cxx

UITestUnoObj::getTopFocusWindow in vcl/source/uitest/uno/uitest_uno.cxx calls UITest::getFocusTopWindow

To that, I say hocus pocus focus!!

I created three reports:
https://bugs.documentfoundation.org/show_bug.cgi?id=147628 UI logger: variable used in generated test before its definition https://bugs.documentfoundation.org/show_bug.cgi?id=147629 UI logger: generated tests have indentation issues https://bugs.documentfoundation.org/show_bug.cgi?id=147630 UI logger can't handle Hyperlink dialog as it does not contain child "tabcontrol"

I used QA Tools for the product. Xisco and me will look into these when we have time, but anyone is free to grab them. The logger could be a nice tool for bug reporters to provide exact steps. Ignoring edge cases like the Hyperlink dialog, we should start promoting it to reporters.

Ilmari



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux