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

chore(tests): fix tests for Firefox iOS

relevant to #401
This commit is contained in:
Denis Demchenko 2020-06-02 00:32:03 +03:00
parent 3813d92a55
commit 9edfabf98a
2 changed files with 41 additions and 27 deletions

View File

@ -532,12 +532,27 @@ const browsersList = [
}, },
}, },
{ {
test: [/firefox|iceweasel|fxios/i], test: [/fxios/i],
describe(ua) {
const browser = {
name: 'Firefox iOS',
};
const version = Utils.getFirstMatch(/(?:fxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
{
test: [/firefox|iceweasel/i],
describe(ua) { describe(ua) {
const browser = { const browser = {
name: 'Firefox', name: 'Firefox',
}; };
const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, ua); const version = Utils.getFirstMatch(/(?:firefox|iceweasel)[\s/](\d+(\.?_?\d+)+)/i, ua);
if (version) { if (version) {
browser.version = version; browser.version = version;

View File

@ -700,6 +700,7 @@
os: os:
name: "Android" name: "Android"
version: "7.0" version: "7.0"
versionName: "Nougat"
platform: platform:
type: "mobile" type: "mobile"
engine: engine:
@ -1805,22 +1806,6 @@
engine: engine:
name: "Gecko" name: "Gecko"
version: "20061014" version: "20061014"
-
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/3.0 Mobile/13E238 Safari/601.1.46"
spec:
browser:
name: "Firefox"
version: "3.0"
os:
name: "iOS"
version: "9.3.1"
platform:
type: "mobile"
vendor: "Apple"
model: "iPhone"
engine:
name: "WebKit"
version: "601.1.46"
- -
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0" ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0"
spec: spec:
@ -1837,15 +1822,14 @@
engine: engine:
name: "Gecko" name: "Gecko"
version: "20100101" version: "20100101"
- "Firefox iOS":
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Version/13.0.3 Safari/605.1.15" - ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Safari/605.1.15"
spec: spec:
browser: browser:
name: "Firefox" name: "Firefox iOS"
version: "21.0" version: "24.1"
os: os:
name: "iOS" name: "iOS"
version: "13.0.3"
platform: platform:
type: "tablet" type: "tablet"
vendor: "Apple" vendor: "Apple"
@ -1853,14 +1837,29 @@
engine: engine:
name: "WebKit" name: "WebKit"
version: "605.1.15" version: "605.1.15"
- - ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) FxiOS/3.0 Mobile/13E238 Safari/601.1.46"
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Safari/605.1.15"
spec: spec:
browser: browser:
name: "Firefox" name: "Firefox iOS"
version: "24.1" version: "3.0"
os: os:
name: "iOS" name: "iOS"
version: "9.3.1"
platform:
type: "mobile"
vendor: "Apple"
model: "iPhone"
engine:
name: "WebKit"
version: "601.1.46"
- ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/21.0 Version/13.0.3 Safari/605.1.15"
spec:
browser:
name: "Firefox iOS"
version: "21.0"
os:
name: "iOS"
version: "13.0.3"
platform: platform:
type: "tablet" type: "tablet"
vendor: "Apple" vendor: "Apple"