Debian Codegraph @

sw/qa/uitest/writer_tests4/tdf136578.py

raw symbols SCIP
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
2 #
3 # This file is part of the LibreOffice project.
4 #
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 #
9 from uitest.framework import UITestCase
10 from uitest.uihelper.common import get_url_for_data_file
11
12 class tdf136578(UITestCase):
13
14 def test_tdf136578(self):
15
16 with self.ui_test.load_file(get_url_for_data_file("tdf136578.odt")) as document:
17
18 self.assertEqual(document.CurrentController.PageCount, 2)
19
20 xPageBreak = self.ui_test.wait_until_child_is_available('PageBreak')
21 xPageBreak.executeAction("DELETE", tuple())
22
23 # Without the fix in place, this test would have failed with
24 # AssertionError: 1 != 2
25 self.assertEqual(document.CurrentController.PageCount, 1)
26
27 self.xUITest.executeCommand(".uno:Undo")
28
29 self.assertEqual(document.CurrentController.PageCount, 2)
30
31 # vim: set shiftwidth=4 softtabstop=4 expandtab: