From cc832a4ad8ed0df853392d3254d324fa3e5240b2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 25 Mar 2024 08:22:53 -0700 Subject: [PATCH] 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 --- tests/applications/clocks/alarm.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/applications/clocks/alarm.pm b/tests/applications/clocks/alarm.pm index 27df1540..3549283b 100644 --- a/tests/applications/clocks/alarm.pm +++ b/tests/applications/clocks/alarm.pm @@ -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 {