Fix new logic in Clocks test

Whoops, we can't just use a straight match_has_tag there as we
did another assert in the middle...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-03-25 08:22:53 -07:00
parent 5332b99076
commit cc832a4ad8
1 changed files with 2 additions and 1 deletions

View File

@ -35,10 +35,11 @@ sub run {
# assume it starts at 'inactive' once we are no longer testing
# < 46.0 anywhere
assert_screen(["clocks_alarm_active", "clocks_alarm_inactive"]);
my $wasactive = match_has_tag("clocks_alarm_active");
# Now toggle the switch to change its state
assert_and_click("gnome_button_toggle");
# whichever state it was in, check it's now in the other
if (match_has_tag("clocks_alarm_active")) {
if ($wasactive) {
assert_screen("clocks_alarm_inactive");
}
else {