| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
from uitest.framework import UITestCase |
| 11 |
from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict |
| 12 |
|
| 13 |
class tdf163325(UITestCase): |
| 14 |
|
| 15 |
def test_tdf163325_toc_preview_crash(self): |
| 16 |
xFilePath = get_url_for_data_file("tdf163325.odt") |
| 17 |
with self.ui_test.load_file(xFilePath): |
| 18 |
|
| 19 |
with self.ui_test.execute_dialog_through_command(".uno:InsertMultiIndex") as xTocDialog: |
| 20 |
xShowExample = xTocDialog.getChild("showexample") |
| 21 |
xShowExample.executeAction("CLICK", tuple()) |
| 22 |
self.assertEqual(get_state_as_dict(xShowExample)["Selected"], "true") |
| 23 |
|
| 24 |
|
| 25 |
self.xUITest.executeCommand('.uno:Save') |
| 26 |
self.xUITest.executeCommand('.uno:Reload') |
| 27 |
|
| 28 |
self.xUITest.executeCommand(".uno:UpdateAllIndexes") |
| 29 |
|
| 30 |
with self.ui_test.load_file(xFilePath) as document: |
| 31 |
|
| 32 |
xDocumentIndexes = document.DocumentIndexes |
| 33 |
self.assertEqual(len(xDocumentIndexes), 1) |
| 34 |
|
| 35 |
|