minor selector fix and tests for mobile error
This commit is contained in:
Родитель
41583b58b3
Коммит
df4784c345
|
@ -89,7 +89,8 @@ exports._showError = function(errSummary, errMessage, opt) {
|
|||
var $errBox = $('.apps-error-msg h2', opt.domContext);
|
||||
$('.apps-error-msg h2', opt.domContext).text(errSummary);
|
||||
$('.apps-error-msg p', opt.domContext).text(errMessage);
|
||||
$('.apps-error-msg').show();
|
||||
$('.apps-error-msg', opt.domContext).show();
|
||||
$(opt.domContext).trigger('mobile_error_shown.apps');
|
||||
} else {
|
||||
var $modal = $('.apps-error-msg:first', opt.domContext).modal(
|
||||
$errTarget,
|
||||
|
|
|
@ -117,6 +117,18 @@ asyncTest('success callback', function() {
|
|||
});
|
||||
|
||||
|
||||
asyncTest('install error: system unsupported', function() {
|
||||
var sb = this.sandbox,
|
||||
nav = {};
|
||||
$(sb).one('mobile_error_shown.apps', function() {
|
||||
equal($('.apps-error-msg h2', sb).text(), 'App installation failed');
|
||||
equal($('.apps-error-msg p', sb).text(), 'This system does not support installing apps');
|
||||
start();
|
||||
});
|
||||
apps.install('http://nice.com/nice.webapp', {domContext: sb, navigator: nav, mobile: true});
|
||||
});
|
||||
|
||||
|
||||
asyncTest('data', function() {
|
||||
var sb = this.sandbox,
|
||||
nav = {},
|
||||
|
|
Загрузка…
Ссылка в новой задаче