countly-sdk-web 22.2.4 → 22.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -4
- package/.eslintrc.js +3 -1
- package/.github/dependabot.yml +30 -12
- package/.markdownlint.json +52 -0
- package/.markdownlintignore +1 -0
- package/.stylelintrc.json +3 -0
- package/CHANGELOG.md +20 -14
- package/README.md +11 -21
- package/countly-sdk-web-22.06.0.tgz +0 -0
- package/cypress/.eslintrc.js +4 -2
- package/cypress/integration/consents.js +12 -12
- package/cypress/integration/device_id.js +1 -3
- package/cypress/integration/events.js +4 -4
- package/cypress/integration/internal_limits.js +8 -8
- package/cypress/integration/sessions.js +2 -2
- package/cypress/integration/user_details.js +2 -2
- package/cypress/support/commands.js +12 -13
- package/cypress/support/helper.js +1 -3
- package/cypress/support/integration_helper.js +2 -0
- package/examples/Angular/.browserslistrc +17 -0
- package/examples/Angular/.editorconfig +16 -0
- package/examples/Angular/README.md +27 -0
- package/examples/Angular/angular.json +106 -0
- package/examples/Angular/karma.conf.js +47 -0
- package/examples/Angular/package.json +39 -0
- package/examples/Angular/src/app/app.component.css +0 -0
- package/examples/Angular/src/app/app.component.html +11 -0
- package/examples/Angular/src/app/app.component.spec.ts +31 -0
- package/examples/Angular/src/app/app.component.ts +10 -0
- package/examples/Angular/src/app/app.module.ts +16 -0
- package/examples/Angular/src/assets/.gitkeep +0 -0
- package/examples/Angular/src/assets/logo.png +0 -0
- package/examples/{mpa → Angular/src/assets}/team_countly.jpg +0 -0
- package/examples/Angular/src/environments/environment.prod.ts +3 -0
- package/examples/Angular/src/environments/environment.ts +16 -0
- package/examples/Angular/src/favicon.ico +0 -0
- package/examples/Angular/src/index.html +49 -0
- package/examples/Angular/src/main.ts +12 -0
- package/examples/Angular/src/polyfills.ts +65 -0
- package/examples/Angular/src/styles.css +1 -0
- package/examples/Angular/src/test.ts +27 -0
- package/examples/Angular/tsconfig.app.json +15 -0
- package/examples/Angular/tsconfig.json +30 -0
- package/examples/Angular/tsconfig.spec.json +18 -0
- package/examples/README.md +10 -0
- package/examples/example_apm.html +58 -44
- package/examples/example_async.html +59 -46
- package/examples/example_fb.html +49 -35
- package/examples/example_formdata.html +52 -38
- package/examples/example_ga_adapter.html +182 -166
- package/examples/example_gdpr.html +86 -72
- package/examples/example_helpers.html +82 -68
- package/examples/example_multiple_instances.html +61 -47
- package/examples/example_opt_out.html +75 -60
- package/examples/example_rating_widgets.html +49 -75
- package/examples/example_remote_config.html +47 -31
- package/examples/example_sync.html +45 -30
- package/examples/examples_feedback_widgets.html +45 -70
- package/examples/images/logo.png +0 -0
- package/examples/images/team_countly.jpg +0 -0
- package/examples/mpa/dummy_users.js +86 -0
- package/examples/mpa/helper_functions.js +182 -0
- package/examples/mpa/index.html +445 -788
- package/examples/react/README.md +9 -14
- package/examples/react/package.json +8 -8
- package/examples/react/src/Components/Header.js +1 -1
- package/examples/react/src/Components/styles.css +16 -16
- package/examples/react/src/index.css +6 -6
- package/examples/react/src/serviceWorker.js +1 -1
- package/examples/style/style.css +250 -0
- package/examples/symbolication/README.md +2 -3
- package/examples/symbolication/package.json +8 -8
- package/examples/symbolication/webpack.config.js +1 -1
- package/generateDocs.sh +2 -2
- package/lib/countly.js +14 -17
- package/lib/countly.min.js +81 -82
- package/package.json +5 -2
- package/plugin/boomerang/boomerang.min.js +2 -2
- package/plugin/boomerang/countly_boomerang.js +18 -16
- package/plugin/ga_adapter/doc.md +15 -10
- package/plugin/ga_adapter/ga_adapter.js +155 -152
- package/countly-sdk-web-22.02.4.tgz +0 -0
- package/examples/example_internal_limits.html +0 -184
- package/examples/mpa/boomerang/boomerang-1.0.0.js +0 -22871
- package/examples/mpa/boomerang/countly_boomerang.js +0 -139
- package/plugin/boomerang/boomerang-1.0.0.js +0 -22871
package/.eslintignore
CHANGED
package/.eslintrc.js
CHANGED
package/.github/dependabot.yml
CHANGED
|
@@ -5,16 +5,34 @@ updates:
|
|
|
5
5
|
schedule:
|
|
6
6
|
interval: daily
|
|
7
7
|
open-pull-requests-limit: 10
|
|
8
|
+
reviewers:
|
|
9
|
+
- turtledreams
|
|
10
|
+
assignees:
|
|
11
|
+
- turtledreams
|
|
12
|
+
labels:
|
|
13
|
+
- dependencies
|
|
14
|
+
versioning-strategy: increase-if-necessary
|
|
15
|
+
- package-ecosystem: npm
|
|
16
|
+
directory: "/examples/symbolication/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: daily
|
|
19
|
+
open-pull-requests-limit: 10
|
|
20
|
+
reviewers:
|
|
21
|
+
- turtledreams
|
|
22
|
+
assignees:
|
|
23
|
+
- turtledreams
|
|
24
|
+
labels:
|
|
25
|
+
- dependencies
|
|
26
|
+
versioning-strategy: increase-if-necessary
|
|
27
|
+
- package-ecosystem: npm
|
|
28
|
+
directory: "/examples/react/"
|
|
29
|
+
schedule:
|
|
30
|
+
interval: daily
|
|
31
|
+
open-pull-requests-limit: 10
|
|
32
|
+
reviewers:
|
|
33
|
+
- turtledreams
|
|
34
|
+
assignees:
|
|
35
|
+
- turtledreams
|
|
36
|
+
labels:
|
|
37
|
+
- dependencies
|
|
8
38
|
versioning-strategy: increase-if-necessary
|
|
9
|
-
ignore:
|
|
10
|
-
- dependency-name: webpack
|
|
11
|
-
versions:
|
|
12
|
-
- 5.18.0
|
|
13
|
-
- 5.19.0
|
|
14
|
-
- 5.20.0
|
|
15
|
-
- 5.20.1
|
|
16
|
-
- 5.20.2
|
|
17
|
-
- 5.21.2
|
|
18
|
-
- 5.22.0
|
|
19
|
-
- 5.23.0
|
|
20
|
-
- 5.24.0
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"MD001": true,
|
|
3
|
+
"MD002": false,
|
|
4
|
+
"MD003": true,
|
|
5
|
+
"MD004": true,
|
|
6
|
+
"MD005": true,
|
|
7
|
+
"MD006": true,
|
|
8
|
+
"MD007": { "indent": 2 },
|
|
9
|
+
"MD009": false,
|
|
10
|
+
"MD010": false,
|
|
11
|
+
"MD011": true,
|
|
12
|
+
"MD012": { "maximum": 1 },
|
|
13
|
+
"MD013": { "line_length": 300 },
|
|
14
|
+
"MD014": false,
|
|
15
|
+
"MD018": true,
|
|
16
|
+
"MD019": true,
|
|
17
|
+
"MD020": true,
|
|
18
|
+
"MD021": true,
|
|
19
|
+
"MD022": false,
|
|
20
|
+
"MD023": true,
|
|
21
|
+
"MD024": true,
|
|
22
|
+
"MD025": true,
|
|
23
|
+
"MD026": true,
|
|
24
|
+
"MD027": true,
|
|
25
|
+
"MD028": true,
|
|
26
|
+
"MD029": true,
|
|
27
|
+
"MD030": true,
|
|
28
|
+
"MD031": true,
|
|
29
|
+
"MD032": false,
|
|
30
|
+
"MD033": false,
|
|
31
|
+
"MD034": false,
|
|
32
|
+
"MD035": true,
|
|
33
|
+
"MD036": true,
|
|
34
|
+
"MD037": true,
|
|
35
|
+
"MD038": true,
|
|
36
|
+
"MD039": true,
|
|
37
|
+
"MD040": true,
|
|
38
|
+
"MD041": false,
|
|
39
|
+
"MD042": true,
|
|
40
|
+
"MD043": false,
|
|
41
|
+
"MD044": true,
|
|
42
|
+
"MD045": true,
|
|
43
|
+
"MD046": true,
|
|
44
|
+
"MD047": true,
|
|
45
|
+
"MD048": true,
|
|
46
|
+
"MD049": true,
|
|
47
|
+
"MD050": true,
|
|
48
|
+
"MD051": true,
|
|
49
|
+
"MD052": true,
|
|
50
|
+
"MD053": true
|
|
51
|
+
}
|
|
52
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/node_modules/
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
## 22.06.0
|
|
2
|
+
- Updated BoomerangJS to the latest version (1.737.0)
|
|
3
|
+
- Implemented static code analysis recommendations from Codacy, Snyk and Deep Scan
|
|
4
|
+
- Added an Angular integration example
|
|
5
|
+
|
|
1
6
|
## 22.02.4
|
|
2
7
|
- Fixed logs that did not obey to the 'debug' flag
|
|
8
|
+
|
|
3
9
|
## 22.02.3
|
|
4
10
|
- Added support for userAgentData
|
|
5
11
|
- Now heatmap scroll event is recorded when leaving a view
|
|
@@ -37,28 +43,28 @@
|
|
|
37
43
|
|
|
38
44
|
## 21.11.0
|
|
39
45
|
- !! Major breaking change !! Rating and Feedback widgets now require 'star-rating' or 'feedback' consent exclusively, according to their type, instead of both:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
- `present_feedback_widget` needs 'feedback' consent only
|
|
47
|
+
- `get_available_feedback_widgets` needs 'feedback' consent only
|
|
48
|
+
- `enable_feedback` needs 'star-rating' consent only
|
|
49
|
+
- `show_feedback_popup` needs 'star-rating' consent only
|
|
50
|
+
- `initialize_feedback_popups` needs 'star-rating' consent only
|
|
51
|
+
- `report_feedback` needs 'star-rating' consent only
|
|
46
52
|
- !! Major breaking change !! Enabling offline mode or changing device ID without merging will now clear the current consent. Consent has to be given again after performing this action.
|
|
47
53
|
- ! Minor breaking change ! 'change_id' will now not accept invalid device ID values. It will now reject null, undefined, values that are not of the type string and empty string values.
|
|
48
54
|
- ! Minor breaking change ! Multiple values now have a default limit adjustable at initialization:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
- Maximum size of all string keys is now 128 characters by default.
|
|
56
|
+
- Maximum size of all values in key-value pairs is now 256 characters by default.
|
|
57
|
+
- Maximum amount of segmentation in one event is mow 30 key-value pairs by default.
|
|
58
|
+
- Maximum amount of breadcrumbs that can be recorded at once is now 100 by default.
|
|
59
|
+
- Maximum stack trace lines per thread is now 30 by default.
|
|
60
|
+
- Maximum stack trace line length is now 200 by default.
|
|
55
61
|
- Bug Fix - Fixed a bug where duration counter/timer was not paused even when the browser was out of focus
|
|
56
62
|
- Deprecating `report_feedback`, now it redirects to `recordRatingWidgetWithID`
|
|
57
63
|
- Deprecating `show_feedback_popup`, now it redirects to `presentRatingWidgetWithID`
|
|
58
64
|
- Deprecating `initialize_feedback_popups`, now it redirects to `initializeRatingWidgets`
|
|
59
65
|
- Deprecating `enable_feedback`, now it redirects to `enableRatingWidgets`
|
|
60
66
|
- Deprecating `report_conversion`, now it redirects to `recordDirectAttribution`
|
|
61
|
-
- When recording internal events with 'add_event', the respective feature consent will now be checked instead of the 'events' consent.
|
|
67
|
+
- When recording internal events with 'add_event', the respective feature consent will now be checked instead of the 'events' consent.
|
|
62
68
|
- Increased the default max event batch size to 100.
|
|
63
69
|
- Automatic orientation tracking is now enabled by default. It can be turned off during init.
|
|
64
70
|
- Device ID can now be changed when no consent is given
|
|
@@ -150,7 +156,7 @@
|
|
|
150
156
|
|
|
151
157
|
## 18.08.2
|
|
152
158
|
- Important Fix for regenerated device_id
|
|
153
|
-
|
|
159
|
+
- Update to this version if you use 18.08 or 18.08.1.
|
|
154
160
|
- Fixed storing none json data
|
|
155
161
|
- Widgets params changed as popups and back-compatibility provided.
|
|
156
162
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Countly Web SDK
|
|
1
|
+
# Countly Web SDK
|
|
2
2
|
[](https://www.codacy.com/gh/Countly/countly-sdk-web/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Countly/countly-sdk-web&utm_campaign=Badge_Grade) [](https://badge.fury.io/js/countly-sdk-web) [](https://www.jsdelivr.com/package/npm/countly-sdk-web)
|
|
3
3
|
|
|
4
4
|
## What is Countly?
|
|
@@ -10,14 +10,12 @@ Track, measure, and take action - all without leaving Countly.
|
|
|
10
10
|
* **Questions?** [Ask in our Community forum](https://support.count.ly/hc/en-us/community/topics)
|
|
11
11
|
|
|
12
12
|
## Implementing Countly SDK in your web pages
|
|
13
|
-
|
|
14
13
|
There are 3 ways to get Countly SDK.
|
|
15
14
|
|
|
16
15
|
### 1. Available with Countly server
|
|
17
16
|
Since Countly server 16.02, Countly Web SDK is available in your Countly server installation in `countly/frontend/express/public/sdk/web/countly.min.js` which should be available through URL as `https://yourserver.com/sdk/web/countly.min.js`
|
|
18
17
|
|
|
19
18
|
### 2. Installation using package managers
|
|
20
|
-
|
|
21
19
|
bower install countly-sdk-web
|
|
22
20
|
or
|
|
23
21
|
|
|
@@ -25,19 +23,17 @@ or
|
|
|
25
23
|
or
|
|
26
24
|
|
|
27
25
|
yarn add countly-sdk-web
|
|
28
|
-
|
|
29
|
-
### 3. Use a CDN (content delivery network)
|
|
30
26
|
|
|
27
|
+
### 3. Use a CDN (content delivery network)
|
|
31
28
|
Countly web SDK is available on CDNJS. Use either
|
|
32
29
|
|
|
33
|
-
[https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.
|
|
30
|
+
[https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.06.0/countly.min.js](https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.06.0/countly.min.js)
|
|
34
31
|
|
|
35
32
|
or
|
|
36
33
|
|
|
37
34
|
[https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/lib/countly.min.js](https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/lib/countly.min.js)
|
|
38
35
|
|
|
39
36
|
## How to use Countly Web SDK?
|
|
40
|
-
|
|
41
37
|
Link to the script and call helper methods based on what you want to track: sessions, views, clicks, custom events, user data, etc. and for much more information check out our documentation at [https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript-](https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript-)
|
|
42
38
|
|
|
43
39
|
You can reach minimal integration info for your website from here [https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript-#minimal-setup](https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript-#minimal-setup)
|
|
@@ -45,30 +41,26 @@ You can reach minimal integration info for your website from here [https://suppo
|
|
|
45
41
|
Countly Web SDK has JSDoc3 compatible comments and you can generate documentation by running `npm run-script docs` or access online version at [https://countly.github.io/countly-sdk-web/](https://countly.github.io/countly-sdk-web/)
|
|
46
42
|
|
|
47
43
|
## Security
|
|
48
|
-
|
|
49
44
|
Security is very important to us. If you discover any issue regarding security, please disclose the information responsibly by sending an email to security@count.ly and **not by creating a GitHub issue**.
|
|
50
45
|
|
|
51
46
|
## Other Github resources
|
|
47
|
+
Check Countly Community Edition source code here:
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- [Countly Server](https://github.com/Countly/countly-server)
|
|
49
|
+
* [Countly Server](https://github.com/Countly/countly-server)
|
|
56
50
|
|
|
57
51
|
There are also other Countly SDK repositories below:
|
|
58
52
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
* [Countly iOS SDK](https://github.com/Countly/countly-sdk-ios)
|
|
54
|
+
* [Countly Android SDK](https://github.com/Countly/countly-sdk-android)
|
|
55
|
+
* [Countly Windows Phone SDK](https://github.com/Countly/countly-sdk-windows-phone)
|
|
56
|
+
* [Countly Appcelerator Titanium SDK](https://github.com/euforic/Titanium-Count.ly) (Community supported)
|
|
57
|
+
* [Countly Unity3D SDK](https://github.com/Countly/countly-sdk-unity) (Community supported)
|
|
64
58
|
|
|
65
59
|
## How can I help you with your efforts?
|
|
66
|
-
|
|
67
60
|
Glad you asked. We need ideas, feedbacks and constructive comments. All your suggestions will be taken care with upmost importance. We are on [Twitter](http://twitter.com/gocountly) and [Facebook](https://www.facebook.com/Countly) if you would like to keep up with our fast progress!
|
|
68
61
|
|
|
69
62
|
## Badges
|
|
70
|
-
|
|
71
|
-
If you like Countly, [why not use one of our badges](https://count.ly/brand-assets) and give a link back to us, so others know about this wonderful platform?
|
|
63
|
+
If you like Countly, [why not use one of our badges](https://count.ly/brand-assets) and give a link back to us, so others know about this wonderful platform?
|
|
72
64
|
|
|
73
65
|
<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/dark.svg?v2" alt="Countly - Product Analytics" /></a>
|
|
74
66
|
|
|
@@ -79,8 +71,6 @@ If you like Countly, [why not use one of our badges](https://count.ly/brand-asse
|
|
|
79
71
|
<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/light.svg" alt="Countly - Product Analytics" /></a>
|
|
80
72
|
|
|
81
73
|
## Support
|
|
82
|
-
|
|
83
74
|
For a public community support page, visit [https://support.count.ly/hc/en-us/community/topics](https://support.count.ly/hc/en-us/community/topics "Countly Community Forum").
|
|
84
75
|
|
|
85
76
|
[](https://nodei.co/npm/countly-sdk-web/)
|
|
86
|
-
|
|
Binary file
|
package/cypress/.eslintrc.js
CHANGED
|
@@ -11,7 +11,9 @@ module.exports = {
|
|
|
11
11
|
"cypress/assertion-before-screenshot": "warn",
|
|
12
12
|
"cypress/no-force": "warn",
|
|
13
13
|
"cypress/no-async-tests": "error",
|
|
14
|
-
"cypress/no-pause": "error"
|
|
14
|
+
"cypress/no-pause": "error",
|
|
15
|
+
"comma-dangle": ["error", "never"],
|
|
16
|
+
"no-multiple-empty-lines": [2, { max: 1, maxEOF: 0 }]
|
|
15
17
|
},
|
|
16
18
|
env: {
|
|
17
19
|
"cypress/globals": true
|
|
@@ -19,5 +21,5 @@ module.exports = {
|
|
|
19
21
|
extends: [
|
|
20
22
|
"plugin:cypress/recommended",
|
|
21
23
|
"plugin:chai-friendly/recommended"
|
|
22
|
-
]
|
|
24
|
+
]
|
|
23
25
|
};
|
|
@@ -21,44 +21,44 @@ const eventArray = [
|
|
|
21
21
|
key: "a",
|
|
22
22
|
count: 1,
|
|
23
23
|
segmentation: {
|
|
24
|
-
1: "1"
|
|
25
|
-
}
|
|
24
|
+
1: "1"
|
|
25
|
+
}
|
|
26
26
|
},
|
|
27
27
|
// rest can be internal events
|
|
28
28
|
{
|
|
29
29
|
key: "[CLY]_view",
|
|
30
30
|
count: 2,
|
|
31
31
|
segmentation: {
|
|
32
|
-
2: "2"
|
|
33
|
-
}
|
|
32
|
+
2: "2"
|
|
33
|
+
}
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
key: "[CLY]_nps",
|
|
37
37
|
count: 3,
|
|
38
38
|
segmentation: {
|
|
39
|
-
3: "3"
|
|
40
|
-
}
|
|
39
|
+
3: "3"
|
|
40
|
+
}
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
key: "[CLY]_survey",
|
|
44
44
|
count: 4,
|
|
45
45
|
segmentation: {
|
|
46
|
-
4: "4"
|
|
47
|
-
}
|
|
46
|
+
4: "4"
|
|
47
|
+
}
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
key: "[CLY]_star_rating",
|
|
51
51
|
count: 5,
|
|
52
52
|
segmentation: {
|
|
53
|
-
5: "5"
|
|
54
|
-
}
|
|
53
|
+
5: "5"
|
|
54
|
+
}
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
key: "[CLY]_orientation",
|
|
58
58
|
count: 6,
|
|
59
59
|
segmentation: {
|
|
60
|
-
6: "6"
|
|
61
|
-
}
|
|
60
|
+
6: "6"
|
|
61
|
+
}
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
64
|
// event adding loop
|
|
@@ -117,7 +117,6 @@ function checkRequestsForT(queue, expectedInternalType) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
121
120
|
/**
|
|
122
121
|
*device ID type:
|
|
123
122
|
*0 - device ID was set by the developer during init
|
|
@@ -129,7 +128,7 @@ var DeviceIdTypeInternalEnumsTest = {
|
|
|
129
128
|
DEVELOPER_SUPPLIED: 0,
|
|
130
129
|
SDK_GENERATED: 1,
|
|
131
130
|
TEMPORARY_ID: 2,
|
|
132
|
-
URL_PROVIDED: 3
|
|
131
|
+
URL_PROVIDED: 3
|
|
133
132
|
};
|
|
134
133
|
describe("Device Id tests during first init", ()=>{
|
|
135
134
|
// sdk is initialized w/o custom device id, w/o offline mode, w/o utm device id
|
|
@@ -1082,4 +1081,3 @@ describe("Device Id tests during first init", ()=>{
|
|
|
1082
1081
|
});
|
|
1083
1082
|
});
|
|
1084
1083
|
});
|
|
1085
|
-
|
|
@@ -21,8 +21,8 @@ const eventObj = {
|
|
|
21
21
|
dur: 1000,
|
|
22
22
|
segmentation: {
|
|
23
23
|
app_version: "1.0",
|
|
24
|
-
country: "Tahiti"
|
|
25
|
-
}
|
|
24
|
+
country: "Tahiti"
|
|
25
|
+
}
|
|
26
26
|
};
|
|
27
27
|
// a timed event object
|
|
28
28
|
const timedEventObj = {
|
|
@@ -30,8 +30,8 @@ const timedEventObj = {
|
|
|
30
30
|
count: 1,
|
|
31
31
|
segmentation: {
|
|
32
32
|
app_version: "1.0",
|
|
33
|
-
country: "Tahiti"
|
|
34
|
-
}
|
|
33
|
+
country: "Tahiti"
|
|
34
|
+
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
describe("Events tests ", () => {
|
|
@@ -24,11 +24,11 @@ function initMain() {
|
|
|
24
24
|
max_segmentation_values: limits.segment, // set maximum segmentation number here
|
|
25
25
|
max_breadcrumb_count: limits.breadcrumb, // set maximum number of logs that will be stored before erasing old ones
|
|
26
26
|
max_stack_trace_lines_per_thread: limits.line_thread, // set maximum number of lines for stack trace
|
|
27
|
-
max_stack_trace_line_length: limits.line_length
|
|
27
|
+
max_stack_trace_line_length: limits.line_length // set maximum length of a line for stack
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
const error = {
|
|
31
|
-
stack: "Lorem ipsum dolor sit amet,\n consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut labore et dolore magna\n aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id\n est laborum."
|
|
31
|
+
stack: "Lorem ipsum dolor sit amet,\n consectetur adipiscing elit, sed do eiusmod tempor\n incididunt ut labore et dolore magna\n aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n Duis aute irure dolor in reprehenderit in voluptate\n velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia\n deserunt mollit anim id\n est laborum."
|
|
32
32
|
};
|
|
33
33
|
const bread = {
|
|
34
34
|
one: "log1",
|
|
@@ -37,7 +37,7 @@ const bread = {
|
|
|
37
37
|
four: "log4",
|
|
38
38
|
five: "log5 too many",
|
|
39
39
|
six: "log6",
|
|
40
|
-
seven: "log7"
|
|
40
|
+
seven: "log7"
|
|
41
41
|
};
|
|
42
42
|
const customEvent = {
|
|
43
43
|
key: "Enter your key here",
|
|
@@ -47,8 +47,8 @@ const customEvent = {
|
|
|
47
47
|
"key of 2nd seg": "Value of 2nd seg",
|
|
48
48
|
"key of 3rd seg": "Value of 3rd seg",
|
|
49
49
|
"key of 4th seg": "Value of 4th seg",
|
|
50
|
-
"key of 5th seg": "Value of 5th seg"
|
|
51
|
-
}
|
|
50
|
+
"key of 5th seg": "Value of 5th seg"
|
|
51
|
+
}
|
|
52
52
|
};
|
|
53
53
|
const viewName = "a very long page name";
|
|
54
54
|
|
|
@@ -68,8 +68,8 @@ const userDetail = {
|
|
|
68
68
|
"SEGkey 2st one": "SEGVal 2st one",
|
|
69
69
|
"SEGkey 3st one": "SEGVal 3st one",
|
|
70
70
|
"SEGkey 4st one": "SEGVal 4st one",
|
|
71
|
-
"SEGkey 5st one": "SEGVal 5st one"
|
|
72
|
-
}
|
|
71
|
+
"SEGkey 5st one": "SEGVal 5st one"
|
|
72
|
+
}
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const customProperties = {
|
|
@@ -81,7 +81,7 @@ const customProperties = {
|
|
|
81
81
|
min: ["byear", 4567890123456789],
|
|
82
82
|
push: ["gender", "II Fernando Valdez"],
|
|
83
83
|
push_unique: ["gender", "III Fernando Valdez"],
|
|
84
|
-
pull: ["gender", "III Fernando Valdez"]
|
|
84
|
+
pull: ["gender", "III Fernando Valdez"]
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
describe("Internal limit tests ", () => {
|
|
@@ -161,20 +161,19 @@ Cypress.Commands.add("check_user_details", (details, userDetails, limits) => {
|
|
|
161
161
|
expect(keyList).to.include(key);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
return;
|
|
164
165
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
expect(queue.custom[key]).to.equal(userDetails.custom[key]);
|
|
177
|
-
}
|
|
166
|
+
expect(queue.name).to.equal(userDetails.name);
|
|
167
|
+
expect(queue.username).to.equal(userDetails.username);
|
|
168
|
+
expect(queue.email).to.equal(userDetails.email);
|
|
169
|
+
expect(queue.organization).to.equal(userDetails.organization);
|
|
170
|
+
expect(queue.phone).to.equal(userDetails.phone);
|
|
171
|
+
expect(queue.picture).to.equal(userDetails.picture);
|
|
172
|
+
expect(queue.gender).to.equal(userDetails.gender);
|
|
173
|
+
expect(queue.byear).to.equal(userDetails.byear);
|
|
174
|
+
if (userDetails.custom !== undefined) {
|
|
175
|
+
for (const key in userDetails.custom) {
|
|
176
|
+
expect(queue.custom[key]).to.equal(userDetails.custom[key]);
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
});
|
|
@@ -27,7 +27,6 @@ function getTimestampMs() {
|
|
|
27
27
|
return new Date().getTime();
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
/**
|
|
32
31
|
* Fine tuner for flaky tests. Retries test for a certain amount
|
|
33
32
|
* @param {number} startTime - starting time, timestamp
|
|
@@ -48,7 +47,6 @@ var waitFunction = function(startTime, waitTime, waitIncrement, continueCallback
|
|
|
48
47
|
}
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
|
|
52
50
|
module.exports = {
|
|
53
51
|
haltAndClearStorage,
|
|
54
52
|
sWait,
|
|
@@ -56,5 +54,5 @@ module.exports = {
|
|
|
56
54
|
lWait,
|
|
57
55
|
appKey,
|
|
58
56
|
getTimestampMs,
|
|
59
|
-
waitFunction
|
|
57
|
+
waitFunction
|
|
60
58
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
last 1 Chrome version
|
|
12
|
+
last 1 Firefox version
|
|
13
|
+
last 2 Edge major versions
|
|
14
|
+
last 2 Safari major versions
|
|
15
|
+
last 2 iOS major versions
|
|
16
|
+
Firefox ESR
|
|
17
|
+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Angular
|
|
2
|
+
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.4.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
|
8
|
+
|
|
9
|
+
## Code scaffolding
|
|
10
|
+
|
|
11
|
+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
|
12
|
+
|
|
13
|
+
## Build
|
|
14
|
+
|
|
15
|
+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
16
|
+
|
|
17
|
+
## Running unit tests
|
|
18
|
+
|
|
19
|
+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
20
|
+
|
|
21
|
+
## Running end-to-end tests
|
|
22
|
+
|
|
23
|
+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
24
|
+
|
|
25
|
+
## Further help
|
|
26
|
+
|
|
27
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|