67
77
#####################################################################################
70
# Test case objectives:
71
# * Check that the hint is displayed on mouse hover
73
# * Desktop with no running applications
75
# * Hover the cursor over the first application entry
76
# * Check that the hint is displayed
77
# * Check that there are two QActions (there is a "ghost" QAction there)
82
79
test "Display launcher item hint" do
84
verify( TIMEOUT, 'Could not find any application tile' ) {
85
tiles = @app.LauncherList( :name => 'main' ).children( { :desktopFile => /^.*.desktop$/ } )
89
verify(TIMEOUT, 'The launcher item hint is not visible' ) {
90
@app.LauncherContextualMenu()
93
verify( TIMEOUT, 'Could not find any actions in the menu' ) {
94
actions = @app.LauncherContextualMenu().children( { :type => "QAction" } )
96
verify_equal( 2, TIMEOUT, 'There was an unexpected number of actions in the menu' ) {
80
test_display_launcher_item_hint()
101
# Test case objectives:
102
# * Check that the menu is displayed on right click
104
# * Desktop with no running applications
106
# * Right click the first application entry
107
# * Check that the menu is displayed
108
# * Check that there are at least four QActions (two actions and separator, plus a "ghost" one)
113
83
test "Display launcher menu after right click" do
115
verify( TIMEOUT, 'Could not find any application tile' ) {
116
tiles = @app.LauncherList( :name => 'main' ).children( { :desktopFile => /^.*.desktop$/ } )
121
verify(TIMEOUT, 'The launcher menu is not visible' ) {
122
@app.LauncherContextualMenu()
125
verify( TIMEOUT, 'Could not find any actions in the menu' ) {
126
actions = @app.LauncherContextualMenu().children( { :type => "QAction" } )
128
verify_true( TIMEOUT, 'There was not enough actions in the menu' ) {
84
test_display_launcher_menu_after_right_click()
133
# Test case objectives:
134
# * Check that the menu is displayed on right key from item
136
# * Desktop with no running applications
138
# * Focus the launcher, go down and right
139
# * Check that the menu is displayed
140
# * Check that there are at least four QActions (two actions and separator, plus a "ghost" one)
145
87
test "Display launcher menu with keyboard navigation" do
149
verify(TIMEOUT, 'The launcher menu is not visible' ) {
150
@app.LauncherContextualMenu()
153
verify( TIMEOUT, 'Could not find any actions in the menu' ) {
154
actions = @app.LauncherContextualMenu().children( { :type => "QAction" } )
156
verify_true( TIMEOUT, 'There was not enough actions in the menu' ) {
88
test_display_launcher_menu_with_keyboard_navigation()
161
# Test case objectives:
162
# * Check that the menu is being closed on Esc
164
# * Desktop with no running applications
166
# * Focus the launcher, go down and right, press Esc
167
# * Check that the menu is no longer there
172
91
test "Close launcher menu when pressing Esc" do
177
verify_not(TIMEOUT, 'The launcher menu is not visible' ) {
178
@app.LauncherContextualMenu()
92
test_close_launcher_menu_when_pressing_esc()
182
# Test case objectives:
183
# * Check that the menu is being closed on left key
185
# * Desktop with no running applications
187
# * Focus the launcher, go down and right, then left
188
# * Check that the menu is no longer there
193
95
test "Close launcher menu when navigating back to the launcher" do
198
verify_not(TIMEOUT, 'The launcher menu is not visible' ) {
199
@app.LauncherContextualMenu()
96
test_close_launcher_menu_when_navigating_back_to_the_launcher()
203
# Test case objectives:
204
# * Check that the focus goes back to the launcher item when menu was dismissed with Esc
206
# * Desktop with no running applications
208
# * Focus the launcher, go down and right, press Esc
209
# * Check that the launcher item has focus
214
99
test "Verify launcher tile gets focus after dismissing the menu with Esc" do
220
verify( TIMEOUT, 'Could not find any application tile' ) {
221
tiles = @app.LauncherList( :name => 'main' ).children( { :desktopFile => /^.*.desktop$/ } )
224
verify_equal( "true", TIMEOUT, 'Launcher item didn\'t regain focus' ) {
100
test_verify_launcher_tile_gets_focus_after_dismissing_the_menu_with_esc()
229
# Test case objectives:
230
# * Check that the focus goes back to the launcher item when menu was dismissed with keyboard navigation
232
# * Desktop with no running applications
234
# * Focus the launcher, go down and right, press Esc
235
# * Check that the launcher item has focus
240
103
test "Verify launcher tile gets focus after dismissing the menu with keyboard navigation" do
246
verify( TIMEOUT, 'Could not find any application tile' ) {
247
tiles = @app.LauncherList( :name => 'main' ).children( { :desktopFile => /^.*.desktop$/ } )
250
verify_equal( "true", TIMEOUT, 'Launcher item didn\'t regain focus' ) {
104
test_verify_launcher_tile_gets_focus_after_dismissing_the_menu_with_keyboard_navigation()
255
# Test case objectives:
256
# * Check that the focus goes from launcher menu to dash
258
# * Desktop with no running applications
260
# * Focus the launcher, go right, press Super
261
# * Check that the dash search entry has focus
266
107
test "Verify dash search entry gets focus after dismissing the menu with Super" do
270
verify_equal( "true", TIMEOUT, 'Dash search entry doesn\'t have focus' ) {
271
@app.SearchEntry()['activeFocus']
108
test_verify_dash_search_entry_gets_focus_after_dismissing_the_menu_with_super()