cockpit: set log priority to 'info' before looking for entry

We finally saw a test where there were *no* errors logged by the
time Cockpit reached the log screen, so there were no entries to
click. Let's just make the test set log level to info before
looking for entries - I prefer this to 'click entry if found,
otherwise change log level' as that's twice as many branches to
look after. Of course, it means the warning triangle entry needle
is useless now :(

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-02-19 10:24:50 -08:00
parent 011b98961b
commit 1cd0529785
5 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 487,
"height": 15,
"xpos": 860,
"type": "match",
"width": 52
}
],
"properties": [],
"tags": [
"cockpit_logs_entry"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 308,
"ypos": 304,
"width": 60,
"height": 12,
"type": "match"
}
],
"properties": [],
"tags": [
"cockpit_logs_priority_text"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -13,7 +13,14 @@ sub run {
assert_and_click "cockpit_logs"; assert_and_click "cockpit_logs";
# the date dropdown changes and messes with the button locations, so wait # the date dropdown changes and messes with the button locations, so wait
wait_still_screen 2; wait_still_screen 2;
# assume there's an entry, click it # set priority to info and above in case there are no errors
assert_and_click "cockpit_logs_priority_text";
send_key "backspace";
send_key "backspace";
send_key "backspace";
send_key "backspace";
type_string "info\n";
# now click an entry
assert_and_click "cockpit_logs_entry"; assert_and_click "cockpit_logs_entry";
# check we get to the appropriate detail screen # check we get to the appropriate detail screen
assert_screen "cockpit_logs_detail"; assert_screen "cockpit_logs_detail";