Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 25.4.1

- Added automatic backoff mechanism which delays sending requests if server seems busy
- Added `disable_sdk_behavior_settings_updates` init method for disabling Server Configuration sync requests
- Added `disable_backoff_mechanism` init method for disabling backoff mechanism
- Added timezone support for server

## 25.4.0

- ! 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.

- Mitigated an issue about orientation detection in Safari

- Improved init time Content Zone logic
- Improved error handler to include script loading issues
- Improved the wrapper of Feedback Widgets

- Added `refreshContentZone` method to Content interface for refreshing Content Zone requests
- Added `behavior_settings` init time method for providing server configuration during first initialization
- Added `content_whitelist` init time method that lets you whitelist your other domains for displaying Content

- `max_logs` config option value will not be used anymore (use `max_breadcrumb_count` instead)

## 25.1.0

- Improved orientation reporting precision.
Expand Down
66 changes: 65 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,71 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here

// Include any other plugin code...
const http = require('http');
let server = null;
let responseDelay = 0;
let requests = [];

on('task', {
startServer() {
return new Promise((resolve) => {
requests = [];
server = http.createServer((req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');

if (req.method === 'OPTIONS') {
res.writeHead(204);
return res.end();
}

let body = '';
req.on('data', chunk => { body += chunk; });
req.on('end', () => {
requests.push({ method: req.method, url: req.url, headers: req.headers, body });
setTimeout(() => {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ result: 'Success' }));
}, responseDelay);
});
});
server.listen(9000, () => {
console.log('Test server running on http://localhost:9000');
resolve(null);
});
});
},
stopServer() {
return new Promise((resolve) => {
if (server) {
server.close(() => {
requests = [];
console.log('Test server stopped');
resolve(null);
});
} else {
resolve(null);
}
});
},
setResponseDelay(ms) {
responseDelay = ms;
return null;
},
getRequests() {
return requests;
},
clearRequests() {
requests = [];
return null;
},
});

// IMPORTANT: Return the config object with any changed environment variables
return config;
},
},
userAgent: "abcd",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/bridged_utils.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function initMain(name, version) {
}

const SDK_NAME = "javascript_native_web";
const SDK_VERSION = "25.1.0";
const SDK_VERSION = "25.4.1";

// tests
describe("Bridged SDK Utilities Tests", () => {
Expand Down
Loading
Loading