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

Use button component from gem #883

Merged
merged 1 commit into from
Apr 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use button component from gem
andysellick committed Apr 24, 2018
commit 81acbd8ab765d952bd8c797cd89a70bc138deba2
Original file line number Diff line number Diff line change
@@ -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
@@ -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",
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
@@ -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

@@ -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

9 changes: 2 additions & 7 deletions test/integration/specialist_document_test.rb
Original file line number Diff line number Diff line change
@@ -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