Skip to content

Commit fdb00ff

Browse files
dtopuzovNataliya Hristova
authored andcommitted
chore: update tests due to day light saving (#428)
* chore: update tests due to day light saving * chore: fix date time strings * fix: strings
1 parent 8cb502c commit fdb00ff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/runtimes/android/android_runtime_tests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,10 +627,10 @@ def test_440_tns_run_android_new_date_work_as_expected_when_changing_timezone(se
627627
period=5)
628628
assert test_result, "Select time zone Button is missing on the device"
629629
Device.click(self.emulator, text="Select time zone")
630-
test_result = Wait.until(lambda: Device.is_text_visible(self.emulator, "Pacific Daylight Time", True),
630+
test_result = Wait.until(lambda: Device.is_text_visible(self.emulator, "Los Angeles", True),
631631
timeout=30, period=5)
632-
assert test_result, "Pacific Daylight Time Button is missing on the device"
633-
Device.click(self.emulator, text="Pacific Daylight Time")
632+
assert test_result, "Los Angeles Button is missing on the device."
633+
Device.click(self.emulator, text="Los Angeles")
634634

635635
else:
636636
output = Adb.run_adb_command("shell am start -a android.settings.DATE_SETTINGS", self.emulator.id,
@@ -654,10 +654,10 @@ def test_440_tns_run_android_new_date_work_as_expected_when_changing_timezone(se
654654
period=5)
655655
assert test_result, "TAP Button is missing on the device"
656656
Device.click(self.emulator, text="TAP", case_sensitive=True)
657-
assert_result = Wait.until(lambda: "GMT-0700 (PDT)" in File.read(log.log_file), timeout=240, period=5)
657+
assert_result = Wait.until(lambda: "GMT-0800 (PST)" in File.read(log.log_file), timeout=240, period=5)
658658
assert assert_result, "Missing log for time! Logs: " + File.read(log.log_file)
659659
# Generate regex for asserting date and time
660-
date_to_find_los_angeles = los_angeles_time.strftime(r'%a %b %d %Y %H:.{2}:.{2}') + r" GMT\-0700 \(PDT\)"
660+
date_to_find_los_angeles = los_angeles_time.strftime(r'%a %b %d %Y %H:.{2}:.{2}') + r" GMT\-0800 \(PST\)"
661661
# Assert date time is correct
662662
assert_result = Wait.until(lambda: re.search(date_to_find_los_angeles, File.read(log.log_file)), timeout=20,
663663
period=5)

0 commit comments

Comments
 (0)