From 8adfd721df4ee700dad07dbfcd98c24976bbb0a5 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 8 Jan 2019 17:08:26 +0200 Subject: [PATCH] Test creating a conference and activating its CFP --- spec/features/management_interface_spec.rb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 spec/features/management_interface_spec.rb diff --git a/spec/features/management_interface_spec.rb b/spec/features/management_interface_spec.rb new file mode 100644 index 0000000..e1bba14 --- /dev/null +++ b/spec/features/management_interface_spec.rb @@ -0,0 +1,27 @@ +require "rails_helper" + +feature 'Conference management' do + before do + Rails.application.load_seed + end + + scenario 'Creating a new conference' do + sign_in_as_admin + visit management_root_path + expect(page).to_not have_content "FooConf #{1.year.from_now.year}" + create_new_conference + visit management_root_path + expect(page).to have_content "FooConf #{1.year.from_now.year}" + end + + scenario 'Enabling the call for papers of a conference' do + sign_in_as_admin + create_new_conference + visit root_path + expect(page).to have_link I18n.t('views.welcome.submit_event', event_type: '') + visit management_root_path + click_on I18n.t('actions.view.button', model: Conference.model_name.human), match: :first + click_on I18n.t('management.conferences.show.cfp_status') + expect(page).to_not have_link I18n.t('views.welcome.submit_event', event_type: '') + end +end