Changeset View
Changeset View
Standalone View
Standalone View
neon/tests/plasma/plasma_favorite.pm
Show All 21 Lines | |||||
22 | use testapi; | 22 | use testapi; | ||
23 | 23 | | |||
24 | sub run { | 24 | sub run { | ||
25 | assert_screen 'folder-desktop'; | 25 | assert_screen 'folder-desktop'; | ||
26 | 26 | | |||
27 | # Starts the Application Launcher | 27 | # Starts the Application Launcher | ||
28 | assert_and_click 'plasma-launcher'; | 28 | assert_and_click 'plasma-launcher'; | ||
29 | wait_still_screen; | 29 | wait_still_screen; | ||
30 | | ||||
30 | # Switches to the Application Tab | 31 | # Switches to the Application Tab | ||
31 | assert_screen 'kickoff-favorite'; | 32 | assert_screen 'kickoff-favorite'; | ||
32 | assert_and_click 'kickoff-application'; | 33 | assert_and_click 'kickoff-application'; | ||
33 | assert_and_click 'kickoff-office'; | 34 | assert_and_click 'kickoff-office'; | ||
35 | | ||||
34 | # Adds Okular in the favorites tab | 36 | # Adds Okular in the favorites tab | ||
35 | assert_and_click 'kickoff-okular', 'right'; | 37 | assert_and_click 'kickoff-okular', 'right'; | ||
36 | assert_and_click 'kickoff-add-to-favorite'; | 38 | assert_and_click 'kickoff-add-to-favorite'; | ||
37 | assert_screen 'kickoff-favorite-okular'; | 39 | assert_screen 'kickoff-favorite-okular', 60; | ||
40 | send_key 'esc'; | ||||
41 | wait_still_screen; | ||||
42 | | ||||
43 | # Logging out from the session | ||||
44 | assert_and_click 'plasma-launcher', undef, 60; | ||||
45 | assert_and_click 'kickoff-leave'; | ||||
46 | assert_and_click 'kickoff-leave-logout'; | ||||
47 | assert_and_click 'ksmserver-logout'; | ||||
48 | wait_still_screen; | ||||
49 | | ||||
50 | # Back in the session | ||||
51 | $self->login; | ||||
52 | assert_screen 'folder-desktop', 60; | ||||
53 | | ||||
38 | # Removes Okular from the favorites tab | 54 | # Removes Okular from the favorites tab | ||
55 | assert_and_click 'plasma-launcher'; | ||||
56 | wait_still_screen; | ||||
39 | assert_and_click 'kickoff-favorite-okular', 'right'; | 57 | assert_and_click 'kickoff-favorite-okular', 'right'; | ||
40 | assert_and_click 'kickoff-remove-from-favorite'; | 58 | assert_and_click 'kickoff-remove-from-favorite'; | ||
41 | assert_screen ['kickoff-favorite-okular', 'kickoff-favorite'], 60; | 59 | assert_screen ['kickoff-favorite-okular', 'kickoff-favorite'], 60; | ||
42 | if (match_has_tag('kickoff-favorite-okular')) { | 60 | if (match_has_tag('kickoff-favorite-okular')) { | ||
43 | die 'Okular should not be visible on the favorite tab' | 61 | die 'Okular should not be visible on the favorite tab' | ||
44 | } | 62 | } | ||
63 | | ||||
45 | # Close the kickoff otherwise next test will fail | 64 | # Close the kickoff otherwise next test will fail | ||
46 | assert_and_click 'kickoff-dismiss'; | 65 | assert_and_click 'kickoff-dismiss'; | ||
47 | } | 66 | } | ||
48 | 67 | | |||
49 | sub test_flags { | 68 | sub test_flags { | ||
50 | # without anything - rollback to 'lastgood' snapshot if failed | 69 | # without anything - rollback to 'lastgood' snapshot if failed | ||
51 | # 'fatal' - whole test suite is in danger if this fails | 70 | # 'fatal' - whole test suite is in danger if this fails | ||
52 | # 'milestone' - after this test succeeds, update 'lastgood' | 71 | # 'milestone' - after this test succeeds, update 'lastgood' | ||
53 | # 'important' - if this fails, set the overall state to 'fail' | 72 | # 'important' - if this fails, set the overall state to 'fail' | ||
54 | return { important => 1 }; | 73 | return { important => 1 }; | ||
55 | } | 74 | } | ||
56 | 75 | | |||
57 | 1; | 76 | 1; |