Skip to content

Add test for organization sectors#1269

Merged
maebeale merged 2 commits intorubyforgood:mainfrom
diti0-dot:sectors-test
Mar 1, 2026
Merged

Add test for organization sectors#1269
maebeale merged 2 commits intorubyforgood:mainfrom
diti0-dot:sectors-test

Conversation

@diti0-dot
Copy link
Contributor

What is the goal of this PR and why is this important?

This PR adds system tests for sector visibility on the organization show page and populations served page. The tests verify that:

  • On the organization show page, sectors are displayed with proper truncation when there are more than 3 sectors
  • On the populations served page, all sectors are displayed with correct counts for affiliated sectors.

How did you approach the change?

The tests follow the existing logic defined in organization.rb for direct and affiliated sectors, and mirror the behavior implemented in the organizations controller.

UI Testing Checklist

Anything else to add?

Nothing.

🤖 Generated with Claude Code

@diti0-dot
Copy link
Contributor Author

@maebeale here's that test we talked about in #1184!
Let me know if you need anything else tweaked! 😊

@@ -0,0 +1,89 @@
require "rails_helper"

RSpec.describe "Navbar avatar behavior", type: :system do
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be named "Organization sector displays" rather than "Navbar avatar behavior" ?

@diti0-dot
Copy link
Contributor Author

@maebeale Fixed the test description to “Organization sector displays” to better reflect what the spec is actually covering. Thanks for catching that!

Copy link
Collaborator

@maebeale maebeale left a comment

Choose a reason for hiding this comment

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

Perfecto! Thanks, @diti0-dot !

@maebeale maebeale merged commit 6f48bc4 into rubyforgood:main Mar 1, 2026
3 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