Skip to content

moving specs to request specs, divide feature_edit_spec + map_layers_… - #887

Merged
digitaltom merged 1 commit into
mainfrom
reorganize_specs
Sep 10, 2026
Merged

digitaltom merged 1 commit into
mainfrom
reorganize_specs

Conversation

@digitaltom

Copy link
Copy Markdown
Collaborator

…spec

Copilot AI lite review requested due to automatic review settings September 10, 2026 14:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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: wiht should be with.
        # 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 before SessionsController#developer runs. 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>")
@digitaltom
digitaltom merged commit debbc80 into main Sep 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants