diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-07-26 13:16:29 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-26 14:50:22 +0200 |
commit | 6e07c40577df013dc113310b7c2b76ee2b26e158 (patch) | |
tree | 7dc3cea6117224a77d7f41d5e4cbaacadc67ee8b /sw/qa | |
parent | 6ed8c5a0f19901ab413c6610649326b2475c3a8c (diff) |
sw bibliography, local copy: finish UI in the Define Bibliography Entry dialog
Add the missing page check-button/spin-button, so the local copy UI is
on par with the URL one.
Change-Id: I0387ead2ad3ccdf3e36710ae23bb5e2f02e02934
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119497
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/uitest/ui/index/index.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sw/qa/uitest/ui/index/index.py b/sw/qa/uitest/ui/index/index.py index 8b76b04bc5a5..4d974764fa2a 100644 --- a/sw/qa/uitest/ui/index/index.py +++ b/sw/qa/uitest/ui/index/index.py @@ -52,4 +52,41 @@ class TestSwuiidxmrk(UITestCase): # i.e. the page number was not part of the URL. self.assertEqual(field.Value, "#page=1") + def test_bibliography_local_page_number_insert(self): + + # Given an empty Writer document: + with self.ui_test.create_doc_in_start_center("writer") as component: + + self.ui_test.execute_modeless_dialog_through_command(".uno:InsertAuthoritiesEntry") + insert_entry = self.xUITest.getTopFocusWindow() + from_document = insert_entry.getChild("fromdocument") + from_document.executeAction("CLICK", tuple()) + new = insert_entry.getChild("new") + + # When inserting a biblio entry field with a page number: + with self.ui_test.execute_blocking_action(new.executeAction, args=('CLICK', ())) as define_entry: + entry = define_entry.getChild("entry") + type_text(entry, "aaa") + listbox = define_entry.getChild("listbox") + select_pos(listbox, "16") # WWW document, just select a valid position + pagecb = define_entry.getChild("pagecb-local-visible") + pagecb.executeAction("CLICK", tuple()) + + insert = insert_entry.getChild("insert") + insert.executeAction("CLICK", tuple()) + close = insert_entry.getChild("close") + self.ui_test.close_dialog_through_button(close) + + # Then make sure the local URL contains that page number: + paragraphs = component.Text.createEnumeration() + paragraph = paragraphs.nextElement() + portions = paragraph.createEnumeration() + portion = portions.nextElement() + for field in portion.TextField.Fields: + if field.Name != "LocalURL": + continue + # Without the accompanying fix in place, this test would have failed with: + # Could not find child with id: pagecb-local-visible + self.assertEqual(field.Value, "#page=1") + # vim: set shiftwidth=4 softtabstop=4 expandtab: |