From 2fca16f02f133f70cee59b0663569674b2a1d476 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Sun, 3 May 2020 20:12:10 -0300 Subject: [PATCH] change shop name to be link to shop on transactions page --- app/views/spree/users/_skinny.html.haml | 3 ++- spec/features/consumer/account_spec.rb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/spree/users/_skinny.html.haml b/app/views/spree/users/_skinny.html.haml index 43bb039c46..2c8e7afe1d 100644 --- a/app/views/spree/users/_skinny.html.haml +++ b/app/views/spree/users/_skinny.html.haml @@ -2,7 +2,8 @@ .columns.small-2 %img.margin-top.account-logo{"logo-fallback" => true, "ng-src" => "{{shop.logo}}"} .columns.small-5 - %h3.margin-top{"ng-bind" => "::shop.name"} + %h3.margin-top + %a{"ng-href" => "{{::shop.hash}}#{main_app.shop_path}", "ng-bind" => "::shop.name"} .columns.small-4.text-right %h3.margin-top.distributor-balance{"ng-bind" => "::shop.balance | formatBalance", "ng-class" => "{'credit' : shop.balance < 0, 'debit' : shop.balance > 0, 'paid' : shop.balance == 0}" } .columns.small-1.text-right diff --git a/spec/features/consumer/account_spec.rb b/spec/features/consumer/account_spec.rb index f6a205bd29..b0139c7f6f 100644 --- a/spec/features/consumer/account_spec.rb +++ b/spec/features/consumer/account_spec.rb @@ -56,7 +56,11 @@ feature ' # It shows all hubs that have been ordered from with balance or credit expect(page).to have_content distributor1.name + expect(page).to have_link(distributor1.name, + href: "#{distributor1.permalink}/shop", count: 1) expect(page).to have_content distributor2.name + expect(page).to have_link(distributor2.name, + href: "#{distributor2.permalink}/shop", count: 1) expect(page).not_to have_content distributor_without_orders.name expect(page).to have_content distributor1.name + " " + "Balance due"