You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service manual frontend is soon to be retired, and the first step in that process was importing the templates, helpers and specs from the existing repo into this application. See #2583
Imported integration tests that check for the output of a rails helper are failing and have been skipped.
test "shows the time it was saved if it hasn't been published yet" do
now = "2015-10-10T09:00:00+00:00"
last_saved_at = "2015-10-10T08:55:00+00:00"
travel_to(now) do
example = simulate_example_as_first_edition_on_draft_stack(
govuk_content_schema_example(
"service_manual_guide",
"service_manual_guide",
updated_at: last_saved_at,
),
)
base_path = example.fetch("base_path")
stub_content_store_has_item(base_path, example)
visit base_path
within(".app-change-history") do
assert page.has_content?("5 minutes ago")
end
end
end
Running that test in service manual frontend passes. But running that test once imported to this application results in translation missing: en.datetime.distance_in_words.x_days:
test_shows_the_time_it_was_saved_if_it_hasn't_been_published_yetERROR (2.10s)
Minitest::UnexpectedError:
Capybara::ExpectationNotMet: expected to find text "5 minutes ago" in
"From:\nAgile delivery community\nLast updated\ntranslation missing: en.datetime.distance_in_words.x_days ago\nLast update:\n9 October 2015\nThis is our latest change\n+ Show all page updates (2)\n9 September 2015\nThis is another change\n1 September 2015\nGuidance first published"
as per the Rails docs, that helper has built in I18n support, accessing translations from this locale file.
Adding a debugger to the test, and inspecting I18n.backed.translations[:en][:datetime] confirms that those keys are available to the helper, but something in the configuration of the test suite is preventing the helper using them.
NOTE: Once the migration PR is merged, links to the test and the files calling the helper will be added to this issue
The text was updated successfully, but these errors were encountered:
Service manual frontend is soon to be retired, and the first step in that process was importing the templates, helpers and specs from the existing repo into this application. See #2583
Imported integration tests that check for the output of a rails helper are failing and have been skipped.
Original test in service manual frontend
Running that test in service manual frontend passes. But running that test once imported to this application results in
translation missing: en.datetime.distance_in_words.x_days
:Details
time_ago_in_words
is method defined in ActionView::DateHelperI18n.backed.translations[:en][:datetime]
confirms that those keys are available to the helper, but something in the configuration of the test suite is preventing the helper using them.NOTE: Once the migration PR is merged, links to the test and the files calling the helper will be added to this issue
The text was updated successfully, but these errors were encountered: