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

Add preview testing for AccordionReviewsComponent #16093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danidoni
Copy link
Contributor

@danidoni danidoni commented May 3, 2024

The preview for AccordionReviewsComponent was broken.
This PR fixes the preview and adds it to the test coverage to ensure it keeps from breaking again.

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label May 3, 2024
@danidoni danidoni force-pushed the add-preview-testing-for-accordion-reviews-component branch from 1780d1f to 1cbaab1 Compare May 3, 2024 12:09
@danidoni danidoni marked this pull request as ready for review May 3, 2024 12:38
@saraycp saraycp self-requested a review May 9, 2024 11:01
render(AccordionReviewsComponent.new(pending_reviews + accepted_reviews + declined_review, :review, can_handle_request: true))
request_reviews = accepted_reviews + pending_reviews + declined_review
bs_request = BsRequest.last || FactoryBot.create(:bs_request_with_submit_action)
render(AccordionReviewsComponent.new(request_reviews, bs_request))
Copy link
Contributor

Choose a reason for hiding this comment

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

The accordion is not visible. I'm using a re-created database filled with the test_data task.

The reason is in the policy as the Admin user is not the maintainer related to whatever request this is taking.

I think we should handle this in another way. Using factories to create the values is a good practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, right, this is a problem with the previews using data from the development environment... My environment is now different from the one from dev:test_data:create...

Let me fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants