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