From 12f71f76b96364040981efdd78a96f1a67f23d05 Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Tue, 14 May 2024 11:37:31 -0400 Subject: [PATCH] feedback-driven improvements --- lib/dotcom_web/views/schedule/timetable.ex | 8 ++++++-- .../controllers/schedule/timetable_controller_test.exs | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/dotcom_web/views/schedule/timetable.ex b/lib/dotcom_web/views/schedule/timetable.ex index 8a70abaf8c..89a2e3b6f7 100644 --- a/lib/dotcom_web/views/schedule/timetable.ex +++ b/lib/dotcom_web/views/schedule/timetable.ex @@ -1,4 +1,8 @@ defmodule DotcomWeb.ScheduleView.Timetable do + @moduledoc """ + Functions for showing timetable content. + """ + alias Schedules.Schedule alias DotcomWeb.ViewHelpers, as: Helpers alias DotcomWeb.PartialView.SvgIconWithCircle @@ -127,8 +131,8 @@ defmodule DotcomWeb.ScheduleView.Timetable do def cell_via_class(<<_::binary>>), do: " m-timetable__cell--via" @spec is_ferry(Route.t()) :: boolean - def is_ferry(route), do: Routes.Route.type_atom(route) == :ferry + def is_ferry(route), do: Route.type_atom(route) == :ferry @spec is_commuter_rail(Route.t()) :: boolean - def is_commuter_rail(route), do: Routes.Route.type_atom(route) == :commuter_rail + def is_commuter_rail(route), do: Route.type_atom(route) == :commuter_rail end diff --git a/test/dotcom_web/controllers/schedule/timetable_controller_test.exs b/test/dotcom_web/controllers/schedule/timetable_controller_test.exs index 7801071a22..2c37ab5ca9 100644 --- a/test/dotcom_web/controllers/schedule/timetable_controller_test.exs +++ b/test/dotcom_web/controllers/schedule/timetable_controller_test.exs @@ -287,7 +287,7 @@ defmodule DotcomWeb.ScheduleController.TimetableControllerTest do assert platform_stop == track_change_for_schedule( schedule_1, - ["stop-1-other-patform"], + [Faker.Internet.slug()], fn _platform_stop_id -> platform_stop end ) end @@ -305,7 +305,7 @@ defmodule DotcomWeb.ScheduleController.TimetableControllerTest do assert nil == track_change_for_schedule( schedule_1, - ["stop-1-other-patform"], + [Faker.Internet.slug()], fn _platform_stop_id -> platform_stop end ) end