Skip to content

Commit 0bb97cb

Browse files
committed
Change link to create a group to the confirm page
Change the create link on the groups index page to point to the confirm page. We update the tests which rely on this.
1 parent 5c83a44 commit 0bb97cb

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/views/groups/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<%= render GroupListComponent::View.new(groups: @active_groups, title: t('groups.index.active_title'), empty_message: t('groups.index.active_empty_message')) %>
5353
<%= render GroupListComponent::View.new(groups: @trial_groups, title: t('groups.index.trial_title'), empty_message: t('groups.index.trial_empty_message')) %>
5454

55-
<%= govuk_button_link_to t("groups.index.create_group"), new_group_path, class:"govuk-!-margin-top-3" %>
55+
<%= govuk_button_link_to t("groups.index.create_group"), confirm_new_groups_path, class:"govuk-!-margin-top-3" %>
5656
</div>
5757
</div>
5858

spec/features/groups/create_group_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
scenario "Form creator creates a new group" do
99
when_i_visit_the_groups_page
1010
and_i_click_create_a_group
11+
and_i_click_yes
1112
and_i_fill_in_the_group_name
1213
then_i_should_see_the_new_group
1314
and_i_use_the_back_link
@@ -25,6 +26,11 @@ def and_i_click_create_a_group
2526
expect_page_to_have_no_axe_errors(page)
2627
end
2728

29+
def and_i_click_yes
30+
choose "Yes"
31+
click_button "Continue"
32+
end
33+
2834
def and_i_fill_in_the_group_name
2935
fill_in "Enter a name for your new group", with: "Group 1"
3036
click_button "Save"

spec/views/groups/index.html.erb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
end
3737

3838
it "shows a create group button" do
39-
expect(rendered).to have_link("Create a group", href: new_group_path)
39+
expect(rendered).to have_link("Create a group", href: confirm_new_group_path)
4040
end
4141

4242
it "does not show an organisation selector" do

0 commit comments

Comments
 (0)