[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 749c84a7eac613dee8a9253da3c4b140bc0f63c1 Author: Xisco Fauli AuthorDate: Tue Oct 27 15:41:46 2020 +0100 Commit: Xisco Fauli CommitDate: Tue Oct 27 21:04:05 2020 +0100 list-uitest: update pathes after rearrenging tests also change regex expression suggested by M. Kaganski Change-Id: I9a93d2ebe6f486fcbaa201a983ded2087446d823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104889 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/bin/list-uitest.py b/bin/list-uitest.py index f04517436348..5678fb346c49 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -38,7 +38,7 @@ def get_files_list(directory, extension): return array_items def linkFormat(name): -bugId = re.search(r'\d{6}|\d{5}', name) +bugId = re.search(r'\d{5,6}', name) if bugId: return "[https://bugs.documentfoundation.org/show_bug.cgi?id={} {}]"\ .format(bugId.group(), name) @@ -49,12 +49,12 @@ def linkFormat(name): def main(): uitest_ext = '.py' uitest_dirs = { -'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/', '../sw/qa/uitest/'], -'Calc' : ['../uitest/calc_tests', '../sc/qa/uitest/'], +'Writer' : ['../writerperfect/qa/uitest/', '../sw/qa/uitest/'], +'Calc' : ['../sc/qa/uitest/'], 'Impress' : ['../uitest/impress_tests/', '../sd/qa/uitest/'], 'Math': ['../uitest/math_tests/'], -'Draw': [''], -'Manual_tests': ['../uitest/manual_tests/']} +'Demo': ['../uitest/demo_ui/'], +'Draw': ['']} print('{{TopMenu}}') print('{{Menu}}') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit 1eb066eb752503658a4aedf6556ce52eb0326bd2 Author: Xisco Fauli AuthorDate: Thu Oct 22 21:33:27 2020 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 23 12:21:41 2020 +0200 list-uitest.py: use regex to find the bug id Change-Id: Ieef4cf5594ec0b417617391dd0534f36844853e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104698 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli diff --git a/bin/list-uitest.py b/bin/list-uitest.py index da670355635f..f04517436348 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -8,6 +8,7 @@ import os import datetime +import re def analyze_file(filename): class_name = "" @@ -37,9 +38,10 @@ def get_files_list(directory, extension): return array_items def linkFormat(name): -if name.startswith('tdf'): +bugId = re.search(r'\d{6}|\d{5}', name) +if bugId: return "[https://bugs.documentfoundation.org/show_bug.cgi?id={} {}]"\ -.format(name.split('tdf')[1], name) +.format(bugId.group(), name) else: return name @@ -67,10 +69,10 @@ def main(): for uitest_file in uitest_files: class_name, method_names = analyze_file(uitest_file) if class_name: -print("* {} ({})".format( +print("# {} ({})".format( linkFormat(class_name),uitest_file[3:])) for m in method_names: -print('**' + linkFormat(m)) +print('##' + linkFormat(m)) print() print('[[Category:QA]][[Category:Development]]') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py |1 - 1 file changed, 1 deletion(-) New commits: commit a6b2e86917dc0f54dbaebe11ce7d3dfd97b4b3fa Author: Xisco Fauli AuthorDate: Thu Mar 5 20:55:17 2020 +0100 Commit: Xisco Faulí CommitDate: Thu Mar 5 20:58:43 2020 +0100 bin: remove unused wiki tag in script Change-Id: I87527c30bb74dd300eb3834ea4145ab3c2d84152 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90066 Tested-by: Xisco Faulí Reviewed-by: Xisco Faulí diff --git a/bin/list-uitest.py b/bin/list-uitest.py index c7bee46ea73c..da670355635f 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -57,7 +57,6 @@ def main(): print('{{TopMenu}}') print('{{Menu}}') print('{{Menu.Development}}') -print('{{OrigLang|}}') print() print('Generated on ' + str(datetime.datetime.now())) for k,v in uitest_dirs.items(): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py sd/Module_sd.mk sd/qa sd/UITest_impress_tests.mk
bin/list-uitest.py |4 sd/Module_sd.mk |3 sd/UITest_impress_tests.mk | 16 +++ sd/qa/uitest/impress_tests/documentProperties.py | 99 +++ 4 files changed, 120 insertions(+), 2 deletions(-) New commits: commit dc05737d46cd6f4a7f430c7ac8b4e512de12b159 Author: Zdeněk Crhonek AuthorDate: Wed Aug 1 23:36:02 2018 +0200 Commit: Zdenek Crhonek CommitDate: Fri Aug 3 08:02:41 2018 +0200 uitest Impress Document properties Change-Id: Ida877ab6e65d4bcbd42d37fd2567db63f84ed8ad Reviewed-on: https://gerrit.libreoffice.org/58456 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/bin/list-uitest.py b/bin/list-uitest.py index 8924a1f5daec..c7bee46ea73c 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -47,9 +47,9 @@ def linkFormat(name): def main(): uitest_ext = '.py' uitest_dirs = { -'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/', '../sw/qa/uitest/writer_tests/'], +'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/', '../sw/qa/uitest/'], 'Calc' : ['../uitest/calc_tests', '../sc/qa/uitest/'], -'Impress' : ['../uitest/impress_tests/'], +'Impress' : ['../uitest/impress_tests/', '../sd/qa/uitest/'], 'Math': ['../uitest/math_tests/'], 'Draw': [''], 'Manual_tests': ['../uitest/manual_tests/']} diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk index 59f792a78037..495aee8d89fa 100644 --- a/sd/Module_sd.mk +++ b/sd/Module_sd.mk @@ -59,4 +59,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sd,\ JunitTest_sd_unoapi \ )) +$(eval $(call gb_Module_add_uicheck_targets,sd,\ + UITest_impress_tests \ +)) # vim: set noet sw=4 ts=4: diff --git a/sd/UITest_impress_tests.mk b/sd/UITest_impress_tests.mk new file mode 100644 index ..94610578dc1b --- /dev/null +++ b/sd/UITest_impress_tests.mk @@ -0,0 +1,16 @@ +# 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/. +# + +$(eval $(call gb_UITest_UITest,impress_tests)) + +$(eval $(call gb_UITest_add_modules,impress_tests,$(SRCDIR)/sd/qa/uitest,\ + impress_tests/ \ +)) + +$(eval $(call gb_UITest_set_defs,impress_tests, \ +TDOC="$(SRCDIR)/sd/qa/uitest/impress_tests/data" \ +)) diff --git a/sd/qa/uitest/impress_tests/documentProperties.py b/sd/qa/uitest/impress_tests/documentProperties.py new file mode 100644 index ..e74ba0fd26c6 --- /dev/null +++ b/sd/qa/uitest/impress_tests/documentProperties.py @@ -0,0 +1,99 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# 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.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict +import time +from uitest.debug import sleep +from uitest.uihelper.common import select_pos + + +class ImpressDocumentProperties(UITestCase): + + def test_open_document_properties_impress(self): +self.ui_test.create_doc_in_start_center("impress") +xTemplateDlg = self.xUITest.getTopFocusWindow() +xCancelBtn = xTemplateDlg.getChild("cancel") +self.ui_test.close_dialog_through_button(xCancelBtn) + + self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties") +xDialog = self.xUITest.getTopFocusWindow() +xResetBtn = xDialog.getChild("reset") +xResetBtn.executeAction("CLICK", tuple()) +xTabs = xDialog.getChild("tabcontrol") + +select_pos(xTabs, "0") #first tab +xUserDataCheckbox = xDialog.getChild("userdatacb") # apply user data +xUserDataCheckbox.executeAction("CLICK", tuple()) +xThumbSaveCheckbox = xDialog.getChild("thumbnailsavecb") # save preview image with document +xThumbSaveCheckbox.executeAction("CLICK", tuple()) + +#digital signature +xDigSignBtn = xDialog.getChild("signature") +def handle_sign_dlg(dialog): +xNoBtn = dialog.getChild("no") +self.ui_test.close_dialog_through_button(xNoBtn) +self.ui_test.execute_blocking_action(xDigSignBtn.executeAction, args=('CLICK', ()), +dialog_handler=handle_sign_dlg) + +select_pos(xTabs, "1") #tab Description + +xTitleText = xDialog.getChild("title") +xTitleText.executeAction("TYPE", mkPropertyValues({"TEXT":"Title text"})) +xSubjectText = xDialog.getChild("subject") +xSubjectText.executeAction("TYPE",
[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit ad32bcdfa1cecb28abe934885df62bd6a49aa978 Author: Zdeněk CrhonekDate: Wed Jan 3 20:14:24 2018 +0100 uitest - add folder uitest/manual_tests to script script for page https://wiki.documentfoundation.org/ListUiTests Change-Id: I0081a4e1229105ef7387e70d76a5670a4f5de691 Reviewed-on: https://gerrit.libreoffice.org/47340 Reviewed-by: Xisco Faulí Tested-by: Xisco Faulí diff --git a/bin/list-uitest.py b/bin/list-uitest.py index baecc41b89a0..8924a1f5daec 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -12,7 +12,7 @@ import datetime def analyze_file(filename): class_name = "" method_list = [] -with open(filename) as fh: +with open(filename, encoding='utf-8') as fh: for line in fh: if line.lstrip().startswith('class '): class_name = line.lstrip().split(" ")[1].split("(")[0] @@ -51,7 +51,8 @@ def main(): 'Calc' : ['../uitest/calc_tests', '../sc/qa/uitest/'], 'Impress' : ['../uitest/impress_tests/'], 'Math': ['../uitest/math_tests/'], -'Draw': ['']} +'Draw': [''], +'Manual_tests': ['../uitest/manual_tests/']} print('{{TopMenu}}') print('{{Menu}}') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py |7 +++ 1 file changed, 7 insertions(+) New commits: commit a09958dd35bf29b99714e05c758ff0c71ca75870 Author: Xisco FauliDate: Tue Jan 23 16:21:07 2018 +0100 Add wiki header and footer to the output Change-Id: Iec0be65f57cac06756f2e8101d3edb89b126e92f Reviewed-on: https://gerrit.libreoffice.org/48430 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/bin/list-uitest.py b/bin/list-uitest.py index c5cabc3abdea..baecc41b89a0 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -53,6 +53,11 @@ def main(): 'Math': ['../uitest/math_tests/'], 'Draw': ['']} +print('{{TopMenu}}') +print('{{Menu}}') +print('{{Menu.Development}}') +print('{{OrigLang|}}') +print() print('Generated on ' + str(datetime.datetime.now())) for k,v in uitest_dirs.items(): print('\n=== ' + k + ' ===') @@ -66,6 +71,8 @@ def main(): linkFormat(class_name),uitest_file[3:])) for m in method_names: print('**' + linkFormat(m)) +print() +print('[[Category:QA]][[Category:Development]]') if __name__ == '__main__': main() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py sw/Module_sw.mk sw/qa sw/UITest_writer_tests.mk
bin/list-uitest.py |2 sw/Module_sw.mk|4 + sw/UITest_writer_tests.mk | 12 + sw/qa/uitest/writer_tests/deleteAllComments.py | 54 + 4 files changed, 71 insertions(+), 1 deletion(-) New commits: commit aa9d919e50e38d40c46cbd172cf51a4cc13673c4 Author: ZdenÄk CrhonekDate: Wed Dec 6 20:25:23 2017 +0100 uitest - writer "delete all comments"; move writer tests to sw/qa/uitest Change-Id: Id7d6a2a413234b07df3f0f07184e7e33fec73633 Reviewed-on: https://gerrit.libreoffice.org/45985 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/bin/list-uitest.py b/bin/list-uitest.py index e95af23676ab..c5cabc3abdea 100755 --- a/bin/list-uitest.py +++ b/bin/list-uitest.py @@ -47,7 +47,7 @@ def linkFormat(name): def main(): uitest_ext = '.py' uitest_dirs = { -'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/'], +'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/', '../sw/qa/uitest/writer_tests/'], 'Calc' : ['../uitest/calc_tests', '../sc/qa/uitest/'], 'Impress' : ['../uitest/impress_tests/'], 'Math': ['../uitest/math_tests/'], diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 966c71d097fd..472eac81ad93 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -122,6 +122,10 @@ $(eval $(call gb_Module_add_screenshot_targets,sw,\ CppunitTest_sw_dialogs_test \ CppunitTest_sw_dialogs_test_2 \ )) + +$(eval $(call gb_Module_add_uicheck_targets,sw,\ + UITest_writer_tests \ +)) endif # vim: set noet sw=4 ts=4: diff --git a/sw/UITest_writer_tests.mk b/sw/UITest_writer_tests.mk new file mode 100644 index ..3205991d0429 --- /dev/null +++ b/sw/UITest_writer_tests.mk @@ -0,0 +1,12 @@ +# 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/. +# + +$(eval $(call gb_UITest_UITest,writer_tests)) + +$(eval $(call gb_UITest_add_modules,writer_tests,$(SRCDIR)/sw/qa/uitest,\ + writer_tests/ \ +)) diff --git a/sw/qa/uitest/writer_tests/deleteAllComments.py b/sw/qa/uitest/writer_tests/deleteAllComments.py new file mode 100644 index ..ad9e0c823e6f --- /dev/null +++ b/sw/qa/uitest/writer_tests/deleteAllComments.py @@ -0,0 +1,54 @@ +# +# 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.framework import UITestCase +import time +from uitest.uihelper.common import get_state_as_dict, type_text + +class DeleteAllComments(UITestCase): + +def test_comments_delete(self): + +self.ui_test.create_doc_in_start_center("writer") + +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + + +type_text(xWriterEdit, "Test LibreOffice") + +document = self.ui_test.get_component() + +selection = self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:InsertAnnotation") +cursor = document.getCurrentController().getViewCursor() +xWriterDoc.executeAction("LEFT", tuple()) +type_text(xWriterEdit, "E") +self.xUITest.executeCommand(".uno:InsertAnnotation") +self.xUITest.executeCommand(".uno:DeleteAllNotes") +self.assertEqual(document.Text.String[0:4], "Test") + +self.ui_test.close_doc() + +def test_comment_trackchanges(self): +#tdf111524 +self.ui_test.create_doc_in_start_center("writer") + +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +type_text(xWriterEdit, "foo") + +document = self.ui_test.get_component() + +selection = self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:InsertAnnotation") +self.xUITest.executeCommand(".uno:TrackChanges") +self.xUITest.executeCommand(".uno:DeleteAllNotes") + + + +self.ui_test.close_doc() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bin/list-uitest.py
bin/list-uitest.py | 71 + 1 file changed, 71 insertions(+) New commits: commit 226c4c010e805fb899ab065c3837241861d6d6db Author: Xisco FauliDate: Wed Nov 29 13:31:42 2017 +0100 Create script to list the uitests Change-Id: Ie5a1b7151a32cc72da6a1c68bde2518897eea0f4 Reviewed-on: https://gerrit.libreoffice.org/45496 Reviewed-by: Xisco Faulà Tested-by: Xisco Faulà diff --git a/bin/list-uitest.py b/bin/list-uitest.py new file mode 100755 index ..e95af23676ab --- /dev/null +++ b/bin/list-uitest.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 + +# 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/. + +import os +import datetime + +def analyze_file(filename): +class_name = "" +method_list = [] +with open(filename) as fh: +for line in fh: +if line.lstrip().startswith('class '): +class_name = line.lstrip().split(" ")[1].split("(")[0] +elif line.lstrip().startswith('def test_'): +method_list.append( +line.lstrip().split("test_")[1].split("(")[0]) +else: +continue +return class_name, method_list + +def get_files_list(directory, extension): +array_items = [] + +dh = os.scandir(directory) +for entry in dh: +if entry.is_dir(): +array_items += get_files_list(entry.path, extension) +elif entry.is_file(): +if entry.name.endswith(extension): +array_items.append(entry.path) + +return array_items + +def linkFormat(name): +if name.startswith('tdf'): +return "[https://bugs.documentfoundation.org/show_bug.cgi?id={} {}]"\ +.format(name.split('tdf')[1], name) +else: +return name + + +def main(): +uitest_ext = '.py' +uitest_dirs = { +'Writer' : ['../uitest/writer_tests/', '../writerperfect/qa/uitest/'], +'Calc' : ['../uitest/calc_tests', '../sc/qa/uitest/'], +'Impress' : ['../uitest/impress_tests/'], +'Math': ['../uitest/math_tests/'], +'Draw': ['']} + +print('Generated on ' + str(datetime.datetime.now())) +for k,v in uitest_dirs.items(): +print('\n=== ' + k + ' ===') +for uitest_dir in v: +if uitest_dir: +uitest_files = get_files_list(uitest_dir, uitest_ext) +for uitest_file in uitest_files: +class_name, method_names = analyze_file(uitest_file) +if class_name: +print("* {} ({})".format( +linkFormat(class_name),uitest_file[3:])) +for m in method_names: +print('**' + linkFormat(m)) + +if __name__ == '__main__': +main() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits