Skip to content

Commit

Permalink
Use button component from gem
Browse files Browse the repository at this point in the history
  • Loading branch information
andysellick committed Apr 24, 2018
1 parent c896758 commit 81acbd8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
</div>
<% end %>

<%= render 'govuk_component/button', text: t('service_sign_in.continue'), margin_bottom: true %>
<%= render 'govuk_publishing_components/components/button', text: t('service_sign_in.continue'), margin_bottom: true %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/content_items/specialist_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<%= render 'govuk_component/govspeak', @content_item.govspeak_body %>
<% if @content_item.continuation_link %>
<%= render(
'govuk_component/button',
'govuk_publishing_components/components/button',
start: true,
href: @content_item.continuation_link,
text: "Find out more",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/service_sign_in/choose_sign_in_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest
assert page.has_css?(".gem-c-radio__label__text", text: "Create an account")
end
end
assert page.has_css?(shared_component_selector('button'), text: "Continue")
assert page.has_css?(".gem-c-button", text: "Continue")
end
end

Expand Down Expand Up @@ -120,7 +120,7 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest
end
end

assert page.has_css?(shared_component_selector('button'), text: "Bwrw ymlaen")
assert page.has_css?(".gem-c-button", text: "Bwrw ymlaen")
end
end

Expand Down
9 changes: 2 additions & 7 deletions test/integration/specialist_document_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,8 @@ def assert_nested_content_item(heading)
test 'renders start button' do
setup_and_visit_content_item('business-finance-support-scheme')

assert_component_locals(
'button',
start: true,
href: 'http://www.bigissueinvest.com',
info_text: 'on the Big Issue Invest website',
text: 'Find out more'
)
assert page.has_css?(".gem-c-button.gem-c-button--start[href='http://www.bigissueinvest.com']", text: "Find out more")
assert page.has_css?(".gem-c-button__info-text", text: "on the Big Issue Invest website")
end

test 'does not render a contents list if there are fewer than three items in the contents list' do
Expand Down

0 comments on commit 81acbd8

Please sign in to comment.