Repository navigation
moving specs to request specs, divide feature_edit_spec + map_layers_… - #887
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The frontpage link assertions and OmniAuth request setup need correction before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request moves controller coverage into request specs, splits large feature specs, and centralizes shared setup.
Changes:
- Adds request-level coverage for sessions, maps, frontpage, locale, and admin behavior.
- Splits feature editing and layer visibility specs.
- Adds reusable map setup and API stubs.
File summaries
| File | Reviewed changes and findings |
|---|---|
spec/support/shared_contexts.rb |
Adds reusable map setup and API stubs. |
spec/requests/sessions_controller_spec.rb |
Adds session request coverage. Moderate (1 vote): the request should obtain or submit the OmniAuth CSRF token before posting. |
spec/requests/maps_controller_spec.rb |
Adds map access and listing coverage. |
spec/requests/frontpage_controller_spec.rb |
Adds frontpage request coverage. Moderate (3 votes): assertions should verify /my and /m link destinations, not only anchor text. |
spec/requests/application_controller_spec.rb |
Adds locale request coverage. |
spec/requests/admin_controller_spec.rb |
Adds admin access and listing coverage. |
spec/features/translations_spec.rb |
Retains JavaScript translation coverage. |
spec/features/maps_my_list_spec.rb |
Retains browser delete coverage. |
spec/features/maps_list_spec.rb |
Retains browser interaction coverage. |
spec/features/map_permissions_spec.rb |
Moves permission coverage to request specs. |
spec/features/map_layers_visibility_spec.rb |
Adds layer visibility and ordering coverage. |
spec/features/map_layers_spec.rb |
Focuses layer behavior coverage. |
spec/features/login_spec.rb |
Retains logout UI coverage. |
spec/features/frontpage_spec.rb |
Removes redundant coverage moved to request specs. |
spec/features/feature_edit_spec.rb |
Focuses general feature editing coverage. |
spec/features/feature_edit_point_spec.rb |
Adds point-feature editing coverage. Nit (1 vote): change wiht to with. |
spec/features/admin_spec.rb |
Retains admin browser interactions. |
Review details
Suppressed comments (2)
spec/features/feature_edit_point_spec.rb:97
- This comment contains a typo:
wihtshould bewith.
# Cannot select in shadow dom wiht capybara
spec/requests/sessions_controller_spec.rb:13
- This request is sent through the OmniAuth middleware, whose request validation is configured in
config/initializers/omniauth.rb:17. Unlike the browser form, the bare POST never obtains or submits the hidden CSRF token, so the middleware can reject it beforeSessionsController#developerruns. Fetch the login form/token first (or otherwise supply the token) before posting this route.
post "/auth/developer/login"
- Files reviewed: 17/17 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+18
to
+19
| expect(response.body).to include(">your maps</a>") | ||
| expect(response.body).to include(">create</a>") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…spec