Compare commits
6 Commits
add-splash
...
add-splash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
062b1d75cd | ||
|
|
ea025a86b3 | ||
|
|
c8f314142c | ||
|
|
2a7deef3c8 | ||
|
|
08e475642c | ||
|
|
f201580a01 |
@@ -5,7 +5,6 @@ class BroadcastsController < ApplicationController
|
|||||||
before_action :build_broadcast, only: [:new, :create]
|
before_action :build_broadcast, only: [:new, :create]
|
||||||
before_action :set_broadcast, only: [:show, :destroy, :update]
|
before_action :set_broadcast, only: [:show, :destroy, :update]
|
||||||
before_action :set_multi_view_broadcasts, only: [:show]
|
before_action :set_multi_view_broadcasts, only: [:show]
|
||||||
before_action :show_splash_screen, only: :index
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@broadcasts = filtered_broadcasts.order_by_recent.paginate(page: params[:page])
|
@broadcasts = filtered_broadcasts.order_by_recent.paginate(page: params[:page])
|
||||||
@@ -50,10 +49,6 @@ class BroadcastsController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def show_splash_screen
|
|
||||||
render :splash if broadcasts.count.zero?
|
|
||||||
end
|
|
||||||
|
|
||||||
def broadcast_params
|
def broadcast_params
|
||||||
params.require(:broadcast).permit(:name, files: [])
|
params.require(:broadcast).permit(:name, files: [])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class ContractTemplatesController < ApplicationController
|
|||||||
|
|
||||||
before_action :set_project, except: [:destroy]
|
before_action :set_project, except: [:destroy]
|
||||||
before_action :set_contract_template, only: [:destroy]
|
before_action :set_contract_template, only: [:destroy]
|
||||||
|
before_action :show_splash_screen, only: :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@contract_templates = contract_templates.non_archived.order_by_name.paginate(page: params[:page])
|
@contract_templates = contract_templates.non_archived.order_by_name.paginate(page: params[:page])
|
||||||
@@ -38,6 +39,10 @@ class ContractTemplatesController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def show_splash_screen
|
||||||
|
render :splash if contract_templates.non_archived.count.zero?
|
||||||
|
end
|
||||||
|
|
||||||
def set_contract_template
|
def set_contract_template
|
||||||
@contract_template = authorize contract_templates.find(params[:id])
|
@contract_template = authorize contract_templates.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<div class="d-flex flex-row">
|
<div class="d-flex flex-row">
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<%= product_wordmark :direct_me, prefix: t('.headings.welcome'), class: "h2" %>
|
<%= product_wordmark :release_me, prefix: t('.headings.welcome'), class: "h2" %>
|
||||||
<p class="text-muted"><%= t '.headings.subtitle' %>
|
<p class="text-muted"><%= t '.headings.subtitle' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= link_to t(".actions.book_demo"), 'https://meetings.hubspot.com/bray2', class: "btn btn-primary border align-self-center h-50 ml-auto mr-2 pb-2", target: '_blank' %>
|
<%= link_to t(".actions.book_demo"), 'https://meetings.hubspot.com/bray2', class: "btn btn-primary border align-self-center h-50 ml-auto mr-2 pb-2", target: '_blank' %>
|
||||||
<% if policy(Broadcast).new? %>
|
<% if policy(ContractTemplate).new? %>
|
||||||
<%= link_to t(".actions.create_stream"), [:new, @project, :broadcast], class: "btn btn-success border align-self-center h-50 pb-2" %>
|
<%= link_to t(".actions.create_template"), [:new, @project, :contract_template], class: "btn btn-success border align-self-center h-50 pb-2" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<h3><%= t '.headings.how_it_works' %></h3>
|
<h3><%= t '.headings.how_it_works' %></h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li><%= t '.list_items.create_stream' %></li>
|
<li><%= t '.list_items.create_releases' %></li>
|
||||||
<li><%= t '.list_items.share_stream' %></li>
|
<li><%= t '.list_items.download_mobile_app' %></li>
|
||||||
<li><%= t '.list_items.launch_video_conference' %></li>
|
<li><%= t '.list_items.print_QR_code' %></li>
|
||||||
<li><%= t '.list_items.share_files' %></li>
|
<li><%= t '.list_items.releases_automatically_organized' %></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,13 +47,12 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<h3><%= t '.headings.benefits' %></h3>
|
<h3><%= t '.headings.benefits' %></h3>
|
||||||
<ul class="fa-ul ml-5">
|
<ul class="fa-ul ml-5">
|
||||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.stream_from_mobile_app'))) %>
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.all_releases_available'))) %>
|
||||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.direct_shoots_anywhere'))) %>
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.manage_large_audience'))) %>
|
||||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.share_live_stream'))) %>
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.add_tags_and_notes'))) %>
|
||||||
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.stream_multiple_cameras'))) %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,24 +207,6 @@ en:
|
|||||||
new:
|
new:
|
||||||
heading:
|
heading:
|
||||||
Create Live Stream
|
Create Live Stream
|
||||||
splash:
|
|
||||||
actions:
|
|
||||||
book_demo: Schedule a Demo
|
|
||||||
create_stream: Create New Live Stream
|
|
||||||
headings:
|
|
||||||
benefits: Benefits
|
|
||||||
how_it_works: How It Works
|
|
||||||
subtitle: Remote directing and video village solution
|
|
||||||
welcome: Welcome to
|
|
||||||
list_items:
|
|
||||||
create_stream: Create a live stream
|
|
||||||
direct_shoots_anywhere: Direct shoots anywhere around the world
|
|
||||||
launch_video_conference: Launch Video Conference using plugin
|
|
||||||
share_files: Share files via the ME Suite mobile app
|
|
||||||
share_live_stream: Share live stream with clients all over the the world
|
|
||||||
share_stream: Share live stream link with clients
|
|
||||||
stream_from_mobile_app: Stream from ME Suite Mobile app, or via a professional camera
|
|
||||||
stream_multiple_cameras: Stream multiple cameras at one time
|
|
||||||
bulk_taggings:
|
bulk_taggings:
|
||||||
new_bulk_tag_modal:
|
new_bulk_tag_modal:
|
||||||
submit: Add
|
submit: Add
|
||||||
@@ -270,6 +252,23 @@ en:
|
|||||||
signed_release_count: No. Signed Releases
|
signed_release_count: No. Signed Releases
|
||||||
new:
|
new:
|
||||||
heading: New Release Template
|
heading: New Release Template
|
||||||
|
splash:
|
||||||
|
actions:
|
||||||
|
book_demo: Schedule a Demo
|
||||||
|
create_template: Create New Release Template
|
||||||
|
headings:
|
||||||
|
benefits: Benefits
|
||||||
|
how_it_works: How It Works
|
||||||
|
subtitle: The easiest way to create and manage releases.
|
||||||
|
welcome: Welcome to
|
||||||
|
list_items:
|
||||||
|
add_tags_and_notes: Add tags and notes to releases for added organization and searchability
|
||||||
|
all_releases_available: All release types available including Covid Medical, Appearance, Location and more
|
||||||
|
create_releases: Create releases for your video shoot
|
||||||
|
download_mobile_app: Download the ME Suite mobile app
|
||||||
|
manage_large_audience: Easily manage large audiences with the crowd control feature
|
||||||
|
print_QR_code: Print out release QR codes
|
||||||
|
releases_automatically_organized: Releases are automatically organized as they’re submitted
|
||||||
contracts:
|
contracts:
|
||||||
medical_questionnaire:
|
medical_questionnaire:
|
||||||
heading: Medical Questionnaire
|
heading: Medical Questionnaire
|
||||||
|
|||||||
@@ -57,25 +57,6 @@ es:
|
|||||||
pdf:
|
pdf:
|
||||||
do_not_copy_warning: "Do not copy (ES)"
|
do_not_copy_warning: "Do not copy (ES)"
|
||||||
serial_number_label: "Serial Number (ES)"
|
serial_number_label: "Serial Number (ES)"
|
||||||
broadcasts:
|
|
||||||
splash:
|
|
||||||
actions:
|
|
||||||
book_demo: Schedule a Demo
|
|
||||||
create_stream: Create New Live Stream
|
|
||||||
headings:
|
|
||||||
benefits: Benefits
|
|
||||||
how_it_works: How It Works
|
|
||||||
subtitle: Remote directing and video village solution
|
|
||||||
welcome: Welcome to
|
|
||||||
list_items:
|
|
||||||
create_stream: Create a live stream
|
|
||||||
direct_shoots_anywhere: Direct shoots anywhere around the world
|
|
||||||
launch_video_conference: Launch Video Conference using plugin
|
|
||||||
share_files: Share files via the ME Suite mobile app
|
|
||||||
share_live_stream: Share live stream with clients all over the the world
|
|
||||||
share_stream: Share live stream link with clients
|
|
||||||
stream_from_mobile_app: Stream from ME Suite Mobile app, or via a professional camera
|
|
||||||
stream_multiple_cameras: Stream multiple cameras at one time
|
|
||||||
contract_templates:
|
contract_templates:
|
||||||
blank_contracts:
|
blank_contracts:
|
||||||
create:
|
create:
|
||||||
@@ -89,6 +70,23 @@ es:
|
|||||||
heading: Legal (ES)
|
heading: Legal (ES)
|
||||||
release_info:
|
release_info:
|
||||||
heading: Release Info (ES)
|
heading: Release Info (ES)
|
||||||
|
splash:
|
||||||
|
actions:
|
||||||
|
book_demo: Schedule a Demo (ES)
|
||||||
|
create_template: Create New Release Template (ES)
|
||||||
|
headings:
|
||||||
|
benefits: ""
|
||||||
|
how_it_works: How It Works (ES)
|
||||||
|
subtitle: The easiest way to create and manage releases. (ES)
|
||||||
|
welcome: Welcome to (ES)
|
||||||
|
list_items:
|
||||||
|
add_tags_and_notes: Add tags and notes to releases for added organization and searchability (ES)
|
||||||
|
all_releases_available: All release types available including Covid Medical, Appearance, Location and more (ES)
|
||||||
|
create_releases: Create releases for your video shoot (ES)
|
||||||
|
download_mobile_app: Download the ME Suite mobile app (ES)
|
||||||
|
manage_large_audience: Easily manage large audiences with the crowd control feature (ES)
|
||||||
|
print_QR_code: Print out release QR codes (ES)
|
||||||
|
releases_automatically_organized: Releases are automatically organized as they’re submitted (ES)
|
||||||
contracts:
|
contracts:
|
||||||
photos:
|
photos:
|
||||||
guardian_2_photo_heading: Second guardian photo (ES)
|
guardian_2_photo_heading: Second guardian photo (ES)
|
||||||
|
|||||||
@@ -9,6 +9,20 @@ SET xmloption = content;
|
|||||||
SET client_min_messages = warning;
|
SET client_min_messages = warning;
|
||||||
SET row_security = off;
|
SET row_security = off;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
||||||
--
|
--
|
||||||
@@ -317,8 +331,8 @@ CREATE TABLE public.appearance_releases (
|
|||||||
person_last_name character varying,
|
person_last_name character varying,
|
||||||
guardian_first_name character varying,
|
guardian_first_name character varying,
|
||||||
guardian_last_name character varying,
|
guardian_last_name character varying,
|
||||||
identifier character varying,
|
|
||||||
guardian_email character varying,
|
guardian_email character varying,
|
||||||
|
identifier character varying,
|
||||||
person_address_street2 character varying,
|
person_address_street2 character varying,
|
||||||
person_address_city character varying,
|
person_address_city character varying,
|
||||||
person_address_state character varying,
|
person_address_state character varying,
|
||||||
@@ -652,6 +666,15 @@ CREATE SEQUENCE public.contract_templates_id_seq
|
|||||||
ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id;
|
ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: data_migrations; Type: TABLE; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE public.data_migrations (
|
||||||
|
version character varying NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: directories; Type: TABLE; Schema: public; Owner: -
|
-- Name: directories; Type: TABLE; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -1378,7 +1401,6 @@ CREATE TABLE public.settings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.settings_id_seq
|
CREATE SEQUENCE public.settings_id_seq
|
||||||
AS integer
|
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1414,7 +1436,6 @@ CREATE TABLE public.taggings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.taggings_id_seq
|
CREATE SEQUENCE public.taggings_id_seq
|
||||||
AS integer
|
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1445,7 +1466,6 @@ CREATE TABLE public.tags (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.tags_id_seq
|
CREATE SEQUENCE public.tags_id_seq
|
||||||
AS integer
|
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1806,9 +1826,9 @@ CREATE TABLE public.zoom_meetings (
|
|||||||
api_meeting_id character varying,
|
api_meeting_id character varying,
|
||||||
created_at timestamp(6) without time zone NOT NULL,
|
created_at timestamp(6) without time zone NOT NULL,
|
||||||
updated_at timestamp(6) without time zone NOT NULL,
|
updated_at timestamp(6) without time zone NOT NULL,
|
||||||
|
status integer DEFAULT 0,
|
||||||
zoom_user_id bigint,
|
zoom_user_id bigint,
|
||||||
project_id bigint,
|
project_id bigint
|
||||||
status integer DEFAULT 0
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -2285,6 +2305,14 @@ ALTER TABLE ONLY public.contract_templates
|
|||||||
ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: data_migrations data_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.data_migrations
|
||||||
|
ADD CONSTRAINT data_migrations_pkey PRIMARY KEY (version);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
-- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
expect(response).to be_successful
|
expect(response).to be_successful
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders content if theere are existing broadcasts" do
|
it "renders content" do
|
||||||
create(:broadcast, project: project, name: "Another Broadcast")
|
create(:broadcast, project: project, name: "Another Broadcast")
|
||||||
|
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
@@ -34,13 +34,12 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "when there are no active broadcasts" do
|
context "when there are no active broadcasts" do
|
||||||
it "renders splash screen" do
|
it "renders an empty message" do
|
||||||
Broadcast.destroy_all
|
Broadcast.destroy_all
|
||||||
|
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
|
|
||||||
expect(response.body).to have_link create_stream
|
expect(response.body).to have_content("Live streams will appear here")
|
||||||
expect(response.body).to have_link schedule_demo
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -56,8 +55,10 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
context "for xhr request" do
|
context "for xhr request" do
|
||||||
it "filters the broadcasts by a query param" do
|
it "filters the broadcasts by a query param" do
|
||||||
create(:broadcast, project: project, skip_create_callback: true, name: "Stream by Adam")
|
appearance_releases = [
|
||||||
create(:broadcast, project: project, skip_create_callback: true, name: "Stream by Zoe")
|
create(:broadcast, skip_create_callback: true, name: "Stream by Adam"),
|
||||||
|
create(:broadcast, skip_create_callback: true, name: "Stream by Zoe"),
|
||||||
|
]
|
||||||
|
|
||||||
get :index, params: { project_id: project, query: "Zoe" }, xhr: true
|
get :index, params: { project_id: project, query: "Zoe" }, xhr: true
|
||||||
|
|
||||||
@@ -244,12 +245,4 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
{ files: [contract_file] }
|
{ files: [contract_file] }
|
||||||
end
|
end
|
||||||
|
|
||||||
def schedule_demo
|
|
||||||
t 'broadcasts.splash.actions.book_demo'
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_stream
|
|
||||||
t 'broadcasts.splash.actions.create_stream'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ describe ContractTemplatesController do
|
|||||||
expect(response).to be_successful
|
expect(response).to be_successful
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders content' do
|
it 'renders content if there are contract templates' do
|
||||||
contract_template = create(:contract_template,
|
contract_template = create(:contract_template,
|
||||||
name: 'My Contract Template', fee: 50, release_type: 'appearance',
|
name: 'My Contract Template', fee: 50, release_type: 'appearance',
|
||||||
project: project)
|
project: project)
|
||||||
@@ -39,10 +39,11 @@ describe ContractTemplatesController do
|
|||||||
end
|
end
|
||||||
|
|
||||||
context 'when there are no contract templates' do
|
context 'when there are no contract templates' do
|
||||||
it 'renders an empty message' do
|
it 'renders splash screen' do
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
|
|
||||||
expect(response.body).to have_content('Release Templates will appear here')
|
expect(response.body).to have_link "Create New Release Template"
|
||||||
|
expect(response.body).to have_link schedule_demo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ describe ContractTemplatesController do
|
|||||||
let(:current_user) { create(:user, :associate) }
|
let(:current_user) { create(:user, :associate) }
|
||||||
|
|
||||||
it 'does not show the new contract template button' do
|
it 'does not show the new contract template button' do
|
||||||
|
create(:contract_template, project: project)
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
|
|
||||||
expect(response.body).not_to have_link('Create New Release Template')
|
expect(response.body).not_to have_link('Create New Release Template')
|
||||||
@@ -166,4 +168,8 @@ describe ContractTemplatesController do
|
|||||||
restriction_text: 'restrictions'
|
restriction_text: 'restrictions'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def schedule_demo
|
||||||
|
t 'contract_templates.splash.actions.book_demo'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ feature "User imports release templates", type: :feature do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "importing two existing templates into a project" do
|
scenario "importing two existing templates into a project" do
|
||||||
|
create(:contract_template, project: project)
|
||||||
visit project_contract_templates_path(project)
|
visit project_contract_templates_path(project)
|
||||||
click_on "Import Release Template"
|
click_on "Import Release Template"
|
||||||
select_templates([project_one_template.id, project_two_template.id])
|
select_templates([project_one_template.id, project_two_template.id])
|
||||||
@@ -31,6 +32,7 @@ feature "User imports release templates", type: :feature do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "searching for a template", js: true do
|
scenario "searching for a template", js: true do
|
||||||
|
create(:contract_template, project: project)
|
||||||
visit project_contract_templates_path(project)
|
visit project_contract_templates_path(project)
|
||||||
click_on "Import Release Template"
|
click_on "Import Release Template"
|
||||||
fill_in "query", with: "Second"
|
fill_in "query", with: "Second"
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
|||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario 'splash page is shown if tehre are no contract templates' do
|
||||||
|
visit project_contract_templates_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).to have_content create_release_template
|
||||||
|
end
|
||||||
|
|
||||||
scenario 'creating a new release template' do
|
scenario 'creating a new release template' do
|
||||||
visit new_project_contract_template_path(project)
|
visit new_project_contract_template_path(project)
|
||||||
|
|
||||||
@@ -223,12 +230,20 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
|||||||
let(:current_user) { create(:user, :associate) }
|
let(:current_user) { create(:user, :associate) }
|
||||||
|
|
||||||
it 'does not show management buttons for release templates' do
|
it 'does not show management buttons for release templates' do
|
||||||
|
create(:contract_template, project: project)
|
||||||
visit project_contract_templates_path(project)
|
visit project_contract_templates_path(project)
|
||||||
|
|
||||||
expect(page).not_to have_content('Create New Release Template')
|
expect(page).not_to have_content('Create New Release Template')
|
||||||
expect(page).not_to have_content(import_template_button)
|
expect(page).not_to have_content(import_template_button)
|
||||||
expect(page).not_to have_content('Delete')
|
expect(page).not_to have_content('Delete')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not show create release button on splash page' do
|
||||||
|
visit project_contract_templates_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).not_to have_content create_release_template
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'When the user is account manager' do
|
context 'When the user is account manager' do
|
||||||
@@ -242,6 +257,13 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
|||||||
click_on 'Manage'
|
click_on 'Manage'
|
||||||
expect(page).to have_content('Archive')
|
expect(page).to have_content('Archive')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not show create release button on splash page' do
|
||||||
|
visit project_contract_templates_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).to have_content create_release_template
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
@@ -273,4 +295,12 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
|||||||
def fill_hidden(id, with:)
|
def fill_hidden(id, with:)
|
||||||
find(:xpath, "//input[@id='#{id}']", visible: false).set with
|
find(:xpath, "//input[@id='#{id}']", visible: false).set with
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def schedule_demo
|
||||||
|
t 'contract_templates.splash.actions.book_demo'
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_release_template
|
||||||
|
t 'contract_templates.splash.actions.create_template'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,13 +12,6 @@ feature 'User managing broadcasts' do
|
|||||||
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
|
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "splash page is shown if there are no existing streams" do
|
|
||||||
visit project_broadcasts_path(project)
|
|
||||||
|
|
||||||
expect(page).to have_content schedule_demo
|
|
||||||
expect(page).to have_content create_stream
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'creating and deleting a broadcast', js: true do
|
scenario 'creating and deleting a broadcast', js: true do
|
||||||
visit new_project_broadcast_path(project)
|
visit new_project_broadcast_path(project)
|
||||||
|
|
||||||
@@ -138,29 +131,6 @@ feature 'User managing broadcasts' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'When the user is associate' do
|
|
||||||
let(:current_user) { create(:user, :associate) }
|
|
||||||
|
|
||||||
it 'does not show button to create new live stream' do
|
|
||||||
visit project_broadcasts_path(project)
|
|
||||||
|
|
||||||
expect(page).to have_content schedule_demo
|
|
||||||
expect(page).not_to have_content create_stream
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'When the user is account manager' do
|
|
||||||
let(:current_user) { create(:user, :account_manager) }
|
|
||||||
|
|
||||||
it 'does show button to create new live stream' do
|
|
||||||
visit project_broadcasts_path(project)
|
|
||||||
|
|
||||||
expect(page).to have_content schedule_demo
|
|
||||||
expect(page).to have_content create_stream
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
@@ -181,12 +151,4 @@ feature 'User managing broadcasts' do
|
|||||||
def switch_view_dropdown
|
def switch_view_dropdown
|
||||||
'Switch View'
|
'Switch View'
|
||||||
end
|
end
|
||||||
|
|
||||||
def schedule_demo
|
|
||||||
t 'broadcasts.splash.actions.book_demo'
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_stream
|
|
||||||
t 'broadcasts.splash.actions.create_stream'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user