aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefDisplay.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-20 11:51:48 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commitebc0e6d3f3edb90851295399dd22e081fe00a0c8 (patch)
tree5d08f827e6ed92eb26a778b540e132dbfad5742a /tests/tst_qPrefDisplay.qml
parent82b626b3fdd82bbe251d56a9972941ed207825a3 (diff)
downloadsubsurface-ebc0e6d3f3edb90851295399dd22e081fe00a0c8.tar.gz
core/tests: merge Animations and add vars. to qPrefDisplay
Add class variable tooltip_position to qPrefDisplay Add class variable lastDir to qPrefDisplay qPrefDisplay is updated to use new qPrefPrivate functions Adjust test cases incl. qml tests qPrefAnimations only has 1 variable, that really is a display variable Merge the variable into qPrefDisplay, to simplify setup (and avoid loading extra page in qml). correct theme to save in correct place, and make it a static class variable Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefDisplay.qml')
-rw-r--r--tests/tst_qPrefDisplay.qml49
1 files changed, 48 insertions, 1 deletions
diff --git a/tests/tst_qPrefDisplay.qml b/tests/tst_qPrefDisplay.qml
index eb4e11e30..e25f17bf8 100644
--- a/tests/tst_qPrefDisplay.qml
+++ b/tests/tst_qPrefDisplay.qml
@@ -11,21 +11,68 @@ TestCase {
}
function test_variables() {
+ var x0 = display.animation_speed
+ display.animation_speed = 37
+ compare(display.animation_speed, 37)
+
var x1 = display.divelist_font
display.divelist_font = "helvitica"
compare(display.divelist_font, "helvitica")
+
var x2 = display.font_size
display.font_size = 12.0
compare(display.font_size, 12.0)
+
var x3 = display.display_invalid_dives
display.display_invalid_dives = !x3
compare(display.display_invalid_dives, !x3)
+
var x4 = display.show_developer
display.show_developer = !x4
compare(display.show_developer, !x4)
+
var x5 = display.theme
display.theme = "myColor"
compare(display.theme, "myColor")
- }
+//TBD var x6 = display.tooltip_position
+//TBD display.tooltip_position = ??
+//TBD compare(display.tooltip_position, ??)
+
+ var x7 = display.lastDir
+ display.lastDir = "myDir"
+ compare(display.lastDir, "myDir")
+
+ var x8 = display.UserSurvey
+ display.UserSurvey = "yes"
+ compare(display.UserSurvey, "yes")
+
+//TBD var x9 = display.mainSplitter
+//TBD display.mainSplitter = ???
+//TBD compare(display.mainSplitter, ???)
+
+//TBD var x10 = display.topSplitter
+//TBD display.topSplitter = ???
+//TBD compare(display.topSplitter, ???)
+
+//TBD var x11 = display.bottomSplitter
+//TBD display.bottomSplitter = ???
+//TBD compare(display.bottomSplitter, ???)
+
+ var x12 = display.maximized
+ display.maximized = true
+ compare(display.maximized, true)
+
+//TBD var x13 = display.geometry
+//TBD display.geometry = ???
+//TBD compare(display.geometry, ???)
+
+//TBD var x14 = display.windowState
+//TBD display.windowState = ???
+//TBD compare(display.windowState, ???)
+
+ var x15 = display.lastState
+ display.lastState = 17
+ compare(display.lastState, 17)
+ }
}