VRFS-1592 add custom message in app dialog, fix test
This commit is contained in:
parent
8563c82802
commit
7893affafb
|
|
@ -11,6 +11,7 @@
|
|||
var $templateAttemptLaunch = null;
|
||||
var $templateLaunchSuccessful = null;
|
||||
var $templateLaunchUnsuccessful = null;
|
||||
var $gear_modal = false;
|
||||
|
||||
function renderAttemptLaunch() {
|
||||
var $template = $(context._.template($templateAttemptLaunch.html(), buildOptions(), { variable: 'data' }));
|
||||
|
|
@ -78,7 +79,9 @@
|
|||
osSpecificSystemTrayLink = 'http://support.apple.com/kb/ht3737';
|
||||
}
|
||||
|
||||
return { osSpecificSystemTray: osSpecificSystemTray, osSpecificSystemTrayLink: osSpecificSystemTrayLink, launchUrl: 'jamkazam:'};
|
||||
var message_prefix = $gear_modal ? "To configure your audio gear" : "To create or find and join a session";
|
||||
|
||||
return { osSpecificSystemTray: osSpecificSystemTray, osSpecificSystemTrayLink: osSpecificSystemTrayLink, launchUrl: 'jamkazam:', messagePrefix: message_prefix};
|
||||
}
|
||||
|
||||
function reset() {
|
||||
|
|
@ -86,9 +89,11 @@
|
|||
}
|
||||
|
||||
function beforeShow(args) {
|
||||
if (args.d1 == "gear") {
|
||||
if (args) {
|
||||
$gear_modal = (args.d1 == "gear");
|
||||
}
|
||||
else {
|
||||
$gear_modal = false;
|
||||
}
|
||||
reset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<br clear="all" />
|
||||
<div class="left"><a href="#" data-purpose="add-profile" class="button-orange">ADD NEW PROFILE</a></div><div class="right"><a href="javascript:history.go(-1)" class="button-grey">BACK</a></div>
|
||||
<div class="left"><a href="#" data-purpose="add-profile" class="button-orange">ADD NEW GEAR</a></div><div class="right"><a href="javascript:history.go(-1)" class="button-grey">BACK</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
.dialog-inner
|
||||
|
||||
%script{type: 'text/template', id: 'template-attempt-launch'}
|
||||
%p To create or find and join a session, you must use the JamKazam application.
|
||||
%p
|
||||
{{data.messagePrefix}}, you must use the JamKazam application.
|
||||
.right.buttons
|
||||
%a.button-grey.btn-cancel{href:'#', 'layout-action' => 'close'} CANCEL
|
||||
%a.button-orange.btn-launch-app{href:'{{data.launchUrl}}'} LAUNCH APP
|
||||
|
||||
%script{type: 'text/template', id: 'template-unsupported-launch'}
|
||||
%p To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already.
|
||||
%p
|
||||
{{data.messagePrefix}}, you must use the JamKazam application. Please download and install the application if you have not done so already.
|
||||
.right.buttons
|
||||
%a.button-grey.btn-cancel{href:'#', 'layout-action' => 'close'} CANCEL
|
||||
%a.button-orange.btn-go-to-download-page{href:'/downloads'} GO TO APP DOWNLOAD PAGE
|
||||
|
|
|
|||
|
|
@ -11,7 +11,12 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature =>
|
|||
sign_in_poltergeist user
|
||||
visit options[:screen_path]
|
||||
should have_selector('h1', text: 'Application Notice')
|
||||
should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already.')
|
||||
if options[:gear_modal] && options[:gear_modal] == true
|
||||
should have_selector('p', text: 'To configure your audio gear, you must use the JamKazam application. Please download and install the application if you have not done so already.')
|
||||
else
|
||||
should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application. Please download and install the application if you have not done so already.')
|
||||
end
|
||||
|
||||
find('a.btn-go-to-download-page').trigger(:click)
|
||||
find('h3', text: 'SYSTEM REQUIREMENTS:')
|
||||
end
|
||||
|
|
@ -22,7 +27,11 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature =>
|
|||
sign_in_poltergeist user
|
||||
visit options[:screen_path]
|
||||
should have_selector('h1', text: 'Application Notice')
|
||||
should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application.')
|
||||
if options[:gear_modal] && options[:gear_modal] == true
|
||||
should have_selector('p', text: 'To configure your audio gear, you must use the JamKazam application.')
|
||||
else
|
||||
should have_selector('p', text: 'To create or find and join a session, you must use the JamKazam application.')
|
||||
end
|
||||
should have_selector('.btn-launch-app')
|
||||
find('.btn-launch-app')['href'].start_with?('jamkazam:')
|
||||
end
|
||||
|
|
@ -35,6 +44,7 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature =>
|
|||
end
|
||||
it_behaves_like :launch_not_supported, screen_path: '/client#/createSession'
|
||||
it_behaves_like :launch_not_supported, screen_path: '/client#/findSession'
|
||||
it_behaves_like :launch_not_supported, screen_path: '/client#/account/audio', gear_modal: true
|
||||
end
|
||||
|
||||
describe "supported" do
|
||||
|
|
@ -44,6 +54,7 @@ describe "Reset Password", :js => true, :type => :feature, :capybara_feature =>
|
|||
end
|
||||
it_behaves_like :launch_supported, screen_path: '/client#/createSession'
|
||||
it_behaves_like :launch_supported, screen_path: '/client#/findSession'
|
||||
it_behaves_like :launch_supported, screen_path: '/client#/account/audio', gear_modal: true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue