Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase coverage and consistency of trip planner tests #2336

Closed
wants to merge 7 commits into from

Conversation

anthonyshull
Copy link
Contributor

No ticket. I went through the Trip Planner and wrote tests for everything I think we should cover. Tests are focused on behavior and allow appearance testing to be done in the components.

@@ -265,7 +265,7 @@ defmodule DotcomWeb.Router do

scope "/preview", DotcomWeb do
import Phoenix.LiveView.Router
pipe_through([:browser, :browser_live, :basic_auth_readonly])
pipe_through([:browser, :browser_live])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📓 Just did this for convenience since basic auth won't be there in the near future. Will remove this from the PR before merge.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not remove it now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to in a single PR with all of these dangling trip planner tasks.

Copy link
Collaborator

@thecristen thecristen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!!!!

Comment on lines 47 to 49
Enum.map(1..3, fn _ ->
Factory.build(:place, stop: Factory.build(:stop))
end)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would Factory.build_list(3, :place, stop: Factory.build(:stop)) work just as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can happen later, I feel like this should be part of OpenTripPlannerClient's factory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so because 'grouping' is a dotcom concept not an OTP client concept.

@@ -265,7 +265,7 @@ defmodule DotcomWeb.Router do

scope "/preview", DotcomWeb do
import Phoenix.LiveView.Router
pipe_through([:browser, :browser_live, :basic_auth_readonly])
pipe_through([:browser, :browser_live])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not remove it now?

@anthonyshull anthonyshull added the do not merge ⏳ it's waiting on something label Jan 23, 2025
@anthonyshull anthonyshull marked this pull request as ready for review January 23, 2025 15:05
@anthonyshull anthonyshull requested a review from a team as a code owner January 23, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge ⏳ it's waiting on something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants