Skip to content

Commit 07152c3

Browse files
authored
Merge pull request #571 from Countly/staging
Staging 25.4.1
2 parents f2524ed + ed8cb72 commit 07152c3

14 files changed

+2141
-548
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
## 25.4.1
2+
3+
- Added automatic backoff mechanism which delays sending requests if server seems busy
4+
- Added `disable_sdk_behavior_settings_updates` init method for disabling Server Configuration sync requests
5+
- Added `disable_backoff_mechanism` init method for disabling backoff mechanism
6+
- Added timezone support for server
7+
8+
## 25.4.0
9+
10+
- ! Minor Breaking Change ! SDK now has Server Configuration feature and it is enabled by default. Changes made on SDK Manager > SDK Configuration on your server will affect SDK behavior directly.
11+
12+
- Mitigated an issue about orientation detection in Safari
13+
14+
- Improved init time Content Zone logic
15+
- Improved error handler to include script loading issues
16+
- Improved the wrapper of Feedback Widgets
17+
18+
- Added `refreshContentZone` method to Content interface for refreshing Content Zone requests
19+
- Added `behavior_settings` init time method for providing server configuration during first initialization
20+
- Added `content_whitelist` init time method that lets you whitelist your other domains for displaying Content
21+
22+
- `max_logs` config option value will not be used anymore (use `max_breadcrumb_count` instead)
23+
124
## 25.1.0
225

326
- Improved orientation reporting precision.

cypress.config.js

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,71 @@ const { defineConfig } = require('cypress')
22
module.exports = defineConfig({
33
e2e: {
44
setupNodeEvents(on, config) {
5-
// implement node event listeners here
5+
6+
// Include any other plugin code...
7+
const http = require('http');
8+
let server = null;
9+
let responseDelay = 0;
10+
let requests = [];
11+
12+
on('task', {
13+
startServer() {
14+
return new Promise((resolve) => {
15+
requests = [];
16+
server = http.createServer((req, res) => {
17+
res.setHeader('Access-Control-Allow-Origin', '*');
18+
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,OPTIONS');
19+
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
20+
21+
if (req.method === 'OPTIONS') {
22+
res.writeHead(204);
23+
return res.end();
24+
}
25+
26+
let body = '';
27+
req.on('data', chunk => { body += chunk; });
28+
req.on('end', () => {
29+
requests.push({ method: req.method, url: req.url, headers: req.headers, body });
30+
setTimeout(() => {
31+
res.writeHead(200, { 'Content-Type': 'application/json' });
32+
res.end(JSON.stringify({ result: 'Success' }));
33+
}, responseDelay);
34+
});
35+
});
36+
server.listen(9000, () => {
37+
console.log('Test server running on http://localhost:9000');
38+
resolve(null);
39+
});
40+
});
41+
},
42+
stopServer() {
43+
return new Promise((resolve) => {
44+
if (server) {
45+
server.close(() => {
46+
requests = [];
47+
console.log('Test server stopped');
48+
resolve(null);
49+
});
50+
} else {
51+
resolve(null);
52+
}
53+
});
54+
},
55+
setResponseDelay(ms) {
56+
responseDelay = ms;
57+
return null;
58+
},
59+
getRequests() {
60+
return requests;
61+
},
62+
clearRequests() {
63+
requests = [];
64+
return null;
65+
},
66+
});
67+
68+
// IMPORTANT: Return the config object with any changed environment variables
69+
return config;
670
},
771
},
872
userAgent: "abcd",

cypress/e2e/bridged_utils.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function initMain(name, version) {
1515
}
1616

1717
const SDK_NAME = "javascript_native_web";
18-
const SDK_VERSION = "25.1.0";
18+
const SDK_VERSION = "25.4.1";
1919

2020
// tests
2121
describe("Bridged SDK Utilities Tests", () => {

0 commit comments

Comments
 (0)