| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
from uitest.framework import UITestCase |
| 11 |
from uitest.uihelper.common import select_pos |
| 12 |
from uitest.uihelper.common import get_state_as_dict |
| 13 |
|
| 14 |
class tdf154543(UITestCase): |
| 15 |
|
| 16 |
def test_tdf154543_reset_snap_to_grid_parent(self): |
| 17 |
|
| 18 |
with self.ui_test.create_doc_in_start_center("writer"): |
| 19 |
|
| 20 |
|
| 21 |
with self.ui_test.execute_dialog_through_command(".uno:EditStyle") as xDialog: |
| 22 |
xTabs = xDialog.getChild("tabcontrol") |
| 23 |
select_pos(xTabs, "2") |
| 24 |
xSnapCheckbox = xTabs.getChild("checkCB_SNAP") |
| 25 |
xSnapCheckbox.executeAction("CLICK", tuple()) |
| 26 |
self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], "false") |
| 27 |
|
| 28 |
|
| 29 |
with self.ui_test.execute_dialog_through_command(".uno:EditStyle") as xDialog: |
| 30 |
xTabs = xDialog.getChild("tabcontrol") |
| 31 |
select_pos(xTabs, "2") |
| 32 |
xSnapCheckbox = xTabs.getChild("checkCB_SNAP") |
| 33 |
xStandardButton = xDialog.getChild("standard") |
| 34 |
xStandardButton.executeAction("CLICK", tuple()) |
| 35 |
|
| 36 |
|
| 37 |
self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], "true") |
| 38 |
|
| 39 |
|