1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Fix tests

This commit is contained in:
Robert Sandell 2018-12-30 10:10:33 +02:00
parent f338045df7
commit d9693088cc
3 changed files with 13 additions and 2 deletions

View File

@ -72,7 +72,7 @@ export default [
version version
}; };
if (versionName) { if (versionName) {
os.versionName = versionName; os.versionName = versionName;
} }
return os; return os;
}, },

View File

@ -78,7 +78,8 @@ class Utils {
static getAndroidVersionName(version) { static getAndroidVersionName(version) {
const v = version.split('.').splice(0, 2).map(function(s) { const v = version.split('.').splice(0, 2).map(function(s) {
return parseInt(s) || 0; return parseInt(s) || 0;
}).push(0); });
v.push(0);
if (v[0] == 1 && v[1] < 5) return undefined; if (v[0] == 1 && v[1] < 5) return undefined;
if (v[0] == 1 && v[1] < 6) return "Cupcake"; if (v[0] == 1 && v[1] < 6) return "Cupcake";
if (v[0] == 1 && v[1] >= 6) return "Donut"; if (v[0] == 1 && v[1] >= 6) return "Donut";

View File

@ -1944,6 +1944,7 @@
os: os:
name: "Android" name: "Android"
version: "4.4.2" version: "4.4.2"
versionName: "KitKat"
platform: platform:
type: "tablet" type: "tablet"
vendor: "Nexus" vendor: "Nexus"
@ -1959,6 +1960,7 @@
os: os:
name: "Android" name: "Android"
version: "4.3" version: "4.3"
versionName: "Jelly Bean"
platform: platform:
type: "mobile" type: "mobile"
vendor: "Nexus" vendor: "Nexus"
@ -1974,6 +1976,7 @@
os: os:
name: "Android" name: "Android"
version: "4.2" version: "4.2"
versionName: "Jelly Bean"
platform: platform:
type: "tablet" type: "tablet"
vendor: "Nexus" vendor: "Nexus"
@ -1989,6 +1992,7 @@
os: os:
name: "Android" name: "Android"
version: "3.2" version: "3.2"
versionName: "Honeycomb"
platform: platform:
type: "tablet" type: "tablet"
engine: engine:
@ -2003,6 +2007,7 @@
os: os:
name: "Android" name: "Android"
version: "2.3.4" version: "2.3.4"
versionName: "Gingerbread"
platform: platform:
type: "mobile" type: "mobile"
engine: engine:
@ -2017,6 +2022,7 @@
os: os:
name: "Android" name: "Android"
version: "1.6" version: "1.6"
versionName: "Donut"
platform: platform:
type: "mobile" type: "mobile"
engine: engine:
@ -2254,6 +2260,7 @@
os: os:
name: "Android" name: "Android"
version: "4.1.2" version: "4.1.2"
versionName: "Jelly Bean"
platform: platform:
type: "tablet" type: "tablet"
engine: engine:
@ -2445,6 +2452,7 @@
os: os:
name: "Android" name: "Android"
version: "5.0.2" version: "5.0.2"
versionName: "Lollipop"
platform: platform:
type: "mobile" type: "mobile"
engine: engine:
@ -2474,6 +2482,7 @@
os: os:
name: "Android" name: "Android"
version: "6.0" version: "6.0"
versionName: "Marshmallow"
platform: platform:
type: "mobile" type: "mobile"
engine: engine:
@ -2488,6 +2497,7 @@
os: os:
name: "Android" name: "Android"
version: "7.1.1" version: "7.1.1"
versionName: "Nougat"
platform: platform:
type: "tablet" type: "tablet"
engine: engine: