From 9a1739e86e9614a0c06bd33832637ec867cd7a9c Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 18 Jan 2020 10:57:42 -0800 Subject: [PATCH 1/3] UI -- Repalce "Commerials" with "Materials". This only replaces the UI facing wording. Specs will fail as they have not been updated yet. --- app/controllers/admin/commercials_controller.rb | 6 +++--- app/views/admin/commercials/index.html.haml | 2 +- app/views/admin/events/index.html.haml | 6 +++--- app/views/admin/events/show.html.haml | 2 +- .../admin/reports/_events_without_commercials.html.haml | 2 +- app/views/admin/venues/_form.html.haml | 2 +- app/views/layouts/_admin_sidebar.html.haml | 2 +- app/views/proposals/_form.html.haml | 6 +++--- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb index e361086d..17d1dcf1 100644 --- a/app/controllers/admin/commercials_controller.rb +++ b/app/controllers/admin/commercials_controller.rb @@ -39,7 +39,7 @@ module Admin def destroy @commercial.destroy - redirect_to admin_conference_commercials_path, notice: 'Commercial was successfully destroyed.' + redirect_to admin_conference_commercials_path, notice: 'Materaisl were successfully removed.' end def render_commercial @@ -60,9 +60,9 @@ module Admin errors = Commercial.read_file(params[:file]) if params[:file] if !params[:file] - flash[:error] = 'Empty file detected while adding commercials to Event' + flash[:error] = 'Empty file detected while adding materials to Event' elsif errors.all? { |_k, v| v.blank? } - flash[:notice] = 'Successfully added commercials.' + flash[:notice] = 'Successfully added materials.' else errors_text = '' errors_text << 'Unable to find event with ID: ' + errors[:no_event].join(', ') + '. ' if errors[:no_event].any? diff --git a/app/views/admin/commercials/index.html.haml b/app/views/admin/commercials/index.html.haml index 095ddad2..8c367ab9 100644 --- a/app/views/admin/commercials/index.html.haml +++ b/app/views/admin/commercials/index.html.haml @@ -1,7 +1,7 @@ .row .col-md-12 .page-header - %h1 Commercials + %h1 Session Materials %p.text-muted Conference commercials will be displayed on the events in the = link_to 'schedule,', conference_schedule_path(@conference.short_title) diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index 4944d946..c766a7a6 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -6,9 +6,9 @@ = "(#{@events.length})" if @events.any? .btn-group.pull-right - %button.btn.btn-primary{ title: 'Mass import of commercials for events', + %button.btn.btn-primary{ title: 'Mass import of materials for events', data: { toggle: 'modal', target: '#mass-commercials-modal' } } - Add Commercials + Add Materials - if can? :create, Event = link_to 'Add Event', @@ -28,7 +28,7 @@ .modal-dialog .modal-content .modal-header - %h1 Add commercials to events + %h1 Add materials to events .text-muted Upload your file with data in the following format: %b Event_ID:Commercial_Link diff --git a/app/views/admin/events/show.html.haml b/app/views/admin/events/show.html.haml index 4b764838..ff341db4 100644 --- a/app/views/admin/events/show.html.haml +++ b/app/views/admin/events/show.html.haml @@ -11,7 +11,7 @@ - progress_status = @event.progress_status = progress_status.reject{ |_key, value| value || value.nil? }.length %li - = link_to 'Commercials', '#proposal-commercials', 'data-toggle' => 'tab' + = link_to 'Materials', '#proposal-commercials', 'data-toggle' => 'tab' .tab-content #proposal-content.tab-pane.active diff --git a/app/views/admin/reports/_events_without_commercials.html.haml b/app/views/admin/reports/_events_without_commercials.html.haml index 8f26cb99..025c0117 100644 --- a/app/views/admin/reports/_events_without_commercials.html.haml +++ b/app/views/admin/reports/_events_without_commercials.html.haml @@ -2,7 +2,7 @@ .col-md-12 .page-header %h1 - Events without commercials + Events Without Materials = "(#{@events_missing_commercial.length})" %p.text-muted All submissions that have no commercial diff --git a/app/views/admin/venues/_form.html.haml b/app/views/admin/venues/_form.html.haml index 6674305b..6f64de48 100644 --- a/app/views/admin/venues/_form.html.haml +++ b/app/views/admin/venues/_form.html.haml @@ -7,7 +7,7 @@ %li.active = link_to 'Details', '#details-content', 'data-toggle' => 'tab' %li - = link_to 'Commercials', '#commercials-content', 'data-toggle' => 'tab' + = link_to 'Materials', '#commercials-content', 'data-toggle' => 'tab' .tab-content #details-content.tab-pane.active diff --git a/app/views/layouts/_admin_sidebar.html.haml b/app/views/layouts/_admin_sidebar.html.haml index 78523bc7..78b6da07 100644 --- a/app/views/layouts/_admin_sidebar.html.haml +++ b/app/views/layouts/_admin_sidebar.html.haml @@ -43,7 +43,7 @@ = link_to 'Contact', edit_admin_conference_contact_path(@conference.short_title) - if can? :index, @conference.commercials.build %li{class: "#{active_nav_li(admin_conference_commercials_path(@conference.short_title))}"} - = link_to 'Commercials', admin_conference_commercials_path(@conference.short_title) + = link_to 'Materials', admin_conference_commercials_path(@conference.short_title) - if can? :update, @conference %li{class: active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))} = link_to 'Splashpage', admin_conference_splashpage_path(@conference.short_title) diff --git a/app/views/proposals/_form.html.haml b/app/views/proposals/_form.html.haml index fe966ed1..7f6716d5 100644 --- a/app/views/proposals/_form.html.haml +++ b/app/views/proposals/_form.html.haml @@ -3,15 +3,15 @@ %li.active = link_to 'Proposal', '#proposal-content', 'data-toggle' => 'tab' %li - = link_to 'Commercials', '#commercials-content', 'data-toggle' => 'tab' + = link_to 'Materials', '#commercials-content', 'data-toggle' => 'tab' .tab-content #proposal-content.tab-pane.active = render 'proposals/proposal_form' #commercials-content.tab-pane %p.text-muted - You can add commercials for your proposal. These commercials will be displayed on the + You can add materals for your proposal. These materials will be displayed on the = link_to 'public proposal page.', conference_program_proposal_path(@conference.short_title, @event) - If you don't add a commercial, the conference commercial will be displayed! + If you don't add any materials, the conference materials will be displayed. - if can? :create, @event.commercials.new .row .col-md-6 From 3eeaebbdc84a94ed51507de7e673abbbd8606076 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 27 Jan 2020 13:37:23 -0800 Subject: [PATCH 2/3] Rename more commericals to materials --- app/views/commercials/edit.html.haml | 2 +- app/views/commercials/new.html.haml | 2 +- spec/features/commercials_spec.rb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/commercials/edit.html.haml b/app/views/commercials/edit.html.haml index 174a1a60..359f27a8 100644 --- a/app/views/commercials/edit.html.haml +++ b/app/views/commercials/edit.html.haml @@ -2,7 +2,7 @@ .row .col-md-12 .page-header - %h1 Editing Commercial + %h1 Edit Materials .row .col-md-12 = semantic_form_for @commercial, url: conference_program_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event.id, id: @commercial.id) do |f| diff --git a/app/views/commercials/new.html.haml b/app/views/commercials/new.html.haml index da726e89..4152ff88 100644 --- a/app/views/commercials/new.html.haml +++ b/app/views/commercials/new.html.haml @@ -2,7 +2,7 @@ .row .col-md-12 .page-header - %h1 New Commercial + %h1 New Materials .row .col-md-12 = semantic_form_for @commercial, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event.id) do |f| diff --git a/spec/features/commercials_spec.rb b/spec/features/commercials_spec.rb index a0710f86..3dfaea1f 100644 --- a/spec/features/commercials_spec.rb +++ b/spec/features/commercials_spec.rb @@ -17,7 +17,7 @@ feature Commercial do # Create valid commercial fill_in 'commercial_url', with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' - click_button 'Create Commercial' + click_button 'Save Materials' page.find('#flash') expect(flash).to eq('Commercial was successfully created.') page.find('#flash .button.close').click @@ -59,10 +59,10 @@ feature Commercial do click_link 'Commercials' fill_in 'commercial_url', with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' - # Workaround to enable the 'Create Commercial' button + # Workaround to enable the 'Save Materials' button page.execute_script("$('#commercial_submit_action').prop('disabled', false)") - click_button 'Create Commercial' + click_button 'Save Materials' page.find('#flash') expect(flash).to eq('Commercial was successfully created.') end @@ -72,7 +72,7 @@ feature Commercial do click_link 'Commercials' fill_in 'commercial_url', with: 'invalid_commercial_url' expect(page).to have_content('No embeddable content') - expect(page).to have_css("button[type='submit']:disabled", text: 'Create Commercial') + expect(page).to have_css("button[type='submit']:disabled", text: 'Save Materials') end scenario 'updates a commercial of an event', feature: true, js: true do From 8a6bb879838d7e53859aeccc6db6638ab4e689cf Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Mon, 27 Jan 2020 13:40:36 -0800 Subject: [PATCH 3/3] Replace more Commercials with Materials --- .../admin/commercials_controller.rb | 10 ++++---- .../admin/venue_commercials_controller.rb | 10 ++++---- app/controllers/commercials_controller.rb | 10 ++++---- app/models/commercial.rb | 2 +- app/views/admin/commercials/index.html.haml | 4 ++-- app/views/admin/events/show.html.haml | 4 ++-- app/views/admin/reports/_all_events.html.haml | 2 +- .../_events_without_commercials.html.haml | 2 +- app/views/admin/reports/index.html.haml | 2 +- app/views/admin/venues/_form.html.haml | 2 +- app/views/admin/venues/show.html.haml | 2 +- app/views/proposals/_tooltip.html.haml | 2 +- spec/features/commercials_spec.rb | 24 +++++++++---------- spec/features/info_desk_ability_spec.rb | 2 +- .../organization_admin_ability_spec.rb | 2 +- spec/features/organizer_ability_spec.rb | 2 +- spec/features/track_organizer_ability_spec.rb | 2 +- spec/features/versions_spec.rb | 16 ++++++------- 18 files changed, 50 insertions(+), 50 deletions(-) diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb index 17d1dcf1..ee8cee00 100644 --- a/app/controllers/admin/commercials_controller.rb +++ b/app/controllers/admin/commercials_controller.rb @@ -17,10 +17,10 @@ module Admin if @commercial.save redirect_to admin_conference_commercials_path, - notice: 'Commercial was successfully created.' + notice: 'Materials were successfully created.' else redirect_to admin_conference_commercials_path, - error: 'An error prohibited this Commercial from being saved: '\ + error: 'An error prohibited materials from being saved: '\ "#{@commercial.errors.full_messages.join('. ')}." end @@ -29,17 +29,17 @@ module Admin def update if @commercial.update(commercial_params) redirect_to admin_conference_commercials_path, - notice: 'Commercial was successfully updated.' + notice: 'Materials were successfully updated.' else redirect_to admin_conference_commercials_path, - error: 'An error prohibited this Commercial from being saved: '\ + error: 'An error prohibited materials from being saved: '\ "#{@commercial.errors.full_messages.join('. ')}." end end def destroy @commercial.destroy - redirect_to admin_conference_commercials_path, notice: 'Materaisl were successfully removed.' + redirect_to admin_conference_commercials_path, notice: 'Materials were successfully removed.' end def render_commercial diff --git a/app/controllers/admin/venue_commercials_controller.rb b/app/controllers/admin/venue_commercials_controller.rb index ddd13aa9..10a46de6 100644 --- a/app/controllers/admin/venue_commercials_controller.rb +++ b/app/controllers/admin/venue_commercials_controller.rb @@ -12,10 +12,10 @@ module Admin if @commercial.save redirect_to admin_conference_venue_path, - notice: 'Commercial was successfully created.' + notice: 'Materials successfully created.' else redirect_to admin_conference_venue_path, - error: 'An error prohibited this Commercial from being saved: '\ + error: 'An error prohibited materials from being saved: '\ "#{@commercial.errors.full_messages.join('. ')}." end @@ -24,17 +24,17 @@ module Admin def update if @commercial.update(commercial_params) redirect_to admin_conference_venue_path, - notice: 'Commercial was successfully updated.' + notice: 'Materials successfully updated.' else redirect_to admin_conference_venue_path, - error: 'An error prohibited this Commercial from being saved: '\ + error: 'An error prohibited materials from being saved: '\ "#{@commercial.errors.full_messages.join('. ')}." end end def destroy @commercial.destroy - redirect_to admin_conference_venue_path, notice: 'Commercial was successfully destroyed.' + redirect_to admin_conference_venue_path, notice: 'Materials successfully destroyed.' end def render_commercial diff --git a/app/controllers/commercials_controller.rb b/app/controllers/commercials_controller.rb index aa48a406..9b5e2110 100644 --- a/app/controllers/commercials_controller.rb +++ b/app/controllers/commercials_controller.rb @@ -12,27 +12,27 @@ class CommercialsController < ApplicationController if @commercial.save redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), - notice: 'Commercial was successfully created.' + notice: 'Materials were successfully created.' else redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), - error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + error: "An error prohibited these materials from being saved: #{@commercial.errors.full_messages.join('. ')}." end end def update if @commercial.update(commercial_params) redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), - notice: 'Commercial was successfully updated.' + notice: 'Materials were successfully updated.' else redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content'), - error: "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + error: "An error prohibited materials from being saved: #{@commercial.errors.full_messages.join('. ')}." end end def destroy @commercial.destroy redirect_to edit_conference_program_proposal_path(conference_id: @conference.short_title, id: @event.id), - notice: 'Commercial was successfully destroyed.' + notice: 'Materials were successfully destroyed.' end def render_commercial diff --git a/app/models/commercial.rb b/app/models/commercial.rb index 7bb2a081..4d28330c 100644 --- a/app/models/commercial.rb +++ b/app/models/commercial.rb @@ -39,7 +39,7 @@ class Commercial < ApplicationRecord commercial = event.commercials.new(url: url) unless commercial.save - errors[:validation_errors] << "Could not create commercial for event with ID #{event.id} (" + commercial.errors.full_messages.to_sentence + ')' + errors[:validation_errors] << "Could not create materials for event with ID #{event.id} (" + commercial.errors.full_messages.to_sentence + ')' end end errors diff --git a/app/views/admin/commercials/index.html.haml b/app/views/admin/commercials/index.html.haml index 8c367ab9..2dbe10a2 100644 --- a/app/views/admin/commercials/index.html.haml +++ b/app/views/admin/commercials/index.html.haml @@ -3,9 +3,9 @@ .page-header %h1 Session Materials %p.text-muted - Conference commercials will be displayed on the events in the + Conference materials will be displayed on the events in the = link_to 'schedule,', conference_schedule_path(@conference.short_title) - if the event speaker didn't add an event commercial. + if the event speaker didn't add any event materials. - if can? :create, @conference.commercials.new .row .col-md-6 diff --git a/app/views/admin/events/show.html.haml b/app/views/admin/events/show.html.haml index ff341db4..525e4c93 100644 --- a/app/views/admin/events/show.html.haml +++ b/app/views/admin/events/show.html.haml @@ -42,7 +42,7 @@ - else = general_change_description(version) - = link_to 'commercial', + = link_to 'materials', edit_admin_conference_program_event_path(conference_id: @conference.short_title, id: @event.id, anchor: 'commercials-content') @@ -82,7 +82,7 @@ %td{ 'class' => class_for_todo(progress_status['subtitle']) } %span{ 'class' => [icon_for_todo(progress_status['subtitle']), 'fa-lg'] } %tr - %td= link_to 'Add a commercial', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event, anchor: 'commercials-content') + %td= link_to 'Add materials', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event, anchor: 'commercials-content') %td{ 'class' => class_for_todo(progress_status['commercials']) } %span{ 'class' => [icon_for_todo(progress_status['commercials']), 'fa-lg'] } - unless progress_status['track'].nil? diff --git a/app/views/admin/reports/_all_events.html.haml b/app/views/admin/reports/_all_events.html.haml index 712d4ad7..0eb6b829 100644 --- a/app/views/admin/reports/_all_events.html.haml +++ b/app/views/admin/reports/_all_events.html.haml @@ -14,7 +14,7 @@ %th Title %th Speakers Registered %th Speakers Biographies - %th Commercial + %th Materials %th Subtitle %th Difficulty Level - if @program.tracks.any? diff --git a/app/views/admin/reports/_events_without_commercials.html.haml b/app/views/admin/reports/_events_without_commercials.html.haml index 025c0117..77020191 100644 --- a/app/views/admin/reports/_events_without_commercials.html.haml +++ b/app/views/admin/reports/_events_without_commercials.html.haml @@ -5,7 +5,7 @@ Events Without Materials = "(#{@events_missing_commercial.length})" %p.text-muted - All submissions that have no commercial + All submissions that have no materials .col-md-12 %table.datatable %thead diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index 6bbb8886..db6480f3 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -4,7 +4,7 @@ = link_to 'All Events', '#all', 'data-toggle' => 'tab' %li %a{href: '#missing-commercial', 'data-toggle' => 'tab'} - Events without Commercials + Events without Materials %span.label.label-danger{style: 'border-radius: 1em;'} = @events_missing_commercial.length %li diff --git a/app/views/admin/venues/_form.html.haml b/app/views/admin/venues/_form.html.haml index 6f64de48..e19325da 100644 --- a/app/views/admin/venues/_form.html.haml +++ b/app/views/admin/venues/_form.html.haml @@ -56,4 +56,4 @@ %hr - else - First Create Venue, then update commercial + First Create Venue, then update materials diff --git a/app/views/admin/venues/show.html.haml b/app/views/admin/venues/show.html.haml index 36906e05..de29c4e3 100644 --- a/app/views/admin/venues/show.html.haml +++ b/app/views/admin/venues/show.html.haml @@ -12,7 +12,7 @@ -else - if @venue.commercial.nil? .row - %img{ "data-src" => "holder.js/500x300?text=No Commercial Set", class: 'img-responsive img-rounded' } + %img{ "data-src" => "holder.js/500x300?text=No Materials Set", class: 'img-responsive img-rounded' } - else - if @venue.commercial.persisted? .thumbnail diff --git a/app/views/proposals/_tooltip.html.haml b/app/views/proposals/_tooltip.html.haml index b10b5a7a..2220451d 100644 --- a/app/views/proposals/_tooltip.html.haml +++ b/app/views/proposals/_tooltip.html.haml @@ -20,7 +20,7 @@ = link_to 'Add a subtitle', edit_conference_program_proposal_path(event.program.conference.short_title, event) %li{'class'=>class_for_todo(progress_status['commercials'])} %span{'class'=>icon_for_todo(progress_status['commercials'])} - = link_to 'Add a commercial', edit_conference_program_proposal_path(event.program.conference.short_title, event, anchor: 'commercials-content') + = link_to 'Add materials', edit_conference_program_proposal_path(event.program.conference.short_title, event, anchor: 'commercials-content') - unless progress_status['track'].nil? %li{'class'=>class_for_todo(progress_status['track'])} %span{'class'=>icon_for_todo(progress_status['track'])} diff --git a/spec/features/commercials_spec.rb b/spec/features/commercials_spec.rb index 3dfaea1f..5ddb08b2 100644 --- a/spec/features/commercials_spec.rb +++ b/spec/features/commercials_spec.rb @@ -19,7 +19,7 @@ feature Commercial do fill_in 'commercial_url', with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' click_button 'Save Materials' page.find('#flash') - expect(flash).to eq('Commercial was successfully created.') + expect(flash).to eq('Materials were successfully created.') page.find('#flash .button.close').click expect(conference.commercials.count).to eq(1) @@ -28,7 +28,7 @@ feature Commercial do fill_in "commercial_url_#{commercial.id}", with: 'https://www.youtube.com/watch?v=VNkDJk5_9eU' click_button 'Update' page.find('#flash') - expect(flash).to eq('Commercial was successfully updated.') + expect(flash).to eq('Materials were successfully updated.') page.find('#flash .button.close').click expect(conference.commercials.count).to eq(1) commercial.reload @@ -39,7 +39,7 @@ feature Commercial do click_link 'Delete' end page.find('#flash') - expect(flash).to eq('Commercial was successfully destroyed.') + expect(flash).to eq('Materials were successfully destroyed.') expect(conference.commercials.count).to eq(0) end end @@ -56,7 +56,7 @@ feature Commercial do scenario 'adds a valid commercial of an event', feature: true, js: true do visit edit_conference_program_proposal_path(conference.short_title, event.id) - click_link 'Commercials' + click_link 'Materials' fill_in 'commercial_url', with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' # Workaround to enable the 'Save Materials' button @@ -64,12 +64,12 @@ feature Commercial do click_button 'Save Materials' page.find('#flash') - expect(flash).to eq('Commercial was successfully created.') + expect(flash).to eq('Materials were successfully created.') end scenario 'does not add an invalid commercial of an event', feature: true, js: true do visit edit_conference_program_proposal_path(conference.short_title, event.id) - click_link 'Commercials' + click_link 'Materials' fill_in 'commercial_url', with: 'invalid_commercial_url' expect(page).to have_content('No embeddable content') expect(page).to have_css("button[type='submit']:disabled", text: 'Save Materials') @@ -80,11 +80,11 @@ feature Commercial do commercialable_id: event.id, commercialable_type: 'Event') visit edit_conference_program_proposal_path(conference.short_title, event.id) - click_link 'Commercials' + click_link 'Materials' fill_in "commercial_url_#{commercial.id}", with: 'https://www.youtube.com/watch?v=M9bq_alk-sw' click_button 'Update' page.find('#flash') - expect(flash).to eq('Commercial was successfully updated.') + expect(flash).to eq('Materials were successfully updated.') TransactionalCapybara::AjaxHelpers.wait_for_ajax(page) expect(event.commercials.count).to eq(1) commercial.reload @@ -97,12 +97,12 @@ feature Commercial do commercialable_type: 'Event', url: 'https://www.youtube.com/watch?v=BTTygyxuGj8') visit edit_conference_program_proposal_path(conference.short_title, event.id) - click_link 'Commercials' + click_link 'Materials' fill_in "commercial_url_#{commercial.id}", with: 'invalid_commercial_url' click_button 'Update' find('#flash') expect(current_path).to eq edit_conference_program_proposal_path(conference.short_title, event.id) - expect(flash).to include('An error prohibited this Commercial from being saved:') + expect(flash).to include('An error prohibited materials from being saved:') commercial.reload expect(commercial.url).to eq('https://www.youtube.com/watch?v=BTTygyxuGj8') end @@ -112,12 +112,12 @@ feature Commercial do commercialable_id: event.id, commercialable_type: 'Event') visit edit_conference_program_proposal_path(conference.short_title, event.id) - click_link 'Commercials' + click_link 'Materials' page.accept_alert do click_link 'Delete' end page.find('#flash') - expect(flash).to eq('Commercial was successfully destroyed.') + expect(flash).to eq('Materials were successfully destroyed.') TransactionalCapybara::AjaxHelpers.wait_for_ajax(page) expect(event.commercials.count).to eq(0) end diff --git a/spec/features/info_desk_ability_spec.rb b/spec/features/info_desk_ability_spec.rb index 066c95b8..95367ebb 100644 --- a/spec/features/info_desk_ability_spec.rb +++ b/spec/features/info_desk_ability_spec.rb @@ -21,7 +21,7 @@ feature 'Has correct abilities' do expect(page).to_not have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit") expect(page).to have_text('Basics') expect(page).to_not have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit") - expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials") + expect(page).to have_link('Materials', href: "/admin/conferences/#{conference.short_title}/commercials") expect(page).to_not have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage") expect(page).to_not have_link('Lodgings', href: "/admin/conferences/#{conference.short_title}/lodgings") expect(page).to_not have_link('Registration Period', href: "/admin/conferences/#{conference.short_title}/registration_period") diff --git a/spec/features/organization_admin_ability_spec.rb b/spec/features/organization_admin_ability_spec.rb index 5765d97f..3f9e32f8 100644 --- a/spec/features/organization_admin_ability_spec.rb +++ b/spec/features/organization_admin_ability_spec.rb @@ -32,7 +32,7 @@ feature 'Has correct abilities' do expect(page).to have_selector('li.nav-header.nav-header-bigger a', text: 'Dashboard') expect(page).to have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit") expect(page).to have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit") - expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials") + expect(page).to have_link('Materials', href: "/admin/conferences/#{conference.short_title}/commercials") expect(page).to have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage") expect(page).to have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue") expect(page).to have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms") diff --git a/spec/features/organizer_ability_spec.rb b/spec/features/organizer_ability_spec.rb index 6339b6fa..27935824 100644 --- a/spec/features/organizer_ability_spec.rb +++ b/spec/features/organizer_ability_spec.rb @@ -35,7 +35,7 @@ feature 'Has correct abilities' do expect(page).to have_selector('li.nav-header.nav-header-bigger a', text: 'Dashboard') expect(page).to have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit") expect(page).to have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit") - expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials") + expect(page).to have_link('Materials', href: "/admin/conferences/#{conference.short_title}/commercials") expect(page).to have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage") expect(page).to have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue") expect(page).to have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms") diff --git a/spec/features/track_organizer_ability_spec.rb b/spec/features/track_organizer_ability_spec.rb index ec2ffdf1..1107f777 100644 --- a/spec/features/track_organizer_ability_spec.rb +++ b/spec/features/track_organizer_ability_spec.rb @@ -23,7 +23,7 @@ feature 'Has correct abilities' do expect(page).to_not have_link('Basics', href: "/admin/conferences/#{conference.short_title}/edit") expect(page).to have_text('Basics') expect(page).to_not have_link('Contact', href: "/admin/conferences/#{conference.short_title}/contact/edit") - expect(page).to have_link('Commercials', href: "/admin/conferences/#{conference.short_title}/commercials") + expect(page).to have_link('Materials', href: "/admin/conferences/#{conference.short_title}/commercials") expect(page).to_not have_link('Splashpage', href: "/admin/conferences/#{conference.short_title}/splashpage") expect(page).to_not have_link('Venue', href: "/admin/conferences/#{conference.short_title}/venue") expect(page).to_not have_link('Rooms', href: "/admin/conferences/#{conference.short_title}/venue/rooms") diff --git a/spec/features/versions_spec.rb b/spec/features/versions_spec.rb index ec443fd0..cf0c49ed 100644 --- a/spec/features/versions_spec.rb +++ b/spec/features/versions_spec.rb @@ -277,9 +277,9 @@ feature 'Version' do conference_commercial.destroy visit admin_revision_history_path - expect(page).to have_text("Someone (probably via the console) created new commercial in conference #{conference.short_title}") - expect(page).to have_text("Someone (probably via the console) updated url of commercial in conference #{conference.short_title}") - expect(page).to have_text("Someone (probably via the console) deleted commercial in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) created new materials in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) updated url of materials in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) deleted materials in conference #{conference.short_title}") end scenario 'display changes in event commercials', feature: true, versioning: true, js: true do @@ -288,9 +288,9 @@ feature 'Version' do event_commercial.destroy visit admin_revision_history_path - expect(page).to have_text("Someone (probably via the console) created new commercial in event #{event_with_commercial.title} in conference #{conference.short_title}") - expect(page).to have_text("Someone (probably via the console) updated url of commercial in event #{event_with_commercial.title} in conference #{conference.short_title}") - expect(page).to have_text("Someone (probably via the console) deleted commercial in event #{event_with_commercial.title} in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) created new materals in event #{event_with_commercial.title} in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) updated url of materials in event #{event_with_commercial.title} in conference #{conference.short_title}") + expect(page).to have_text("Someone (probably via the console) deleted materials in event #{event_with_commercial.title} in conference #{conference.short_title}") end scenario 'display changes in event commercials in event history', feature: true, versioning: true, js: true do @@ -299,10 +299,10 @@ feature 'Version' do visit admin_conference_program_event_path(conference.short_title, event_with_commercial) click_link 'History' - expect(page).to have_text('Someone (probably via the console) created new commercial') + expect(page).to have_text('Someone (probably via the console) created new materials') visit admin_conference_program_event_path(conference.short_title, event_without_commercial) click_link 'History' - expect(page).to have_no_text('Someone (probably via the console) created new commercial') + expect(page).to have_no_text('Someone (probably via the console) created new materials') end scenario 'display changes in organization', feature: true, versioning: true, js: true do