diff --git a/neon/lib/basetest_neon.pm b/neon/lib/basetest_neon.pm --- a/neon/lib/basetest_neon.pm +++ b/neon/lib/basetest_neon.pm @@ -74,6 +74,11 @@ } } +sub logout { + testapi::x11_start_program('Logout'); + assert_and_click ('ksmserver-logout'); +} + sub boot_to_dm { my ($self, %args) = @_; $args{run_setup} //= 1; diff --git a/neon/needles/kicker/plasma-kicker.json b/neon/needles/kicker/plasma-kicker.json --- a/neon/needles/kicker/plasma-kicker.json +++ b/neon/needles/kicker/plasma-kicker.json @@ -1,20 +1,12 @@ { "area": [ { - "height": 383, + "height": 347, "match": 95, "type": "match", - "width": 260, - "xpos": 48, + "width": 252, + "xpos": 52, "ypos": 379 - }, - { - "height": 117, - "match": 95, - "type": "match", - "width": 39, - "xpos": 7, - "ypos": 605 } ], "properties": [], diff --git a/neon/tests/plasma/plasma_alternatives.pm b/neon/tests/plasma/plasma_alternatives.pm --- a/neon/tests/plasma/plasma_alternatives.pm +++ b/neon/tests/plasma/plasma_alternatives.pm @@ -51,6 +51,7 @@ } sub run { + my ($self) = @_; assert_screen 'folder-desktop'; # Switch to menu (kicker) @@ -62,6 +63,13 @@ assert_and_click 'plasma-launcher'; assert_screen 'plasma-kicker'; send_key 'esc'; + + # Starting a new session + $self->logout; + + # Back in the session + $self->login; + assert_screen 'folder-desktop'; # Roll back to launcher (kickoff) switch_to 'launcher'; diff --git a/neon/tests/plasma/plasma_favorite.pm b/neon/tests/plasma/plasma_favorite.pm --- a/neon/tests/plasma/plasma_favorite.pm +++ b/neon/tests/plasma/plasma_favorite.pm @@ -22,26 +22,44 @@ use testapi; sub run { + my ($self) = @_; assert_screen 'folder-desktop'; - + # Starts the Application Launcher assert_and_click 'plasma-launcher'; wait_still_screen; + # Switches to the Application Tab assert_screen 'kickoff-favorite'; assert_and_click 'kickoff-application'; assert_and_click 'kickoff-office'; + # Adds Okular in the favorites tab assert_and_click 'kickoff-okular', 'right'; assert_and_click 'kickoff-add-to-favorite'; - assert_screen 'kickoff-favorite-okular'; + assert_screen 'kickoff-favorite-okular', 60; + send_key 'esc'; + wait_still_screen; + assert_and_click 'plasma-launcher'; + send_key 'esc'; + + # Logging out from the session + $self->logout; + + # Back in the session + $self->login; + assert_screen 'folder-desktop', 60; + # Removes Okular from the favorites tab + assert_and_click 'plasma-launcher'; + wait_still_screen; assert_and_click 'kickoff-favorite-okular', 'right'; assert_and_click 'kickoff-remove-from-favorite'; assert_screen ['kickoff-favorite-okular', 'kickoff-favorite'], 60; if (match_has_tag('kickoff-favorite-okular')) { die 'Okular should not be visible on the favorite tab' } + # Close the kickoff otherwise next test will fail assert_and_click 'kickoff-dismiss'; }