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

Fix showing duplicate sponsors #2065

Merged

Conversation

biggianteye
Copy link
Contributor

This is a fix for #1839

When filtering by chapter, the page was displaying a sponsor row for every workshop, like this:

image

This PR fixes the display so that it only shows the chapter once, like this:

image

Copy link
Contributor

@KimberleyCook KimberleyCook left a comment

Choose a reason for hiding this comment

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

Thank you for this very useful fix @biggianteye 🎉

@biggianteye
Copy link
Contributor Author

The build pipeline is failing on this test:

  1) Member portal A non authenticated visitor to the page is redirected to sign_in page when they attempt not access the profile page
     Failure/Error: session[:oauth_token]        = omnihash[:credentials][:token]

     NoMethodError:
       undefined method `[]' for nil:NilClass
     # ./app/controllers/auth_services_controller.rb:48:in `create'
     # ./spec/features/member_portal_spec.rb:95:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:114:in `block (2 levels) in <top (required)>'

Finished in 4 minutes 40.5 seconds (files took 5.06 seconds to load)
744 examples, 1 failure

Failed examples:

rspec ./spec/features/member_portal_spec.rb:94 # Member portal A non authenticated visitor to the page is redirected to sign_in page when they attempt not access the profile page

As far as I can see, this part of the code should not be affected by the changes that I made. I have run all the tests on my machine and don't see this failure.

@KimberleyCook Could you please re-run that part of the build pipeline and see if it still fails?

@KimberleyCook
Copy link
Contributor

@biggianteye thank you so much for this 🎉 🎉

@KimberleyCook KimberleyCook merged commit 31acae9 into codebar:master May 8, 2024
3 checks passed
@biggianteye biggianteye deleted the fix-sponsor-chapter-filter branch May 8, 2024 12:56
@matyikriszta
Copy link
Contributor

@KimberleyCook @biggianteye I was going to comment on this before we merged it, I was going to ask that we update the relevant tests to cover the case when a sponsor has hosted more than one workshop, clearly we missed it when we were working on this feature originally. Test are in spec/features/admin/sponsor_spec.rb

@biggianteye
Copy link
Contributor Author

update the relevant tests to cover the case when a sponsor has hosted more than one workshop

I'll have a go at this.

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.

3 participants