| 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, type_text |
| 11 |
from uitest.uihelper.common import change_measurement_unit |
| 12 |
|
| 13 |
class tdf132169(UITestCase): |
| 14 |
def test_tdf132169(self): |
| 15 |
|
| 16 |
with self.ui_test.load_file(get_url_for_data_file("shape.odt")) as writer_doc: |
| 17 |
|
| 18 |
with change_measurement_unit(self, "Point"): |
| 19 |
|
| 20 |
self.xUITest.executeCommand(".uno:JumpToNextFrame") |
| 21 |
|
| 22 |
|
| 23 |
xLineMetric = self.ui_test.wait_until_child_is_available('metricfield') |
| 24 |
self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "0.0 pt") |
| 25 |
|
| 26 |
|
| 27 |
with self.ui_test.execute_dialog_through_command(".uno:FormatLine") as xFormatLineDlg: |
| 28 |
xWidth = xFormatLineDlg.getChild('MTR_FLD_LINE_WIDTH') |
| 29 |
type_text(xWidth, "4.0") |
| 30 |
|
| 31 |
self.ui_test.wait_until_property_is_updated(xLineMetric, "Text", "4.0 pt") |
| 32 |
self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "4.0 pt") |
| 33 |
|
| 34 |
xLineMetric.executeAction("UP", tuple()) |
| 35 |
|
| 36 |
shape = writer_doc.getDrawPages()[0][0] |
| 37 |
|
| 38 |
|
| 39 |
self.assertEqual(shape.LineWidth, 176) |
| 40 |
|
| 41 |
|