Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Apr 18, 2023
1 parent d25f7d0 commit 319c755
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 27 deletions.
7 changes: 2 additions & 5 deletions Alloy/commands/compile/compilerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ exports.getParserArgs = function(node, state, opts) {
} else {
return;
}
}
}

if (/(^|\+)\s*(?:(?:Ti|Titanium|Alloy.Globals|Alloy.CFG|\$.args)\.|L\(.+\)\s*$|WPATH\()/.test(theValue)) {
var match = theValue.match(/^\s*L\([^'"]+\)\s*$/);
Expand Down Expand Up @@ -772,9 +772,6 @@ function updateImplicitNamspaces(platform) {
break;
case 'ios':
break;
case 'mobileweb':
CONST.IMPLICIT_NAMESPACES.NavigationGroup = 'Ti.UI.MobileWeb';
break;
}
}

Expand Down Expand Up @@ -990,7 +987,7 @@ exports.validateNodeName = function(node, names) {
exports.generateCollectionBindingTemplate = function(args) {
var code = '';
var COLLECTION_BINDING_EVENTS = CONST.COLLECTION_BINDING_EVENTS_092;

// Check if not 0.9.2 and if it's a supported version as we'll default to 0.9.2 if the version is not supported
if (compilerConfig.backbone !== '0.9.2' && CONST.SUPPORTED_BACKBONE_VERSIONS.includes(compilerConfig.backbone)) {
COLLECTION_BINDING_EVENTS = CONST.COLLECTION_BINDING_EVENTS;
Expand Down
4 changes: 2 additions & 2 deletions Alloy/commands/info/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ var info = {
var desc = {
properties: {
Description: 'Local persistence adapter that uses Ti.App.Properties storage',
platforms: ['android', 'ios', 'mobileweb', 'blackberry', 'windows']
platforms: ['android', 'ios']
},
sql: {
Description: 'Local persistence adapter that uses SQLite storage',
platforms: ['android', 'ios', 'blackberry', 'windows']
platforms: ['android', 'ios']
}
};
console.log(JSON.stringify(desc, null, 4));
Expand Down
17 changes: 0 additions & 17 deletions Alloy/template/lib/alloy.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,23 +477,6 @@ exports.isTablet = (function() {
var psc = Ti.Platform.Android.physicalSizeCategory;
return psc === Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_LARGE ||
psc === Ti.Platform.Android.PHYSICAL_SIZE_CATEGORY_XLARGE;
} else if (OS_MOBILEWEB) {
return Math.min(
Ti.Platform.displayCaps.platformHeight,
Ti.Platform.displayCaps.platformWidth
) >= 400;
// } else if (OS_BLACKBERRY) {
// // Tablets not currently supported by BB TiSDK
// // https://jira.appcelerator.org/browse/TIMOB-13225
// return false;
} else if (OS_WINDOWS) {
// per http://www.extremetech.com/computing/139768-windows-8-smartphones-and-windows-phone-8-tablets
// tablets should be >= 1024x768 and phones could be lower, though current phones are running at
// the 1280x720 range and higher
return Math.max(
Ti.Platform.displayCaps.platformHeight,
Ti.Platform.displayCaps.platformWidth
) >= 1024;
} else {
return isTabletFallback();
}
Expand Down
2 changes: 1 addition & 1 deletion samples/lib/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var exec = require('child_process').exec,
var alloyRoot = path.join(__dirname, '..', '..');
var IS_WIN = /^win/i.test(os.platform());

exports.TIMEOUT_DEFAULT = IS_WIN ? 5000 : 2000;
exports.TIMEOUT_DEFAULT = 10000;
exports.paths = {
templates: path.join(alloyRoot, 'Alloy', 'template'),
harnessTemplate: path.join(alloyRoot, 'test', 'projects', 'HarnessTemplate'),
Expand Down
2 changes: 1 addition & 1 deletion test/specs/compilefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var fs = require('fs-extra'),
platforms = require('../../platforms/index'),
_ = require('lodash');

var TIMEOUT_DEFAULT = 2000;
var TIMEOUT_DEFAULT = 20000;
var TIMEOUT_COMPILE = 20000;
var TIMEOUT_PREP = 30000;
var GEN_FOLDER = '_generated';
Expand Down
2 changes: 1 addition & 1 deletion test/specs/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var fs = require('fs-extra'),
CONST = require('../../Alloy/common/constants'),
_ = require('lodash');

var TIMEOUT_DEFAULT = 2000;
var TIMEOUT_DEFAULT = 20000;
var PLATFORMS = CONST.PLATFORMS;

var alloyRoot = path.join(__dirname,'..','..');
Expand Down

0 comments on commit 319c755

Please sign in to comment.