diff --git a/neon/needles/kickoff/kickoff-favorite.json b/neon/needles/kickoff/kickoff-favorite-okular.json similarity index 54% copy from neon/needles/kickoff/kickoff-favorite.json copy to neon/needles/kickoff/kickoff-favorite-okular.json index 950e417..39aac60 100644 --- a/neon/needles/kickoff/kickoff-favorite.json +++ b/neon/needles/kickoff/kickoff-favorite-okular.json @@ -1,25 +1,17 @@ { "area": [ { "height": 64, "match": 95, "type": "match", "width": 445, "xpos": 19, "ypos": 406 - }, - { - "height": 101, - "match": 95, - "type": "match", - "width": 107, - "xpos": 4, - "ypos": 616 } ], "properties": [], "tags": [ - "kickoff-favorite" + "kickoff-favorite-okular" ] } diff --git a/neon/needles/kickoff/kickoff-favorite.png b/neon/needles/kickoff/kickoff-favorite-okular.png similarity index 100% copy from neon/needles/kickoff/kickoff-favorite.png copy to neon/needles/kickoff/kickoff-favorite-okular.png diff --git a/neon/needles/kickoff/kickoff-favorite.json b/neon/needles/kickoff/kickoff-favorite.json index 950e417..f9ddabe 100644 --- a/neon/needles/kickoff/kickoff-favorite.json +++ b/neon/needles/kickoff/kickoff-favorite.json @@ -1,25 +1,25 @@ { "area": [ { - "height": 64, + "height": 90, "match": 95, "type": "match", - "width": 445, - "xpos": 19, - "ypos": 406 + "width": 94, + "xpos": 8, + "ypos": 632 }, { - "height": 101, + "height": 89, "match": 95, "type": "match", - "width": 107, - "xpos": 4, - "ypos": 616 + "width": 404, + "xpos": 43, + "ypos": 369 } ], "properties": [], "tags": [ "kickoff-favorite" ] } diff --git a/neon/needles/kickoff/kickoff-favorite.png b/neon/needles/kickoff/kickoff-favorite.png index d457f6a..0259aea 100644 Binary files a/neon/needles/kickoff/kickoff-favorite.png and b/neon/needles/kickoff/kickoff-favorite.png differ diff --git a/neon/needles/kickoff/kickoff-remove-from-favorite.json b/neon/needles/kickoff/kickoff-remove-from-favorite.json new file mode 100644 index 0000000..1487675 --- /dev/null +++ b/neon/needles/kickoff/kickoff-remove-from-favorite.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "height": 30, + "match": 95, + "type": "match", + "width": 201, + "xpos": 254, + "ypos": 551 + } + ], + "properties": [], + "tags": [ + "kickoff-remove-from-favorite" + ] +} + diff --git a/neon/needles/kickoff/kickoff-favorite.png b/neon/needles/kickoff/kickoff-remove-from-favorite.png similarity index 60% copy from neon/needles/kickoff/kickoff-favorite.png copy to neon/needles/kickoff/kickoff-remove-from-favorite.png index d457f6a..e7bbabe 100644 Binary files a/neon/needles/kickoff/kickoff-favorite.png and b/neon/needles/kickoff/kickoff-remove-from-favorite.png differ diff --git a/neon/tests/plasma/plasma_favorite.pm b/neon/tests/plasma/plasma_favorite.pm index d4f5f66..e5fd834 100644 --- a/neon/tests/plasma/plasma_favorite.pm +++ b/neon/tests/plasma/plasma_favorite.pm @@ -1,47 +1,55 @@ # Copyright (C) 2018 Bhavisha Dhruve # Copyright (C) 2016-2018 Harald Sitter # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License or (at your option) version 3 or any later version # accepted by the membership of KDE e.V. (or its successor approved # by the membership of KDE e.V.), which shall act as a proxy # defined in Section 14 of version 3 of the license. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . use base "basetest_neon"; use strict; use testapi; sub run { - assert_screen 'folder-desktop', 30; + assert_screen 'folder-desktop'; # Starts the Application Launcher assert_and_click 'kickoff'; wait_still_screen; # Switches to the Application Tab - assert_and_click 'kickoff-application', 30; + 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", 20; + assert_and_click 'kickoff-okular', 'right'; assert_and_click 'kickoff-add-to-favorite'; - assert_screen 'kickoff-favorite', 30; + assert_screen 'kickoff-favorite-okular'; + # Removes Okular from the favorites tab + 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' + } } sub test_flags { # without anything - rollback to 'lastgood' snapshot if failed # 'fatal' - whole test suite is in danger if this fails # 'milestone' - after this test succeeds, update 'lastgood' # 'important' - if this fails, set the overall state to 'fail' return { important => 1 }; } 1;