Extended porposal feature test
This commit is contained in:
parent
a8c9c2f2d4
commit
77dc4b2a93
1 changed files with 18 additions and 6 deletions
|
|
@ -59,16 +59,23 @@ feature Event do
|
||||||
expect(page.has_content?('Example Proposal')).to be true
|
expect(page.has_content?('Example Proposal')).to be true
|
||||||
|
|
||||||
sign_out
|
sign_out
|
||||||
|
|
||||||
# Accept proposal as admin
|
|
||||||
sign_in admin
|
sign_in admin
|
||||||
|
|
||||||
|
# Reject proposal
|
||||||
visit admin_conference_events_path(conference.short_title)
|
visit admin_conference_events_path(conference.short_title)
|
||||||
expect(page.has_content?('Example Proposal')).to be true
|
expect(page.has_content?('Example Proposal')).to be true
|
||||||
|
|
||||||
click_button 'New'
|
click_button 'New'
|
||||||
click_link "accept_event_#{event.id}"
|
click_link "reject_event_#{event.id}"
|
||||||
|
expect(flash).to eq('Updated state')
|
||||||
|
click_button 'Rejected'
|
||||||
|
click_link "review_event_#{event.id}"
|
||||||
|
expect(flash).to eq('Updated state')
|
||||||
|
|
||||||
|
# Start review
|
||||||
|
click_button 'Review'
|
||||||
|
click_link "accept_event_#{event.id}"
|
||||||
|
expect(flash).to eq('Updated state')
|
||||||
expect(page.has_content?('Unconfirmed')).to be true
|
expect(page.has_content?('Unconfirmed')).to be true
|
||||||
sign_out
|
sign_out
|
||||||
|
|
||||||
|
|
@ -79,12 +86,17 @@ feature Event do
|
||||||
expect(page.has_content?('Accepted (confirmation pending)')).to be true
|
expect(page.has_content?('Accepted (confirmation pending)')).to be true
|
||||||
click_link "confirm_proposal_#{event.id}"
|
click_link "confirm_proposal_#{event.id}"
|
||||||
expect(flash).
|
expect(flash).
|
||||||
to eq('Event was confirmed. Please register to attend the conference.')
|
to eq('Event was confirmed. Please register to attend the conference.')
|
||||||
|
|
||||||
|
# Register for conference
|
||||||
find('#register').click
|
find('#register').click
|
||||||
|
expect(flash).to eq('You are now registered.')
|
||||||
|
|
||||||
expect(flash).
|
# Withdraw proposal
|
||||||
to eq('You are now registered.')
|
visit conference_proposal_index_path(conference.short_title)
|
||||||
|
expect(page.has_content?('Confirmed')).to be true
|
||||||
|
click_link "delete_proposal_#{event.id}"
|
||||||
|
expect(flash).to eq('Proposal withdrawn.')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue