FIX: Remove magic time ranges (#19477)

In #15474 we introduced dedicated support for date ranges. As part of that
change we added a fallback of "magic" date ranges, which treats dates in
any paragraph with exactly two dates as a range. There were discussions
about migrating all such paragraphs to use the new date range element, but
it was ultimately decided against.

This change removes the fallback and, as a bonus, adds support for multiple
date ranges in the same paragraph.
This commit is contained in:
Ted Johansson
2022-12-16 14:48:39 +08:00
committed by GitHub
parent 382757d1bd
commit bb328792fb
3 changed files with 91 additions and 9 deletions

View File

@ -40,4 +40,16 @@ module SystemHelpers
ensure
page.driver.browser.manage.window.resize_to(original_size.width, original_size.height)
end
def using_browser_timezone(timezone, &example)
previous_browser_timezone = ENV["TZ"]
ENV["TZ"] = timezone
Capybara.using_session(timezone) do
freeze_time(&example)
end
ENV["TZ"] = previous_browser_timezone
end
end