summaryrefslogtreecommitdiff
path: root/cui/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-12-15 08:41:01 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-12-15 09:33:04 +0100
commitc634f836945379ae17a3714938210bba7995dd25 (patch)
tree1744b38e18d6a3ea6171fe062594a8504f31cf65 /cui/qa
parent453c5b6214654b440fe1d3e926cddfb695e17f10 (diff)
sd theme: add UI to set/get the name of a color set
The two names make sense because the theme can have not only color sets but also font names, etc -- but for now we just care about the theme name and a named color set. Change-Id: Ieafca36da005a9c74964e39216bee3c33f6427cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126850 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'cui/qa')
-rw-r--r--cui/qa/uitest/tabpages/themepage.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/cui/qa/uitest/tabpages/themepage.py b/cui/qa/uitest/tabpages/themepage.py
index eb97205d19ab..25726c63feda 100644
--- a/cui/qa/uitest/tabpages/themepage.py
+++ b/cui/qa/uitest/tabpages/themepage.py
@@ -23,7 +23,8 @@ class Test(UITestCase):
drawPage = component.getDrawPages().getByIndex(0)
master = drawPage.MasterPage
theme = mkPropertyValues({
- "Name": "nameA"
+ "Name": "nameA",
+ "ColorSchemeName": "colorSetA"
})
master.Theme = theme
@@ -34,7 +35,13 @@ class Test(UITestCase):
# Select RID_SVXPAGE_THEME.
select_pos(xTabs, "3")
themeName = xDialog.getChild("themeName")
+ themeName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ themeName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
themeName.executeAction("TYPE", mkPropertyValues({"TEXT": "nameB"}))
+ colorSetName = xDialog.getChild("colorSetName")
+ colorSetName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ colorSetName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ colorSetName.executeAction("TYPE", mkPropertyValues({"TEXT": "colorSetB"}))
# Then make sure the doc model is updated accordingly:
# Without the accompanying fix in place, this test would have failed with:
@@ -42,6 +49,10 @@ class Test(UITestCase):
# i.e. the UI didn't update the theme name.
theme = convert_property_values_to_dict(master.Theme)
self.assertEqual(theme["Name"], "nameB")
+ # Without the accompanying fix in place, this test would have failed with:
+ # AssertionError: 'colorSetA' != 'colorSetB'
+ # i.e. the UI didn't update the color scheme name.
+ self.assertEqual(theme["ColorSchemeName"], "colorSetB")
# vim: set shiftwidth=4 softtabstop=4 expandtab: