Extract breadcrumb related specs to their own tests#15737
Extract breadcrumb related specs to their own tests#15737andreslucena merged 26 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors breadcrumb-related test assertions across multiple Decidim modules by extracting them into dedicated test cases, and adds new breadcrumb specifications for proposals and budgets. Additionally, it implements breadcrumb support for budget projects and amendments, and adds locale parameters to meeting breadcrumb URLs.
Key Changes
- Extracted breadcrumb assertions from existing tests into separate, focused test cases across 14 spec files
- Added comprehensive breadcrumb tests for proposals (including amendments) and budgets in new dedicated spec files
- Implemented breadcrumb methods in budgets and proposals controllers to support hierarchical navigation
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
decidim-proposals/spec/system/proposals_breadcrumbs_spec.rb |
New file with comprehensive breadcrumb tests for proposals index, single proposal, and amendment pages |
decidim-budgets/spec/system/budgets_breadcrumbs_spec.rb |
New file with breadcrumb tests for budgets index, budget detail, and project detail pages |
decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb |
Refactored breadcrumb methods to support parent and child breadcrumb items for amendments |
decidim-budgets/app/controllers/decidim/budgets/projects_controller.rb |
Added breadcrumb methods to display budget and project hierarchy |
decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb |
Added locale parameter to breadcrumb URL for consistency |
decidim-meetings/app/controllers/decidim/meetings/versions_controller.rb |
Added locale parameter to breadcrumb URL for consistency |
decidim-surveys/spec/system/survey_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-proposals/spec/system/proposals_versions_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-proposals/spec/system/proposals_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-proposals/spec/system/proposal_show_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-meetings/spec/system/show_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-meetings/spec/system/explore_versions_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-meetings/spec/system/explore_meetings_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-elections/spec/system/user_votes_in_an_election_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-debates/spec/system/show_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-debates/spec/system/debates_versions_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-collaborative_texts/spec/system/user_sends_suggestions_spec.rb |
Refactored breadcrumb assertions into consolidated test case |
decidim-blogs/spec/system/explore_posts_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-accountability/spec/system/explore_versions_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
decidim-accountability/spec/system/explore_results_spec.rb |
Extracted breadcrumb assertions into dedicated test cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
decidim-meetings/app/controllers/decidim/meetings/versions_controller.rb
Outdated
Show resolved
Hide resolved
andreslucena
left a comment
There was a problem hiding this comment.
Apart from what I found, other things to check:
Consistency in the plural of the files:
$ fd breadcrumb_spec
decidim-assemblies/spec/system/assembly_breadcrumb_spec.rb
decidim-conferences/spec/system/conference_breadcrumb_spec.rb
decidim-initiatives/spec/system/initiative_breadcrumb_spec.rb
decidim-participatory_processes/spec/system/participatory_process_breadcrumb_spec.rb
$ fd breadcrumbs_spec
decidim-accountability/spec/system/results_breadcrumbs_spec.rb
decidim-blogs/spec/system/blog_breadcrumbs_spec.rb
decidim-budgets/spec/system/budgets_breadcrumbs_spec.rb
decidim-collaborative_texts/spec/system/collaborative_tests_breadcrumbs_spec.rb
decidim-debates/spec/system/debates_breadcrumbs_spec.rb
decidim-elections/spec/system/election_breadcrumbs_spec.rb
decidim-meetings/spec/system/meeting_breadcrumbs_spec.rb
decidim-proposals/spec/system/proposals_breadcrumbs_spec.rb
decidim-surveys/spec/system/survey_breadcrumbs_spec.rbPlease do check the consistency in the title of the specs - it should always be the same: "Blogs Breadcrumb", not "Blogs breadcrumbs".
Also please check the variables that you're passing to the specs. I noticed that there are multiple that aren't actually being used in the examples.
decidim-collaborative_texts/spec/system/collaborative_tests_breadcrumbs_spec.rb
Outdated
Show resolved
Hide resolved
This should be ready. TI have extracted the breadcrumbs to their own separate spec files. The convention that i have tried on the files is : "module_name_breadscrumbs_spec.rb" , while the example names follow the convention "Namespace Breadcrumb". |
* Extract each one spec in own test * Fix budgets specs * Add propsoals specs * Fix failing specs * Update decidim-proposals/spec/system/proposals_breadcrumbs_spec.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update decidim-accountability/spec/system/explore_versions_spec.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Extract results * Extract surveys specs * Extract surveys specs part 2 * Fully extract proposals * Fully extract proposals * Fix typo * Extract meeetings * Extract elections * Extract debates * Extract collaborative texts * Extract blogs * Create uniform specs * Fix filename * Apply review recommendations * Standardize tests * Fix specs --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🎩 What? Why?
This PR splits the specs for breadcrumbs in their own spec. It is related to #15683 and #15299
📌 Related Issues
Link your PR to an issue
Testing
📷 Screenshots
Please add screenshots of the changes you are proposing
