tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / qa / uitest / signatureLine / insertSignatureLine.py
blob41be0956b76186bf0b0441fdac909f4896632069
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
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/.
10 from uitest.framework import UITestCase
12 from libreoffice.uno.propertyvalue import mkPropertyValues
15 # Bug 117903 - Allow signature lines in Calc
16 class insertSignatureLineCalc(UITestCase):
18 def test_insert_signature_line_calc(self):
19 with self.ui_test.create_doc_in_start_center("calc") as document:
20 # set the signature line
21 with self.ui_test.execute_dialog_through_command(".uno:InsertSignatureLine") as xDialog:
23 xName = xDialog.getChild("edit_name")
24 xTitle = xDialog.getChild("edit_title")
25 xEmail = xDialog.getChild("edit_email")
26 xComment = xDialog.getChild("checkbox_can_add_comments")
27 xInstructions = xDialog.getChild("edit_instructions")
29 xName.executeAction("TYPE", mkPropertyValues({"TEXT":"Name"})) #set the signature line
30 xTitle.executeAction("TYPE", mkPropertyValues({"TEXT":"Title"}))
31 xEmail.executeAction("TYPE", mkPropertyValues({"TEXT":"Email"}))
32 xComment.executeAction("CLICK", tuple())
33 xInstructions.executeAction("TYPE", mkPropertyValues({"TEXT":"Instructions"}))
35 #check the signature Line in the document
36 element = document.Sheets[0].DrawPage[0]
37 self.assertEqual(element.SignatureLineSuggestedSignerName, "Name")
38 self.assertEqual(element.SignatureLineSuggestedSignerTitle, "Title")
39 self.assertEqual(element.SignatureLineSuggestedSignerEmail, "Email")
40 self.assertEqual(element.SignatureLineSuggestedSignerTitle, "Title")
41 self.assertEqual(element.SignatureLineCanAddComment, False)
42 self.assertEqual(element.SignatureLineShowSignDate, True)
43 self.assertEqual(element.SignatureLineSigningInstructions, "Instructions")
45 # vim: set shiftwidth=4 softtabstop=4 expandtab: