expect(page).tohave_text("#{organizer.name} updated social tag, email, googleplus and sponsor email of contact details in conference #{conference.short_title}")
end
scenario'display changes in program',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new cfp for events with ID #{cfp_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated start date and end date of cfp for events with ID #{cfp_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted cfp for events with ID #{cfp_id} in conference #{conference.short_title}")
end
scenario'display changes in registration_period',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new registration period with ID #{registration_period_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated start date and end date of registration period with ID #{registration_period_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted registration period with ID #{registration_period_id} in conference #{conference.short_title}")
end
scenario'display changes in conference',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new event type Discussion with ID #{event_type_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated length and maximum abstract length of event type Discussion with ID #{event_type_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted event type Discussion with ID #{event_type_id} in conference #{conference.short_title}")
end
scenario'display changes in lodging',feature:true,versioning:true,js:truedo
lodging.update_attributes(description:'Nice view,close to venue',website_link:'http://www.example.com')
lodging_id=lodging.id
lodging.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) created new lodging Hotel XYZ with ID #{lodging_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated description and website link of lodging Hotel XYZ with ID #{lodging_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted lodging Hotel XYZ with ID #{lodging_id} in conference #{conference.short_title}")
end
scenario'display changes in conference role',feature:true,versioning:true,js:truedo
expect(page).tohave_text("#{organizer.name} updated description of role cfp in conference #{conference.short_title}")
end
scenario'display changes in room',feature:true,versioning:true,js:truedo
venue=create(:venue,conference:conference)
room=create(:room,venue:venue,name:'Auditorium')
room.update_attributes(size:120)
room_id=room.id
room.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) created new room Auditorium with ID #{room_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated size of room Auditorium with ID #{room_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted room Auditorium with ID #{room_id} in conference #{conference.short_title}")
end
scenario'display changes in sponsor',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new sponsor SUSE with ID #{sponsor_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated website url and sponsorship level of sponsor SUSE with ID #{sponsor_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted sponsor SUSE with ID #{sponsor_id} in conference #{conference.short_title}")
end
scenario'display changes in sponsorship_level',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new sponsorship level Gold with ID #{sponsorship_level_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated title of sponsorship level Gold with ID #{sponsorship_level_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted sponsorship level Gold with ID #{sponsorship_level_id} in conference #{conference.short_title}")
end
scenario'display changes in ticket',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new ticket Gold with ID #{ticket_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated price cents and description of ticket Gold with ID #{ticket_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted ticket Gold with ID #{ticket_id} in conference #{conference.short_title}")
end
scenario'display changes in track',feature:true,versioning:true,js:truedo
track.update_attributes(description:'Events about Linux distributions')
track_id=track.id
track.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) created new track Distribution with ID #{track_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated description of track Distribution with ID #{track_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted track Distribution with ID #{track_id} in conference #{conference.short_title}")
end
scenario'display changes in venue',feature:true,versioning:true,js:truedo
venue.update_attributes(website:'www.example.com new',description:'Just another beautiful venue')
venue_id=venue.id
venue.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) created new venue Example University with ID #{venue_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated website and description of venue Example University with ID #{venue_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted venue Example University with ID #{venue_id} in conference #{conference.short_title}")
end
scenario'display changes in event',feature:true,versioning:true,js:truedo
difficulty_level.update_attributes(description:'Only for Experts')
difficulty_level_id=difficulty_level.id
difficulty_level.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) created new difficulty level Expert with ID #{difficulty_level_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated description of difficulty level Expert with ID #{difficulty_level_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted difficulty level Expert with ID #{difficulty_level_id} in conference #{conference.short_title}")
end
scenario'display changes in splashpages',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new commercial in event #{event_with_commercial.title} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated url of commercial in event #{event_with_commercial.title} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted commercial 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:truedo
expect(page).tohave_text("added role organization_admin with ID #{user_role.id} to user #{user.name} in organization #{conference.organization.name}")
expect(page).tohave_text("removed role organization_admin with ID #{user_role.id} from user #{user.name} in organization #{conference.organization.name}")
end
scenario'display changes in users_role for conference role',feature:true,versioning:true,js:truedo
# Here registration is deleted to ensure the event registration related change still displays the asociated user's name
registration.destroy
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) registered #{organizer.name} to event My second event in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated attended of #{organizer.name}'s registration for event #{event.title} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) unregistered #{organizer.name} from event #{event.title} in conference #{conference.short_title}")
end
scenario'display changes in target',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new target 1000 Submissions by #{Date.today} with ID #{target_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated due date and target count of target 1000 Submissions by #{Date.today} with ID #{target_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted target 1000 Submissions by #{Date.today} with ID #{target_id} in conference #{conference.short_title}")
end
scenario'display changes in comment',feature:true,versioning:true,js:truedo
create(:event,program:conference.program,title:'My first event')
event=create(:event,program:conference.program,title:'My second event')
expect(page).tohave_text("#{organizer.name} commented on event My second event in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted #{organizer.name}'s comment on event #{event.title} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) re-added #{organizer.name}'s comment on event #{event.title} in conference #{conference.short_title}")
end
scenario'display changes in vote',feature:true,versioning:true,js:truedo
conference.program.rating=1
create(:event,program:conference.program,title:'My first event')
event=create(:event,program:conference.program,title:'My second event')
create(:vote,user:organizer,event:event)
Vote.last.destroy
PaperTrail::Version.last.reify.save
visitadmin_revision_history_path
expect(page).tohave_text("Someone (probably via the console) voted on event My second event in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted #{organizer.name}'s vote on event #{event.title} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) re-added #{organizer.name}'s vote on event #{event.title} in conference #{conference.short_title}")
end
scenario'display changes in campaign',feature:true,versioning:true,js:truedo
expect(page).tohave_text("Someone (probably via the console) created new campaign Test Campaign with ID #{campaign_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) updated utm source, utm medium, utm term and utm content of campaign Test Campaign with ID #{campaign_id} in conference #{conference.short_title}")
expect(page).tohave_text("Someone (probably via the console) deleted campaign Test Campaign with ID #{campaign_id} in conference #{conference.short_title}")
end
scenario'does not display password reset requests',feature:true,versioning:true,js:truedo
user=create(:user)
user.send_reset_password_instructions
visitadmin_revision_history_path
expect(page).to_nothave_text("Someone requested password reset of user #{user.name}")
end
scenario'does not display user signups',feature:true,versioning:true,js:truedo
create(:user,name:'testname')
visitadmin_revision_history_path
expect(page).to_nothave_text('testname signed up')
end
scenario'does not display updates to user',feature:true,versioning:true,js:truedo