@bolt/analytics-autolink
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -6,6 +6,10 @@ const path = require('path'); | ||
describe('analytics autolinker', () => { | ||
let page; | ||
let page, context; | ||
beforeAll(async () => { | ||
context = await global.__BROWSER__.createIncognitoBrowserContext(); | ||
}); | ||
beforeEach(async () => { | ||
page = await global.__BROWSER__.newPage(); | ||
page = await context.newPage(); | ||
await page.goto('http://127.0.0.1:4444/', { | ||
@@ -41,3 +45,3 @@ timeout: 0, | ||
expect(currentUrl).toContain('_ga=1234'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -63,3 +67,3 @@ test('autolinker updates the URLs of a <bolt-button> with an external url (2nd in the config) + rendering to the Shadow DOM', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -93,3 +97,3 @@ test('autolinker tracks the URLs of a <bolt-button> with an external url (2nd in the config) + rendering to the Shadow DOM - even after re-rendering', async function() { | ||
expect(currentUrl).toContain('brightcove.com'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -115,3 +119,3 @@ test('autolinker updates the URLs of a <bolt-button> with an external url + rendering to the Shadow DOM', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -138,3 +142,3 @@ test('autolinker updates the URLs of <bolt-button>s with external urls + render to the light DOM', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -160,3 +164,3 @@ test('autolinker does not track <bolt-button>s with urls not containing domains in the config', async function() { | ||
expect(currentUrl).not.toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -183,3 +187,3 @@ test('autolinker updates the URLs of a <bolt-link> with an external url + rendering to the Shadow DOM', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -206,3 +210,3 @@ test('autolinker updates the URLs of a <bolt-link> with an external url + rendering to the light DOM', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -229,3 +233,3 @@ test('autolinker does not track <bolt-link>s with urls not containing domains in the config', async function() { | ||
expect(currentUrl).not.toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -248,3 +252,3 @@ test('the correct inline config for specifying autolink domains inside Drupal exists', async function() { | ||
expect(config).toBe('pega.com'); | ||
}, 30000); | ||
}, 60000); | ||
@@ -274,3 +278,3 @@ test('allow Drupal to configure which domains get configured / tracked by autolink.', async function() { | ||
expect(currentUrl).toContain('_ga'); | ||
}, 30000); | ||
}, 60000); | ||
}); |
@@ -6,2 +6,16 @@ # Change Log | ||
# [2.5.0](https://github.com/bolt-design-system/bolt/compare/v2.4.4...v2.5.0) (2019-06-21) | ||
### Bug Fixes | ||
* add check for 'link' to analytics JS, throwing error in accordion ([a746a9e](https://github.com/bolt-design-system/bolt/commit/a746a9e)) | ||
* add publicConfig ([2692f94](https://github.com/bolt-design-system/bolt/commit/2692f94)) | ||
* fix eslint issues ([2d3cac5](https://github.com/bolt-design-system/bolt/commit/2d3cac5)) | ||
* re-add network timeout to jest tests ([e227628](https://github.com/bolt-design-system/bolt/commit/e227628)) | ||
# [2.4.0](https://github.com/bolt-design-system/bolt/compare/v2.3.2...v2.4.0) (2019-05-14) | ||
@@ -8,0 +22,0 @@ |
@@ -59,3 +59,3 @@ import URLSearchParams from '@ungap/url-search-params'; // URLSearchParams poly for older browsers | ||
// make sure trackers exist + the click target is a link with an href | ||
if (trackers.length && link.href) { | ||
if (trackers.length && link && link.href) { | ||
// if the trackedCrossDomains config exists, only update links with urls that point to one of these external domains. | ||
@@ -62,0 +62,0 @@ // if not, apply GA autolink behavior to all external links |
{ | ||
"name": "@bolt/analytics-autolink", | ||
"description": "Adds Google Analytics tracking support to the Bolt Design System.", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"license": "MIT", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "011f0c511d7fae1c4793482e4426ee69060c30c8" | ||
"gitHead": "3febe8bbb18a7dd29a34fd988cda284dac04993f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22610
338