| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
from uitest.framework import UITestCase |
| 10 |
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file |
| 11 |
from libreoffice.uno.propertyvalue import mkPropertyValues |
| 12 |
from uitest.uihelper.common import change_measurement_unit |
| 13 |
|
| 14 |
class tdf137397(UITestCase): |
| 15 |
|
| 16 |
def test_tdf137397(self): |
| 17 |
|
| 18 |
with self.ui_test.load_file(get_url_for_data_file("tdf137397.ods")): |
| 19 |
|
| 20 |
with change_measurement_unit(self, 'Centimeter'): |
| 21 |
|
| 22 |
xCalcDoc = self.xUITest.getTopFocusWindow() |
| 23 |
xGridWin = xCalcDoc.getChild("grid_window") |
| 24 |
|
| 25 |
xGridWin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Shape"})) |
| 26 |
|
| 27 |
self.xUITest.executeCommand(".uno:Sidebar") |
| 28 |
xGridWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "TextPropertyPanel"})) |
| 29 |
|
| 30 |
xChild = self.ui_test.wait_until_child_is_available('selectwidth') |
| 31 |
self.assertEqual(get_state_as_dict(xChild)['Text'], '6.00 cm') |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
xChild = self.ui_test.wait_until_child_is_available('selectheight') |
| 36 |
self.assertEqual(get_state_as_dict(xChild)['Text'], '2.00 cm') |
| 37 |
|
| 38 |
|
| 39 |
self.xUITest.executeCommand(".uno:Sidebar") |
| 40 |
|
| 41 |
|