Implements feature test for proposal workflog

- submitt proposal
- accept proposal
- confirm proposal
This commit is contained in:
Chrisbr 2014-05-13 15:45:39 +02:00
parent 147310b8b7
commit 656ded9d96
6 changed files with 73 additions and 19 deletions

View file

@ -108,32 +108,32 @@
- if event.transition_possible? :accept
%li= link_to 'Accept event (no email)',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
method: :patch, hint: 'Accept this event without sending an automated email.'
method: :patch, hint: 'Accept this event without sending an automated email.', id: 'accept_event'
%li= link_to 'Accept event (WITH email)',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: true),
method: :patch, hint: 'Accept this event and send an automated email.'
method: :patch, hint: 'Accept this event and send an automated email.', id: 'accept_event_mail'
- if event.transition_possible? :reject
%li= link_to 'Reject event (no email)',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
method: :patch, confirm: 'Are you sure?',
hint: 'Reject this event without sending an automated email.'
hint: 'Reject this event without sending an automated email.', id: 'reject_event'
%li= link_to 'Reject event (WITH email)',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: true),
method: :patch, confirm: 'Are you sure?',
hint: 'Reject this event and send an automated email.'
hint: 'Reject this event and send an automated email.', id: 'reject_event_mail'
- if event.transition_possible? :start_review
%li= link_to 'Start review',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review),
method: :patch
method: :patch, id: 'review_event'
- if event.transition_possible? :confirm
%li= link_to 'Confirm event',
update_state_admin_conference_event_path(@conference.short_title, event, transition: :confirm),
method: :patch,
method: :patch, id: 'confirm_event',
hint: 'Confirm that the speaker(s) will be present and that the event will actually take place.'
- if event.transition_possible? :cancel
%li= link_to 'Cancel event',
update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
method: :patch,
method: :patch, id: 'cancel_event',
hint: 'Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance.'
:javascript

View file

@ -1,6 +1,6 @@
.row
.col-md-12
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f|
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :patch }) do |f|
.tabbable
%ul.nav.nav-tabs
%li.active
@ -19,4 +19,4 @@
= link_to "Unregister", register_conference_path(@conference.short_title),:method => :delete, :class => "btn btn-danger",
:confirm => "Are you sure you want to unregister?"
- else
= f.action :submit, :button_html => { :value => "Register", :class => "btn btn-primary" }
= f.action :submit, :button_html => { :value => "Register", :class => "btn btn-primary", id: 'register' }

View file

@ -29,7 +29,10 @@
.pull-right
- if event.transition_possible? :confirm
= link_to 'Confirm',
conference_proposal_confirm_path(@conference.short_title, event, send_mail: false), method: :patch, class: 'btn btn-mini btn-success'
= link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id), class: 'btn btn-mini btn-primary'
conference_proposal_confirm_path(@conference.short_title, event, send_mail: false),
method: :patch, class: 'btn btn-mini btn-success', id: 'confirm_proposal'
= link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id),
class: 'btn btn-mini btn-primary', id: 'edit_proposal'
= link_to 'Withdraw', conference_proposal_path(@conference.short_title, event.id), method: :delete,
confirm: 'Are you sure you want to withdraw this proposal?', class: 'btn btn-mini btn-danger'
confirm: 'Are you sure you want to withdraw this proposal?', class: 'btn btn-mini btn-danger',
id: 'delete_proposal'