| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
from uitest.framework import UITestCase |
| 10 |
from uitest.uihelper.common import get_state_as_dict |
| 11 |
from libreoffice.uno.propertyvalue import mkPropertyValues |
| 12 |
from uitest.uihelper.common import select_pos |
| 13 |
from uitest.uihelper.common import get_url_for_data_file |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
class tdf156783(UITestCase): |
| 18 |
def test_tdf156783(self): |
| 19 |
with self.ui_test.load_file(get_url_for_data_file("TC-table-del-add.docx")) as self.document: |
| 20 |
|
| 21 |
|
| 22 |
self.xUITest.executeCommand(".uno:AcceptAllTrackedChanges") |
| 23 |
|
| 24 |
|
| 25 |
self.xUITest.executeCommand(".uno:SelectAll") |
| 26 |
self.xUITest.executeCommand(".uno:SelectAll") |
| 27 |
self.xUITest.executeCommand(".uno:SelectAll") |
| 28 |
|
| 29 |
|
| 30 |
with self.ui_test.execute_dialog_through_command(".uno:TableDialog", close_button="ok") as xDialog: |
| 31 |
tabcontrol = xDialog.getChild("tabcontrol") |
| 32 |
select_pos(tabcontrol, "3") |
| 33 |
|
| 34 |
sync = xDialog.getChild("sync") |
| 35 |
rightmf = xDialog.getChild("rightmf") |
| 36 |
leftmf = xDialog.getChild("leftmf") |
| 37 |
topmf = xDialog.getChild("topmf") |
| 38 |
bottommf = xDialog.getChild("bottommf") |
| 39 |
sync.executeAction("CLICK", tuple()) |
| 40 |
|
| 41 |
rightmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) |
| 42 |
rightmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) |
| 43 |
rightmf.executeAction("TYPE", mkPropertyValues({"TEXT":"72pt"})) |
| 44 |
leftmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) |
| 45 |
leftmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) |
| 46 |
leftmf.executeAction("TYPE", mkPropertyValues({"TEXT":"72pt"})) |
| 47 |
topmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) |
| 48 |
topmf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) |
| 49 |
topmf.executeAction("TYPE", mkPropertyValues({"TEXT":"72pt"})) |
| 50 |
bottommf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) |
| 51 |
bottommf.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) |
| 52 |
bottommf.executeAction("TYPE", mkPropertyValues({"TEXT":"72pt"})) |
| 53 |
|
| 54 |
self.assertEqual(get_state_as_dict(rightmf)["Text"], u"72pt") |
| 55 |
self.assertEqual(get_state_as_dict(leftmf)["Text"], u"72pt") |
| 56 |
self.assertEqual(get_state_as_dict(topmf)["Text"], u"72pt") |
| 57 |
self.assertEqual(get_state_as_dict(bottommf)["Text"], u"72pt") |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|