|
1 | 1 | *** Settings *** |
2 | | -Documentation Tests to test javafxlibrary keywords |
| 2 | +Documentation Tests to test javafxlibrary.keywords.AdditionalKeywords.Find related keywords |
3 | 3 | Library JavaFXLibrary |
4 | 4 | Suite Setup Setup all tests |
5 | 5 | Suite Teardown Teardown all tests |
@@ -121,7 +121,46 @@ Find All With Pseudo Class |
121 | 121 | Should Contain ${hovered} ${node} |
122 | 122 |
|
123 | 123 | # TODO: Add test for text= prefix when next TestFX version comes out (4.0.14-alpha) |
124 | | -# TODO: Add negative tests |
| 124 | + |
| 125 | +Nothing Is Found |
| 126 | + [Tags] smoke negative |
| 127 | + ${node} Find css=NoSuchSelector |
| 128 | + Should Be Empty ${node} |
| 129 | + |
| 130 | +Nothing Is Found When failIfNotFound Is True |
| 131 | + [Tags] smoke negative |
| 132 | + ${msg} Run Keyword And Expect Error * Find css=NoSuchSelector true |
| 133 | + Should Be Equal ${msg} Unable to find anything with query: "css=NoSuchSelector" |
| 134 | + |
| 135 | +Nothing Is Found With Find All |
| 136 | + [Tags] smoke negative |
| 137 | + ${nodes} Find All css=NoSuchSelector |
| 138 | + Should Be Empty ${nodes} |
| 139 | + |
| 140 | +Nothing Is Found With Find All When failIfNotFound Is True |
| 141 | + [Tags] smoke negative |
| 142 | + ${msg} Run Keyword And Expect Error * Find All css=NoSuchSelector true |
| 143 | + Should Be Equal ${msg} Unable to find anything with query: "css=NoSuchSelector" |
| 144 | + |
| 145 | +Previous Query Returns Nothing In Chained Selector |
| 146 | + [Tags] smoke negative |
| 147 | + ${node} Find css=VBox css=ZBox Pane id=lime |
| 148 | + Should Be Empty ${node} |
| 149 | + |
| 150 | +Previous Query Returns Nothing In Chained Selector With Find All |
| 151 | + [Tags] smoke negative |
| 152 | + ${nodes} Find All css=VBox css=ZBox Pane id=lime |
| 153 | + Should Be Empty ${nodes} |
| 154 | + |
| 155 | +Previous Query Returns Nothing In Chained Selector When failIfNotFound Is True |
| 156 | + [Tags] smoke negative |
| 157 | + ${msg} Run Keyword And Expect Error * Find css=VBox css=ZBox Pane id=lime true |
| 158 | + Should Be Equal ${msg} Unable to find anything with query: "css=VBox css=ZBox Pane id=lime" |
| 159 | + |
| 160 | +Previous Query Returns Nothing In Chained Selector With Find All When failIfNotFound Is True |
| 161 | + [Tags] smoke negative |
| 162 | + ${msg} Run Keyword And Expect Error * Find All css=VBox css=ZBox Pane id=lime true |
| 163 | + Should Be Equal ${msg} Unable to find anything with query: "css=VBox css=ZBox Pane id=lime" |
125 | 164 |
|
126 | 165 | *** Keywords *** |
127 | 166 | Setup all tests |
|
0 commit comments