Fix commericals feature specs (UI consistency).
This commit is contained in:
parent
d4a2861051
commit
2dc3950cb0
3 changed files with 6 additions and 4 deletions
|
|
@ -16,7 +16,7 @@
|
|||
= semantic_form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', autofocus: true },
|
||||
hint: 'Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }, label: "Save Materials"
|
||||
%hr
|
||||
|
||||
- @commercials.each_slice(3) do |slice|
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
= semantic_form_for(@event.commercials.build, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event)) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
||||
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }, label: "Save Materials"
|
||||
%hr
|
||||
- @event.commercials.each_slice(3) do |slice|
|
||||
.row
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ feature Commercial do
|
|||
click_link 'Delete'
|
||||
end
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('Materials were successfully destroyed.')
|
||||
expect(flash).to eq('Materials were successfully removed.')
|
||||
expect(conference.commercials.count).to eq(0)
|
||||
end
|
||||
end
|
||||
|
|
@ -68,6 +68,8 @@ feature Commercial do
|
|||
end
|
||||
|
||||
scenario 'does not add an invalid commercial of an event', feature: true, js: true do
|
||||
# TODO (snapcon)
|
||||
pending("Snap!Con allows all materials to be saved.")
|
||||
visit edit_conference_program_proposal_path(conference.short_title, event.id)
|
||||
click_link 'Materials'
|
||||
fill_in 'commercial_url', with: 'invalid_commercial_url'
|
||||
|
|
@ -116,7 +118,7 @@ feature Commercial do
|
|||
click_link 'Delete'
|
||||
end
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('Materials successfully destroyed.')
|
||||
expect(flash).to eq('Materials were successfully destroyed.')
|
||||
expect(event.commercials.count).to eq(0)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue