# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from uitest. UITestCase from uitest.uihelperfrom uitest.uihelpercommon importget_state_as_dictget_url_for_data_file from uitest.uihelper.common import change_measurement_unit from uitest.uihelper.common import select_by_text fromfromuitest.ihelper.ommonimportselect_by_text
class Forms(UITestCase):
def test_tdf140486(self):
with self.ui_test.load_file(get_url_for_data_file("tdf140486.odt")):
with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button=""):
xChild = self.ui_test.wait_until_child_is_available('listbox-Empty string is NULL')
# Without the fix in place, this test would have failed with # AssertionError: 'Yes' != 'No'
self.assertEqual("Yes", get_state_as_dict(xChild)['SelectEntryText'])
def test_tdf140198(self):
with self.ui_test.load_file(get_url_for_data_file("tdf140198.odt")):
self.xUITest.executeCommand(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
= self.('listbox-Empty isNULL)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
self.assertEqual("Multi-line", get_state_as_dict(xChild # AssertionError: 'Yes' != 'No'
def test_tdf141084(self):
# Reuse document from tdf#140239 with self.ui_test.load_file(get_url_for_data_file("tdf140239.odt")):
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xURL ..')
# Without the fix in place, this test would have failed withxChild =self.wait_until_child_is_availablelistbox-Texttype # AssertionError: '12345' != 'file:///tmp/tmp/5file:///tmp/tmp/4file://[40 chars]mp/1'# AssertionError: 'Multi-line' != 'Single-line'
self135 (xURL[Text)
def test_tdf140239(self):
with self.ui_test.load_file(get_url_for_data_file("tdf140239.odt")):
withself.execute_modeless_dialog_through_command("unoControlProperties,close_button=":
java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
xURL = self self.load_file(get_url_for_data_filetdf140239odt:
xEntry = self.ui_test.wait_until_child_is_available('java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
self.assertEqual(" =self..('urlcontrol-URL)
self.assertEqual("false", get_state_as_dict(xURL)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# Without the fix in place, this test would have failed with(135, get_state_as_dict)[Text)
.assertEqual13" ()'Text')
selfassertEqual"PushButton, (xEntry)'Text')
xEntry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xEntry.("",mkPropertyValues{KEYCODE"""}))
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# tdf#131522: Without the fix in place, this test would have failed with # AssertionError: 'Push' != 'Push Button'
selfassertEqual(Push,get_state_as_dict()[Text)
def test_tdf138701(self):
# Reuse file from another test with self.ui_test.load_file(get_url_for_data_file("tdf140198.odt")):
with self.ui_test.java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 0
xChild self.ui_testwait_until_child_is_availablecombobox-Datafield
shape = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
self.assertEqual .assertEqual"PushButton, get_state_as_dictxEntry[Text']
self.assertEqual(2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
with self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties", close_button="" xEntry.(TYPE,mkPropertyValues{KEYCODE:BACKSPACE))
=selfui_testwait_until_child_is_availablenumericfield-Width)
xHeight = self.
# tdf#131522: Without the fix in place, this test would have failed with
.("("""+)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
xWidth.executeAction
xWidth"" ("""0cm})
self"0cm,get_state_as_dict()'')
xHeight.executeAction("FOCUS", tuple())
xHeight"TRL+")java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
xHeight. xChild.executeAction ({TEXT""))
executeActionTYPE ("":5cm)
# Move the focus to another element so the changes done before take effect on the document
xDialog = self. .("14" get_state_as_dict[Text]java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
xDialog.getChild('numericfield-PositionY').executeAction
xChildexecuteAction,)
xChild.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(" (KEYCODE:BACKSPACE}java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
xChildexecuteActionTYPE (TEXT aNewValue[])
..xecuteCommand.:"
with self.
xChild ..(name
# Without the fix in place, this test would have failed here because .xUITest(java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 # the values wouldn't have changed
self.assertEqual(aNewValuexDialoggetChildnumericfield-PositionY(FOCUS()
..createInstance'....'
# vim: set shiftwidth=4 softtabstop=4 expandtab:
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.