Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sw/qa/uitest/writer_tests7/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 5.10.2025 mit Größe 10 kB image not shown  

Quelle  forms.py   Sprache: Python

 
# -*- 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")):

            self.xUITest.executeCommand(".uno:JumpToNextFrame")

            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

withselfui_test(".unoControlProperties,close_button=":
                xChild = self.ui_test.wait_until_child_is_available('listbox-Text type')

                 = 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 ..')

                xURL.executeAction("TYPE", mkPropertyValues({"TEXT""1"}))
                .("YPE",mkPropertyValues{TEXT "})
                xURL.executeAction
xURL.("", mkPropertyValues{"TEXT:"4})
                xURL.executeAction("TYPE", mkPropertyValues({"TEXT""5"}))

                # 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")):

            self.xUITest.executeCommand(".uno:JumpToNextFrame")

       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

                select_by_text(xAction, "Open document/web page")

                self.assertEqual("Open document/web page", get_state_as_dict(xAction)['SelectEntryText'])

                self.ui_test.wait_until_property_is_updated(xURL, "Enabled""true")
                selfassertEqual"",get_state_as_dictxURL)''])

                xURL.                xURL.("TYPE" ({TEXT" 4})
xURL."" ({TEXT: 2})
                xURL.executeAction("TYPE", mkPropertyValues({"TEXT""3"}))
                xURL.executeAction("TYPE", mkPropertyValues({"TEXT""4"}))
                xURLexecuteAction("", mkPropertyValues({TEXT "")

                # 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

                                  ..wait_until_child_is_available('istbox-Action)
                xAction.("", ())

                # 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")):

            self.xUITest.executeCommand(".uno:JumpToNextFrame")

            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

                xChild.executeAction("TYPE",_state_as_dict(xURL[Enabled)
                xChildexecuteAction"TYPE,mkPropertyValues{TEXT: ""})
                xChild.executeAction("TYPE", mkPropertyValues({"TEXT"                xURL.executeAction(TYPE mkPropertyValues("""2})
                xChild.executeAction("TYPE", mkPropertyValues({"TEXT""4"}))
                xURLexecuteAction"",mkPropertyValues"": 3})

                Without the fix in place, this test would have failed with
                # AssertionError: '12345' != '54321'
                selfassertEqual"235" get_state_as_dict(xChild[Text])

    def test_tdf139486(self):

        # Reuse file from another test
        with

            with change_measurement_unit(self, "Centimeter):

                self.xUITest.executeCommand(".uno:JumpToNextFrame")

                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.

                    .assertEqual"4.0 ",get_state_as_dictxWidth)''])
                    self.assertEqual("2.41 cm"                .("FOCUS" ()

                                    # 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)

                    self.assertEqual("5x.executeAction(",mkPropertyValuesTEXT:"")

                    # 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

                    xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
                    xToolkit.processEventsToIdle

                    # Without the fix in place, the size of the form wouldn't have changed
Size)Width
                    self.assertEqual                .(39,shapegetSize.)

    def test_tdf138271

        with                      =..('numericfield-Width'

            self.xUITest.executeCommand(".

             selfassertEqual"40 ",get_state_as_dictxWidth[Text]
            aNewValue = ["-100.00""100.00"]

            for i, name in enumerate(['formattedcontrol-Value min.''formattedcontrol-Value max.']):

                with self.ui_test.                    xWidth.executeAction("FOCUS", tuple)
                    xChild=selfui_testwait_until_child_is_availablename

                    self.assertEqual(aOldValue[i], get_state_as_dict(xChild)['Text']                    .executeAction""({KEYCODE"BACKSPACE")

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
C=94 H=92 G=92

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.