Skip to content

Add multiple branch screen#2731

Merged
thomasiles merged 4 commits intomainfrom
add-multiple-branch-screen
Apr 29, 2026
Merged

Add multiple branch screen#2731
thomasiles merged 4 commits intomainfrom
add-multiple-branch-screen

Conversation

@thomasiles
Copy link
Copy Markdown
Contributor

Add a placeholder routes page with link

Trello card: https://trello.com/c/d912GOE9/3068-add-new-routing-screen-to-admin

This PR adds a new route and page to show the routes for a form. The link on the question list page only shows if the feature is enabled for the form's group.

The controller returns 404 if the flag isn't enabeld.

The page:
image

The link:
image

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

We are mocking the path helpers in the view spec for
pages/index.html.erb. But testing against the actual path helpers.

This was covering an assertion that the view when there are no pages
doesn't display the link to add a route.

The page does display the link to add a route, whether there are pages
or not. The current spec was passing because the test was using the real
path helper which the mock didn't match.

This commit removes the test. The "Add a route" link is always
displayed.

When the test was written it probably wasn't supposed to show. Following
the link now shows a page explaining how to add a route.
Add a new placeholder view for showing the routes for a form.
Add a new route and controller for showing multiple branch routes.

The controller returns a 404 if the feature is not enabled.
The page list view shows a link to add a route if the group has multiple
branches enabled.

If the feature flag is not set, the original link to current routing
page is shown as normal.
@github-actions
Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2731.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@thomasiles thomasiles marked this pull request as ready for review April 29, 2026 08:12
@thomasiles thomasiles added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 4426bba Apr 29, 2026
4 checks passed
@thomasiles thomasiles deleted the add-multiple-branch-screen branch April 29, 2026 10:28
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