diff --git a/app/views/audits/index.html.erb b/app/views/audits/index.html.erb index 7f22c2a9..63ad50ac 100644 --- a/app/views/audits/index.html.erb +++ b/app/views/audits/index.html.erb @@ -57,19 +57,15 @@ <%= audit.created_at %> - - <% if audit.object.present? %> -
- <%= button_tag "Show/Hide", data: {controller: "toggle", action: "click->toggle#toggleTargets", class: "hidden" } do %> - -
Details
- <% end %> -
- <% end %> + + <% if audit.object.present? %> +
+ + +

+ +
+ <% end %> <% end %> diff --git a/test/system/audits_test.rb b/test/system/audits_test.rb index 6f84ddd2..a30c8358 100644 --- a/test/system/audits_test.rb +++ b/test/system/audits_test.rb @@ -5,16 +5,16 @@ class AuditsTest < ApplicationSystemTestCase setup do login_as :john + apps(:one) + teams(:one) - (1..3).each do |t| - new_app = apps(:one).dup - new_app.name = "App #{t}" - new_app.save + app = App.first + app.name = 'App name update' + app.save - new_team = teams(:one).dup - new_team.name = "Team #{t}" - new_team.save - end + team = Team.first + team.name = 'Team name update' + team.save end test 'visiting the index' do @@ -25,7 +25,7 @@ class AuditsTest < ApplicationSystemTestCase assert_selector 'td', text: 'Team' assert_selector 'div', text: 'DETAILS' - # click_on 'DETAILS', match: :first - # assert_selector 'span', text: 'Hide Details' + click_on 'Show', match: :first + assert_selector 'button', text: 'Hide' end end