summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-12-08 15:34:40 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-12-08 15:34:40 +1000
commite958e972a00dd62c06d2ae1de8fe786044d8a8ed (patch)
tree6c1119c17aedb85e3b60a4dc03a309a50e21918f /doc
parentabc174908ae3451f731064eed7c48b15560e298c (diff)
Triggering tests to run after the window is shown
Diffstat (limited to 'doc')
-rw-r--r--doc/testcases.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/testcases.txt b/doc/testcases.txt
index 73e3a02..3f77479 100644
--- a/doc/testcases.txt
+++ b/doc/testcases.txt
@@ -224,3 +224,22 @@ TestCase {
}
}
----------------------
+
+The special property "windowShown" can be used to trigger a test to run
+just after the main window has been shown on-screen:
+
+----------------------
+Button {
+ id: button
+ onClicked: text = "Clicked"
+ TestCase {
+ name: "ClickTest"
+ when: windowShown
+
+ function test_click() {
+ button.clicked();
+ compare(button.text, "Clicked");
+ }
+ }
+}
+----------------------