Simplify Krusader app test

We don't need a separate 'welcome' needle because it just matches
on an OK button anyway. So turn that needle into an OK needle
(we don't have any existing 'blue OK button' needle) and simplify
the logic to a single loop for kde_ok and krusader_settings_close.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-10-08 14:47:46 -07:00
parent 401ebecc10
commit 40974c2f94
3 changed files with 5 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{
"properties": [],
"tags": [
"krusader_welcome"
"kde_ok"
],
"area": [
{

View File

Before

Width:  |  Height:  |  Size: 510 KiB

After

Width:  |  Height:  |  Size: 510 KiB

View File

@ -10,19 +10,12 @@ sub run {
# Start the application
menu_launch_type "krusader";
# Deal with the welcome screens
assert_screen ["krusader_welcome", "krusader_settings_close"];
while (match_has_tag "krusader_welcome") {
assert_and_click "krusader_welcome";
assert_screen ["krusader_welcome", "krusader_settings_close"];
}
# Settings close
assert_screen ["krusader_settings_close", "kde_ok"];
# Deal with the welcome screens, which all have an OK button
assert_screen ["kde_ok", "krusader_settings_close"];
while (match_has_tag "kde_ok") {
assert_and_click "kde_ok";
assert_screen ["krusader_settings_close", "kde_ok"]
assert_screen ["kde_ok", "krusader_settings_close"];
}
assert_and_click "krusader_settings_close";
wait_still_screen 2;