| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
from uitest.framework import UITestCase |
| 10 |
from uitest.uihelper.common import get_url_for_data_file |
| 11 |
|
| 12 |
class tdf142847(UITestCase): |
| 13 |
def test_tdf142847(self): |
| 14 |
|
| 15 |
with self.ui_test.load_file(get_url_for_data_file("tdf142847.fodt")): |
| 16 |
document = self.ui_test.get_component() |
| 17 |
|
| 18 |
|
| 19 |
shape = document.DrawPage[0] |
| 20 |
|
| 21 |
|
| 22 |
frame = shape.getText() |
| 23 |
|
| 24 |
oldFramePos = frame.getPropertyValue("HoriOrientPosition") |
| 25 |
oldShapePos = shape.getPropertyValue("LeftMargin") |
| 26 |
oldDiff = oldFramePos - oldShapePos |
| 27 |
|
| 28 |
|
| 29 |
self.xUITest.executeCommand(".uno:JumpToNextFrame") |
| 30 |
self.ui_test.wait_until_child_is_available('metricfield') |
| 31 |
|
| 32 |
|
| 33 |
with self.ui_test.execute_dialog_through_command(".uno:TextWrap") as wrap_dialog: |
| 34 |
wrap_dialog.getChild('left').executeAction("UP", tuple()) |
| 35 |
|
| 36 |
newDiff = frame.getPropertyValue("HoriOrientPosition") - shape.getPropertyValue("LeftMargin") |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
self.assertEqual(oldDiff, newDiff) |
| 41 |
|
| 42 |
self.assertGreater(frame.getPropertyValue("HoriOrientPosition"), oldFramePos) |
| 43 |
self.assertGreater(shape.getPropertyValue("LeftMargin"), oldShapePos) |
| 44 |
|
| 45 |
|