Skip to content

Commit 5d340fb

Browse files
committed
ci: Update BrowserStack browsers list we test on
1 parent 973cfde commit 5d340fb

File tree

6 files changed

+76
-28
lines changed

6 files changed

+76
-28
lines changed

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"test:integration": "test/integration/run.js",
7878
"test:integration:watch": "test/integration/run.js --watch",
7979
"test:integration:checkbrowsers": "node scripts/checkbrowsers.js",
80-
"test:manual": "node test/manual/npm-build.js && rm test/manual/tmp.js",
80+
"test:package": "node test/package/npm-build.js && rm test/package/tmp.js",
8181
"size:check": "run-p size:check:es5 size:check:es6",
8282
"size:check:es5": "cat build/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",
8383
"size:check:es6": "cat build/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'",

packages/browser/test/integration/browsers.js

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,81 @@
44
module.exports = {
55
bs_android_4: {
66
base: "BrowserStack",
7-
browser: "Android Browser",
8-
device: "Google Nexus 5",
7+
browser: "Android",
8+
device: "Samsung Galaxy Note 4",
99
os: "android",
1010
os_version: "4.4",
1111
real_mobile: true,
1212
browser_version: null,
1313
},
1414
bs_android_5: {
1515
base: "BrowserStack",
16-
browser: "Android Browser",
17-
device: "Google Nexus 9",
16+
browser: "Android",
17+
device: "Samsung Galaxy S6",
1818
os: "android",
19-
os_version: "5.1",
19+
os_version: "5.0",
2020
real_mobile: true,
2121
browser_version: null,
2222
},
2323
bs_android_6: {
2424
base: "BrowserStack",
25-
browser: "Android Browser",
26-
device: "Samsung Galaxy S7",
25+
browser: "Android",
26+
device: "Samsung Galaxy Note 4",
2727
os: "android",
2828
os_version: "6.0",
2929
real_mobile: true,
3030
browser_version: null,
3131
},
3232
bs_android_7: {
3333
base: "BrowserStack",
34-
browser: "Android Browser",
35-
device: "Samsung Galaxy S8",
34+
browser: "Android",
35+
device: "Samsung Galaxy Note 8",
3636
os: "android",
37-
os_version: "7.0",
37+
os_version: "7.1",
3838
real_mobile: true,
3939
browser_version: null,
4040
},
4141
bs_android_8: {
4242
base: "BrowserStack",
43-
browser: "Android Browser",
44-
device: "Samsung Galaxy S9",
43+
browser: "Android",
44+
device: "Samsung Galaxy Note 9",
4545
os: "android",
46-
os_version: "8.0",
46+
os_version: "8.1",
4747
real_mobile: true,
4848
browser_version: null,
4949
},
5050
bs_android_9: {
5151
base: "BrowserStack",
52-
browser: "Android Browser",
53-
device: "Samsung Galaxy S9 Plus",
52+
browser: "Android",
53+
device: "Samsung Galaxy Note 10 Plus",
5454
os: "android",
5555
os_version: "9.0",
5656
real_mobile: true,
5757
browser_version: null,
5858
},
59-
bs_ios_11: {
59+
bs_android_10: {
60+
base: "BrowserStack",
61+
browser: "Android",
62+
device: "Google Pixel 4 XL",
63+
os: "android",
64+
os_version: "10.0",
65+
real_mobile: true,
66+
},
67+
bs_ios_12: {
6068
base: "BrowserStack",
6169
browser: "Mobile Safari",
62-
device: "iPhone 6",
70+
device: "iPhone XS",
6371
os: "ios",
64-
os_version: "11.4",
72+
os_version: "12",
6573
real_mobile: true,
6674
browser_version: null,
6775
},
68-
bs_ios_12: {
76+
bs_ios_13: {
6977
base: "BrowserStack",
7078
browser: "Mobile Safari",
71-
device: "iPhone 8",
79+
device: "iPhone 11",
7280
os: "ios",
73-
os_version: "12.1",
81+
os_version: "13",
7482
real_mobile: true,
7583
browser_version: null,
7684
},
@@ -97,9 +105,7 @@ module.exports = {
97105
browser: "Safari",
98106
browser_version: "latest",
99107
os: "OS X",
100-
os_version: "Mojave",
101-
device: null,
102-
real_mobile: null,
108+
os_version: "Catalina",
103109
},
104110
bs_edge: {
105111
base: "BrowserStack",

packages/browser/test/integration/karma.conf.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ const isLocalRun =
88
const customLaunchers = isLocalRun ? {} : require("./browsers.js");
99
const browsers = isLocalRun ? ["ChromeHeadless"] : Object.keys(customLaunchers);
1010

11+
// NOTE: It "should" work as a global `build` config option, but it doesn't, so setting it up
12+
// for each browser here, so that we have a nice distinction of when the tests were run exactly.
13+
if (!isLocalRun) {
14+
for (const browser in customLaunchers) {
15+
customLaunchers[browser].build = process.env.TRAVIS_BUILD_NUMBER
16+
? `Travis: ${process.env.TRAVIS_BUILD_NUMBER}`
17+
: `Manual: ${new Date().toLocaleString()}`;
18+
}
19+
}
20+
1121
const plugins = [
1222
"karma-mocha",
1323
"karma-chai",
@@ -76,7 +86,6 @@ module.exports = config => {
7686
ui: "bdd",
7787
},
7888
},
79-
build: process.env.TRAVIS_BUILD_NUMBER || Date.now(),
8089
concurrency: isLocalRun ? 1 : 2,
8190
retryLimit: 5,
8291
browserDisconnectTolerance: 5,

packages/browser/test/integration/suites/breadcrumbs.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,39 @@ describe("breadcrumbs", function() {
2424
}
2525
);
2626

27+
it(
28+
optional(
29+
"should record an XMLHttpRequest with a handler attached after send was called",
30+
IS_LOADER
31+
),
32+
function() {
33+
return runInSandbox(sandbox, { manual: true }, function() {
34+
var xhr = new XMLHttpRequest();
35+
xhr.open("GET", "/base/subjects/example.json");
36+
xhr.send();
37+
xhr.onreadystatechange = function() {
38+
window.handlerCalled = true;
39+
};
40+
waitForXHR(xhr, function() {
41+
Sentry.captureMessage("test");
42+
window.finalizeManualTest();
43+
});
44+
}).then(function(summary) {
45+
// The async loader doesn't wrap XHR
46+
if (IS_LOADER) {
47+
return;
48+
}
49+
assert.equal(summary.breadcrumbs.length, 1);
50+
assert.equal(summary.breadcrumbs[0].type, "http");
51+
assert.equal(summary.breadcrumbs[0].category, "xhr");
52+
assert.equal(summary.breadcrumbs[0].data.method, "GET");
53+
assert.typeOf(summary.breadcrumbs[0].timestamp, "number");
54+
assert.isTrue(summary.window.handlerCalled);
55+
delete summary.window.handlerCalled;
56+
});
57+
}
58+
);
59+
2760
it(
2861
optional(
2962
"should record an XMLHttpRequest without any handlers set",

packages/utils/src/instrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function instrumentXHR(): void {
230230
...commonHandlerData,
231231
});
232232

233-
xhr.addEventListener('readystatechange', function() {
233+
xhr.addEventListener('readystatechange', function(): void {
234234
if (xhr.readyState === 4) {
235235
try {
236236
// touching statusCode in some platforms throws

scripts/browser-integration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ yarn
66
yarn build
77
cd packages/browser
88
yarn test:integration
9-
yarn test:manual
9+
yarn test:package
1010

0 commit comments

Comments
 (0)