Usptream sync castme
This commit is contained in:
@@ -61,6 +61,17 @@ feature "Admin managing casting submissions" do
|
||||
expect(page).to have_content cci.performer_name
|
||||
end
|
||||
|
||||
scenario "admin can see copy url" do
|
||||
cc = create(:casting_call)
|
||||
cci = create(:casting_submission, casting_call: cc, zoom_meeting_url: "anything")
|
||||
|
||||
visit admin_casting_submissions_path
|
||||
|
||||
click_on manage_button
|
||||
|
||||
expect(page).to have_content "Copy URL"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_casting_submission_button
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
require "rails_helper"
|
||||
|
||||
feature "User managing casting calls" do
|
||||
let(:current_user) { create(:user) }
|
||||
let(:project) { create(:project, account: current_user.primary_account) }
|
||||
let(:current_user) { create(:user, :manager) }
|
||||
let(:project) { create(:project, members: current_user, account: current_user.primary_account) }
|
||||
|
||||
before :each do
|
||||
sign_in current_user
|
||||
end
|
||||
|
||||
scenario "casting calls table is visible" do
|
||||
scenario "casting calls table is visible if there are existing casting calls" do
|
||||
create(:casting_call, project: project)
|
||||
visit project_casting_calls_path(project)
|
||||
|
||||
expect(page).to have_content "Created On"
|
||||
@@ -16,11 +17,14 @@ feature "User managing casting calls" do
|
||||
expect(page).to have_content "Status"
|
||||
end
|
||||
|
||||
scenario "sees list of casting calls" do
|
||||
scenario "splash page is shown if there are no existing records" do
|
||||
visit project_casting_calls_path(project)
|
||||
|
||||
expect(page).to have_content no_casting_calls_label
|
||||
expect(page).to have_content schedule_demo
|
||||
expect(page).to have_content create_casting_call
|
||||
end
|
||||
|
||||
scenario "sees list of casting calls" do
|
||||
casting_call = create(:casting_call, project: project)
|
||||
|
||||
visit project_casting_calls_path(project)
|
||||
@@ -35,7 +39,6 @@ feature "User managing casting calls" do
|
||||
scenario "can create casting call requests" do
|
||||
visit project_casting_calls_path(project)
|
||||
|
||||
expect(page).to have_content no_casting_calls_label
|
||||
click_on add_new_casting_call_label
|
||||
|
||||
fill_in title_field, with: "Casting Title"
|
||||
@@ -92,6 +95,28 @@ feature "User managing casting calls" do
|
||||
expect(page).to have_content cc.questions
|
||||
end
|
||||
|
||||
context 'When the user is associate' do
|
||||
let(:current_user) { create(:user, :associate) }
|
||||
|
||||
it 'does show button to create new casting call' do
|
||||
visit project_casting_calls_path(project)
|
||||
|
||||
expect(page).to have_content schedule_demo
|
||||
expect(page).to have_content create_casting_call
|
||||
end
|
||||
end
|
||||
|
||||
context 'When the user is account manager' do
|
||||
let(:current_user) { create(:user, :account_manager) }
|
||||
|
||||
it 'does show button to create new casting call' do
|
||||
visit project_casting_calls_path(project)
|
||||
|
||||
expect(page).to have_content schedule_demo
|
||||
expect(page).to have_content create_casting_call
|
||||
end
|
||||
end
|
||||
|
||||
context "when signed out" do
|
||||
scenario "user opens public accessible casting call URL" do
|
||||
cc = create(:casting_call, title: "Dummy title", project: project)
|
||||
@@ -114,7 +139,7 @@ feature "User managing casting calls" do
|
||||
private
|
||||
|
||||
def no_casting_calls_label
|
||||
"Casting calls will appear here"
|
||||
t 'casting_calls.index.empty'
|
||||
end
|
||||
|
||||
def manage_button
|
||||
@@ -152,4 +177,12 @@ feature "User managing casting calls" do
|
||||
def questions_field
|
||||
t "helpers.label.casting_call.questions"
|
||||
end
|
||||
|
||||
def create_casting_call
|
||||
t 'casting_calls.splash.actions.create_casting_call'
|
||||
end
|
||||
|
||||
def schedule_demo
|
||||
t 'casting_calls.splash.actions.book_demo'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user