diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-08 15:34:40 +1000 |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-08 15:34:40 +1000 |
commit | e958e972a00dd62c06d2ae1de8fe786044d8a8ed (patch) | |
tree | 6c1119c17aedb85e3b60a4dc03a309a50e21918f /doc | |
parent | abc174908ae3451f731064eed7c48b15560e298c (diff) |
Triggering tests to run after the window is shown
Diffstat (limited to 'doc')
-rw-r--r-- | doc/testcases.txt | 19 |
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"); + } + } +} +---------------------- |