diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index e59aec7d..5bb12750 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -206,7 +206,7 @@ h1 { } hr { - border: 1px solid var(--medgrey); + border: 1px solid var(--purple); width: 90%; } @@ -1183,8 +1183,8 @@ span.or { margin: -2px -2px 0 0; @include radius(10px); padding: 5px 25px; - background: var(--grey); - color: var(--vlightpurple); + background: #47475f; + color: #fafaff; font-family: $Nunito_600SemiBold; float: right; box-shadow: 2px 5px 10px var(--shadow); @@ -1556,7 +1556,7 @@ span.machine_year_man { } .external_machine_link { - margin: 10px; + margin: 10px 10px 0 10px; display: flex; align-items: center; } @@ -1599,7 +1599,7 @@ span.machine_year_man { -webkit-box-shadow: 2px 5px 10px var(--shadow); padding: 5px 10px; @include radius(10px); - margin: 10px auto 0; + margin: 20px auto 0; border: none; height: 26px; font-family: $Nunito_600SemiBold; @@ -1759,7 +1759,7 @@ img.machine_comment_icon { padding-right: 5px; } -img.machine_comment_icon:hover { +.machine_condition_lmx:hover { cursor: pointer; } @@ -1787,7 +1787,7 @@ span.machine_condition_text { .machine_condition_new_line span.machine_condition_date { margin: 0 0 0 8px; - color: var(--medgrey); + color: var(--darkgrey); font-family: $italic; } @@ -1800,12 +1800,12 @@ div.machine_condition_meta { line-height: 18px; border-bottom: 1px solid var(--purple); margin-bottom: 10px; - padding-bottom: 5px; + padding: 0 0 5px 10px; } .machine_condition_new_line .machine_condition { font-family: $Nunito_400Regular; - color: var(--darkgrey); + color: var(--dark); } .machine_condition_edit_lmx .edit_mode, @@ -1822,6 +1822,14 @@ div.machine_condition_meta { margin-bottom: 5px; } +.machine_comments_container, +.machine_scores_container { + padding: 5px 10px 10px 10px; + margin: 20px; + border-radius: 15px; + background: var(--bg_vlightpurple); +} + #add_machine_by_id { margin-bottom: 5px; margin-left: 13px; @@ -2175,15 +2183,8 @@ input.lookup_search_input:focus { float: right; } -.show_conditions_lmx { - padding: 2px; -} - -.add_scores_form, -.show_scores_lmx, -.show_conditions_lmx { - padding: 5px 0 5px 5px; - background-color: var(--lightpurple); +.add_scores_form { + padding: 0 0 5px 10px; width: 100%; } @@ -2980,23 +2981,39 @@ li span.state_name { border-radius: 10px !important; } -/** High Rollers **/ +/** High Scores **/ + +.high_score { + margin-bottom: 10px; +} .high_score_new_line { - font-family: $Nunito_400Regular; - color: var(--darkgrey); + font-family: $Nunito_600SemiBold; + color: var(--black); display: block; - line-height: 15px; + line-height: 16px; padding: 4px 0; - font-size: 15px; + margin-left: 5px; + font-size: 16px; font-weight: normal; } +.high_score_meta { + margin: 2px 0 15px 5px; + display: flex; + align-items: center; + font-size: 14px; +} + +.high_score_user a { + font-family: $Nunito_700Bold; + color: var(--black); + margin-right: 10px; +} + .high_score_date { - margin: 2px 0 10px; - display: inline-block; - color: var(--medgrey); - font-size: 12px; + font-family: $italic; + color: var(--darkgrey); } .column .sub_nav_item { diff --git a/app/assets/stylesheets/mobile-application.css.erb b/app/assets/stylesheets/mobile-application.css.erb index 44135c20..33a288e3 100644 --- a/app/assets/stylesheets/mobile-application.css.erb +++ b/app/assets/stylesheets/mobile-application.css.erb @@ -839,14 +839,9 @@ span.machine_condition_text { font-size: 14px; } -.score_container_lmx span.high_score_date { - font-size: 15px; - font-weight: normal; - color: #666; -} - -.score_container_lmx span.high_score_new_line { - font-size: 15px; +.machine_comments_container, +.machine_scores_container { + margin: 20px 15px; } .metadata_edit_location textarea.edit_mode, diff --git a/app/controllers/location_machine_xrefs_controller.rb b/app/controllers/location_machine_xrefs_controller.rb index ac166274..aee4019b 100644 --- a/app/controllers/location_machine_xrefs_controller.rb +++ b/app/controllers/location_machine_xrefs_controller.rb @@ -68,7 +68,9 @@ def update_machine_condition end def render_machine_tools - render partial: 'location_machine_xrefs/render_machine_tools', locals: { lmx: LocationMachineXref.find(params[:id]) } + logged_in = current_user ? 'logged_in' : 'logged_out' + + render partial: 'location_machine_xrefs/render_machine_tools', locals: { lmx: LocationMachineXref.find(params[:id]), logged_in: logged_in } end def render_machine_conditions diff --git a/app/views/location_machine_xrefs/_machine_tools.html.haml b/app/views/location_machine_xrefs/_machine_tools.html.haml index b6f9193c..ccee1924 100644 --- a/app/views/location_machine_xrefs/_machine_tools.html.haml +++ b/app/views/location_machine_xrefs/_machine_tools.html.haml @@ -1,6 +1,7 @@ - icon_path = image_tag('icons/details.svg', :alt => 'Machine Details', :class => 'banner_icon') = banner('machine_tools_lmx', 'Machine details', icon_path, lmx) %div[lmx, :machine_tools]{:style => 'display:none'} +%hr/ :javascript $(function() { diff --git a/app/views/location_machine_xrefs/_render_machine_tools.html.haml b/app/views/location_machine_xrefs/_render_machine_tools.html.haml index 4c2559f4..80e04ca5 100644 --- a/app/views/location_machine_xrefs/_render_machine_tools.html.haml +++ b/app/views/location_machine_xrefs/_render_machine_tools.html.haml @@ -1,9 +1,12 @@ -= render :partial => 'location_machine_xrefs/backglass', :locals => {:lmx => lmx} -= render :partial => 'location_machine_xrefs/ic_button', :locals => {:lmx => lmx} -= render :partial => 'machine_conditions/show_machine_conditions', :locals => {:lmx => lmx}, cached: true -= render :partial => 'location_machine_xrefs/update_machine_condition', :locals => {:lmx => lmx} -= render :partial => 'machine_score_xrefs/add_high_score', :locals => {:lmx => lmx} -= render :partial => 'machine_score_xrefs/show_high_scores', :locals => {:lmx => lmx} -%div.external_link_container - = render :partial => 'location_machine_xrefs/pintips', :locals => {:lmx => lmx} - = render :partial => 'location_machine_xrefs/kineticist', :locals => {:lmx => lmx} \ No newline at end of file +- cache [logged_in, lmx] do + = render :partial => 'location_machine_xrefs/backglass', :locals => {:lmx => lmx} + %div.external_link_container + = render :partial => 'location_machine_xrefs/pintips', :locals => {:lmx => lmx} + = render :partial => 'location_machine_xrefs/kineticist', :locals => {:lmx => lmx} + = render :partial => 'location_machine_xrefs/ic_button', :locals => {:lmx => lmx} + %div.machine_comments_container + = render :partial => 'machine_conditions/show_machine_conditions', :locals => {:lmx => lmx}, cached: true + = render :partial => 'location_machine_xrefs/update_machine_condition', :locals => {:lmx => lmx} + %div.machine_scores_container + = render :partial => 'machine_score_xrefs/show_high_scores', :locals => {:lmx => lmx} + = render :partial => 'machine_score_xrefs/add_high_score', :locals => {:lmx => lmx} diff --git a/app/views/locations/_render_machine_conditions.html.haml b/app/views/locations/_render_machine_conditions.html.haml index a1f9cb14..90b60af0 100644 --- a/app/views/locations/_render_machine_conditions.html.haml +++ b/app/views/locations/_render_machine_conditions.html.haml @@ -7,7 +7,7 @@ } }); -%div.center.m_15.red.font16 Machine comments may not reflect current conditions! +%div.center.red.font16.pb_10.italic Machine comments may not reflect current conditions! - conditions.each do |mcx| %div{:id => "container_past_machine_condition_#{mcx.id}"} diff --git a/app/views/locations/_render_machines.html.haml b/app/views/locations/_render_machines.html.haml index 0ac23cf3..887cec98 100644 --- a/app/views/locations/_render_machines.html.haml +++ b/app/views/locations/_render_machines.html.haml @@ -1,6 +1,5 @@ - location_machine_xrefs.each do |lmx| - - cache [logged_in, lmx] do - %div[lmx, :machine] - = render :partial => 'location_machine_xrefs/list_machine', :locals => {:lmx => lmx} - .clear - = render :partial => 'location_machine_xrefs/machine_tools', :locals => {:lmx => lmx} \ No newline at end of file + %div[lmx, :machine] + = render :partial => 'location_machine_xrefs/list_machine', :locals => {:lmx => lmx} + .clear + = render :partial => 'location_machine_xrefs/machine_tools', :locals => {:lmx => lmx} \ No newline at end of file diff --git a/app/views/locations/_render_scores.html.haml b/app/views/locations/_render_scores.html.haml index 55eea071..44ed5f3c 100644 --- a/app/views/locations/_render_scores.html.haml +++ b/app/views/locations/_render_scores.html.haml @@ -1,6 +1,7 @@ - lmx.machine_score_xrefs.each do |msx| - %span.high_score_new_line="#{number_with_delimiter(msx.score, :delimiter => ",")}" - %span.high_score_date=msx.created_at ? msx.created_at.strftime("%b %d, %Y") : '' - - if msx.user - by - = link_to msx.user.username, "#{request.scheme}://#{request.host_with_port}/users/#{msx.user.username}/profile" + %div.high_score_new_line="#{number_with_delimiter(msx.score, :delimiter => ",")}" + %div.high_score_meta + - if msx.user + %span.high_score_user + = link_to msx.user.username, "#{request.scheme}://#{request.host_with_port}/users/#{msx.user.username}/profile" + %span.high_score_date=msx.created_at ? msx.created_at.strftime("%b %d, %Y") : '' diff --git a/app/views/machine_conditions/_show_machine_conditions.html.haml b/app/views/machine_conditions/_show_machine_conditions.html.haml index 876cf073..ed0472ba 100644 --- a/app/views/machine_conditions/_show_machine_conditions.html.haml +++ b/app/views/machine_conditions/_show_machine_conditions.html.haml @@ -1,5 +1,8 @@ -%div[lmx, :machineconditions_container]{:style => "display:#{lmx.sorted_machine_conditions.empty? ? 'none' : 'block'}"} - - icon_path = image_tag('icons/comment-quote.svg', :alt => 'Show Comments', :class => 'small_banner_icon') - = banner('show_conditions_lmx','Show machine comments',icon_path,lmx) - %div[lmx, :show_conditions]{:style => 'display:none'} - = render :partial => 'locations/render_machine_conditions', :locals => {:conditions => lmx.sorted_machine_conditions, :lmx => lmx} +%div.bold.font20.center.p_10.brightpurple + Machine Comments +%div[lmx, :machineconditions_container] + %div[lmx, :show_conditions] + - if lmx.sorted_machine_conditions.empty? + %div.grey.center No machine comments yet + - else + = render :partial => 'locations/render_machine_conditions', :locals => {:conditions => lmx.sorted_machine_conditions, :lmx => lmx} diff --git a/app/views/machine_score_xrefs/_add_high_score.html.haml b/app/views/machine_score_xrefs/_add_high_score.html.haml index 7877f9da..1deb3f7d 100644 --- a/app/views/machine_score_xrefs/_add_high_score.html.haml +++ b/app/views/machine_score_xrefs/_add_high_score.html.haml @@ -7,7 +7,7 @@ %span Add high score - else = banner('add_scores_lmx', 'Add high score', icon_path, lmx) - %div[lmx, :add_scores]{:style => 'display:none;', :class => 'add_scores_form'} + %div[lmx, :add_scores]{:style => 'display:none;', :class => 'add_scores_form mt_20'} = form_tag machine_score_xrefs_path, :id => "add_high_score_#{lmx.id}", :method => 'post' do = hidden_field_tag :location_machine_xref_id, lmx.id = label_tag :score, 'Score: ' @@ -20,13 +20,7 @@ event.target.value = (parseInt(event.target.value.replace(/[^\d]+/gi, '')) || 0).toLocaleString('en-US') ); $('#add_high_score_#{lmx.id}').submit(function () { - $('#score_container_lmx_#{lmx.id}').css('visibility', 'visible'); - $('#score_container_lmx_#{lmx.id}').css('display', 'block'); $('#show_scores_lmx_#{lmx.id}').html(loadingHTML()); - $('#show_scores_lmx_banner_#{lmx.id}') - .animate( { backgroundColor: "#f5f5ff" }, 1000 ) - .animate( { backgroundColor: "transparent" }, 1000 ); - var form = $(this); $.post(form.attr('action'), form.serialize(), function (data) { diff --git a/app/views/machine_score_xrefs/_show_high_scores.html.haml b/app/views/machine_score_xrefs/_show_high_scores.html.haml index 1a9756b9..4826b37f 100644 --- a/app/views/machine_score_xrefs/_show_high_scores.html.haml +++ b/app/views/machine_score_xrefs/_show_high_scores.html.haml @@ -1,5 +1,8 @@ -%div[lmx, :score_container]{:style => "display:#{lmx.machine_score_xrefs.empty? ? 'none' : 'block'}"} - - icon_path = image_tag('icons/star.svg', :alt => 'Show Scores', :class => 'small_banner_icon') - = banner('show_scores_lmx', 'Show high scores', icon_path, lmx) - %div[lmx, :show_scores]{:style => 'display:none'} - = render :partial => 'locations/render_scores', :locals => {:lmx => lmx} +%div.bold.font20.center.p_10.brightpurple + High Scores +%div[lmx, :score_container] + %div[lmx, :show_scores] + - if lmx.machine_score_xrefs.empty? + %div.grey.center No scores yet + - else + = render :partial => 'locations/render_scores', :locals => {:lmx => lmx} diff --git a/spec/features/location_machine_conditions_cache_spec.rb b/spec/features/location_machine_conditions_cache_spec.rb index 1c8bd813..bce605af 100644 --- a/spec/features/location_machine_conditions_cache_spec.rb +++ b/spec/features/location_machine_conditions_cache_spec.rb @@ -30,7 +30,6 @@ page.find("div#machine_condition_lmx_#{@lmx.id}.machine_condition_lmx .add_condition").click fill_in("new_machine_condition_#{@lmx.id}", with: 'This is a new condition1') page.find("input#save_machine_condition_#{@lmx.id}.save_button").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_content('This is a new condition1') end @@ -40,7 +39,6 @@ sleep 0.5 page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_content('This is a new condition1') expect(page).to have_content('Add machine comment') expect(page).to have_content('Add high score') @@ -53,7 +51,6 @@ sleep 0.5 page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_content('Add machine comment') expect(page).to have_content('Add high score') @@ -69,7 +66,6 @@ sleep 0.5 page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_content('This is a new condition1') expect(page).to have_content('This is a new condition2') expect(page).to have_content('Add machine comment') @@ -82,7 +78,6 @@ sleep 0.5 page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_content('This is a new condition1') expect(page).to have_content('This is a new condition2') expect(page).to have_content('Add machine comment') diff --git a/spec/features/location_machine_xrefs_controller_spec.rb b/spec/features/location_machine_xrefs_controller_spec.rb index 55939cec..4572eb73 100644 --- a/spec/features/location_machine_xrefs_controller_spec.rb +++ b/spec/features/location_machine_xrefs_controller_spec.rb @@ -177,7 +177,6 @@ visit '/map/?by_location_id=' + @lmx.location.id.to_s page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to have_selector("input[type=submit][value='delete']") @@ -196,7 +195,6 @@ visit '/map/?by_location_id=' + @lmx.location.id.to_s page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to_not have_selector("input[type=submit][value='delete']") end @@ -206,7 +204,6 @@ visit '/map/?by_location_id=' + @lmx.location.id.to_s page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click find('a#edit_condition_' + @lmx.machine_conditions.first.id.to_s + '.button').click fill_in 'comment', with: 'bad' @@ -226,7 +223,6 @@ visit '/map/?by_location_id=' + @lmx.location.id.to_s page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(page).to_not have_selector('a#edit_condition_' + @lmx.machine_conditions.first.id.to_s + '.button') end @@ -280,8 +276,6 @@ sleep 1 - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click - expect(find("#show_conditions_lmx_#{@lmx.id}")).to have_content("This is a new condition\nssw\n#{@lmx.created_at.strftime('%b %d, %Y')}") expect(@lmx.reload.location.date_last_updated).to eq(Date.today) expect(find("#last_updated_location_#{@location.id}")).to have_content("#{@location.date_last_updated.strftime('%b %d, %Y')} by ssw") @@ -294,7 +288,6 @@ visit "/#{@region.name}/?by_location_id=#{@location.id}" page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(find("#show_conditions_lmx_#{@lmx.id}")).to have_content("Test Comment\ncibw\n#{@lmx.created_at.strftime('%b %d, %Y')}") expect(URI.parse(page.find_link('cibw')['href']).to_s).to match(%r{/users/cibw/profile}) @@ -306,44 +299,41 @@ visit "/#{@region.name}/?by_location_id=#{@location.id}" page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click expect(find("#show_conditions_lmx_#{@lmx.id}")).to have_content("Test Comment\nDELETED USER\n#{@lmx.created_at.strftime('%b %d, %Y')}") end - it 'only displays the 6 most recent descriptions' do + it 'only displays the 12 most recent descriptions' do login 12.times do |i| - FactoryBot.create(:machine_condition, location_machine_xref: @lmx.reload, comment: "Condition #{i + 1}", created_at: "199#{i + 1}-01-01") + FactoryBot.create(:machine_condition, location_machine_xref: @lmx.reload, comment: "Condition #{i + 1} words.", created_at: "199#{i + 1}-01-01") end visit "/#{@region.name}/?by_location_id=#{@location.id}" page.find("div#machine_tools_lmx_banner_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click - - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 12') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 11') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 10') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 9') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 8') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 7') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 6') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 5') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 4') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 3') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 2') - expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 1') + + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 12 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 11 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 10 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 9 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 8 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 7 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 6 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 5 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 4 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 3 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 2 words.') + expect(find("div#show_conditions_lmx_#{@lmx.id}.show_conditions_lmx")).to have_content('Condition 1 words.') page.find("div#machine_condition_lmx_#{@lmx.id}.machine_condition_lmx .add_condition").click fill_in("new_machine_condition_#{@lmx.id}", with: 'This is a new condition') page.find("input#save_machine_condition_#{@lmx.id}").click sleep 1 - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click - expect(page).to_not have_content('Condition 1') + expect(page).to_not have_content('Condition 1 words.') end it 'should add past conditions when you add a new condition and a condition exists' do @@ -361,8 +351,6 @@ fill_in("new_machine_condition_#{@lmx.id}", with: 'This is a new condition') page.find("input#save_machine_condition_#{@lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{@lmx.id}").click - expect(find("#show_conditions_lmx_#{@lmx.id}")).to have_content('This is a new condition') expect(find("#show_conditions_lmx_#{@lmx.id}")).to have_content('ssw') @@ -1074,7 +1062,6 @@ visit "/#{@region.name}/?by_location_id=#{screen_location.id}" page.find("div#machine_tools_lmx_banner_#{lmx.id}").click - page.find("div#show_conditions_lmx_banner_#{lmx.id}").click within('div.search_result') do expect(page).to have_content('The Screen') diff --git a/spec/features/machine_score_xrefs_controller_spec.rb b/spec/features/machine_score_xrefs_controller_spec.rb index fff7f951..4dabc318 100644 --- a/spec/features/machine_score_xrefs_controller_spec.rb +++ b/spec/features/machine_score_xrefs_controller_spec.rb @@ -115,7 +115,7 @@ visit "/#{@region.name}/?by_location_id=#{@location.id}" page.find("div#machine_tools_lmx_banner_#{lmx.id}").click - expect(page).to_not have_css("div#show_scores_lmx_banner_#{lmx.id}") + expect(page).to_not have_css('div.high_score_new_line') page.find("div#add_scores_lmx_banner_#{lmx.id}").click fill_in('score', with: 1234) @@ -123,9 +123,9 @@ sleep(1) - expect(page).to have_css("div#show_scores_lmx_banner_#{lmx.id}") + expect(page).to have_css("div#show_scores_lmx_#{lmx.id}") - page.find("div#show_scores_lmx_banner_#{lmx.id}").click + page.find("div#show_scores_lmx_#{lmx.id}").click sleep(1)