Commit 035fa0ec authored by Bhavisha Dhruve's avatar Bhavisha Dhruve

Verify if favorite and alternative changes persist across session restart.

Summary:
- Add code for logging out and getting back in the session
- Check if the changes done works after getting back in session

Reviewers: bshah, sitter, O5 neon

Reviewed By: sitter, O5 neon

Differential Revision: https://phabricator.kde.org/D13560
parent daaf20de
......@@ -74,6 +74,11 @@ sub maybe_login {
}
}
sub logout {
testapi::x11_start_program('Logout');
assert_and_click ('ksmserver-logout');
}
sub boot_to_dm {
my ($self, %args) = @_;
$args{run_setup} //= 1;
......
{
"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": [],
......
......@@ -51,6 +51,7 @@ sub switch_to {
}
sub run {
my ($self) = @_;
assert_screen 'folder-desktop';
# Switch to menu (kicker)
......@@ -62,6 +63,13 @@ sub run {
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';
......
......@@ -22,26 +22,44 @@ use strict;
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';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment