Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:Countly/countly-sdk-js into ligh…
Browse files Browse the repository at this point in the history
…tboat
  • Loading branch information
turtledreams committed Dec 21, 2023
2 parents de65bc1 + cd017c7 commit d63de03
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 315 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## 23.12.1
## 23.12.2

* Added Google Lighthouse to bot detection

## 23.12.1

* Added methods for bridged SDK usage

## 23.12.0

* Modularized the Web SDK
44 changes: 44 additions & 0 deletions cypress/e2e/bridged_utils.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* eslint-disable cypress/no-unnecessary-waiting */
/* eslint-disable require-jsdoc */
var Countly = require("../../Countly.js");
import { SDK_NAME, SDK_VERSION } from "../../modules/Constants.js";
// import * as Countly from "../../dist/countly_umd.js";
var hp = require("../support/helper.js");

function initMain(name, version) {
Countly.init({
app_key: "YOUR_APP_KEY",
url: "https://your.domain.count.ly",
test_mode: true,
debug: true,
sdk_name: name,
sdk_version: version
});
}


// tests
describe("Bridged SDK Utilities Tests", () => {
it("Check if we can override sdk name and version successful", () => {
hp.haltAndClearStorage(() => {
initMain('javascript_gtm_web', '24.0.0');
hp.events();
cy.fetch_local_request_queue().then((eq) => {
expect(eq).to.have.length(1);
expect(eq[0].sdk_name).to.equal("javascript_gtm_web");
expect(eq[0].sdk_version).to.equal("24.0.0");
});
});
});
it("Check if SDK uses default values if SDK name and version was not overriden", () => {
hp.haltAndClearStorage(() => {
initMain(undefined, undefined);
hp.events();
cy.fetch_local_request_queue().then((eq) => {
expect(eq).to.have.length(1);
expect(eq[0].sdk_name).to.equal(SDK_NAME);
expect(eq[0].sdk_version).to.equal(SDK_VERSION);
});
});
});
});
305 changes: 0 additions & 305 deletions cypress/e2e/views.cy copy.js

This file was deleted.

2 changes: 1 addition & 1 deletion modules/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var healthCheckCounterEnum = Object.freeze({
errorMessage: "cly_hc_error_message",
});

var SDK_VERSION = "23.6.3";
var SDK_VERSION = "23.12.2";
var SDK_NAME = "javascript_native_web";

// Using this on document.referrer would return an array with 15 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more)
Expand Down
Loading

0 comments on commit d63de03

Please sign in to comment.