Skip to content

Commit

Permalink
Make shop url clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
webit-winkler committed Aug 9, 2022
1 parent e3a1502 commit 0fa5c77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/enterprises/form/_primary_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
%div{'ofn-with-tip' => t('.link_to_front_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
= surround main_app.root_url, "/shop" do
{{Enterprise.permalink}}
- link_to_front_shop = "#{main_app.root_url}#{@enterprise.permalink}'/shop'"
= link_to link_to_front_shop, link_to_front_shop , target: "_blank"
.row
.three.columns.alpha
= f.label :id, t('.ofn_uid')
Expand Down
7 changes: 7 additions & 0 deletions spec/system/admin/enterprises_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@

select2_select eg1.name, from: 'enterprise_group_ids'

within(".permalink") do
link_path = "#{main_app.root_url}eaterprises-permalink/shop"
link = find_link(link)
expect(link[:href]).to eq link_path
expect(link[:target]).to eq '_blank'
end

accept_alert do
click_link "Payment Methods"
end
Expand Down

0 comments on commit 0fa5c77

Please sign in to comment.