Skip to content

Commit

Permalink
test: update autolink package's Jest test to point to MDN for more pr…
Browse files Browse the repository at this point in the history
…edictable Jest tests
  • Loading branch information
sghoweri committed Aug 6, 2019
1 parent adeb16e commit dc41398
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/analytics/autolink/__tests__/autolink.test.js
Expand Up @@ -72,7 +72,7 @@ describe('analytics autolinker', () => {
await page.evaluate(() => {
const btn = document.createElement('bolt-button');
btn.textContent = 'External URL - Shadow DOM Test';
btn.setAttribute('url', 'https://www.pega.com');
btn.setAttribute('url', 'https://developer.mozilla.org');
document.body.appendChild(btn);
});

Expand Down Expand Up @@ -144,7 +144,7 @@ describe('analytics autolinker', () => {
await page.evaluate(() => {
const btn = document.createElement('bolt-button');
btn.textContent = 'External URL - Untracked Domain';
btn.setAttribute('url', 'https://www.pega.com');
btn.setAttribute('url', 'https://developer.mozilla.org');
document.body.appendChild(btn);
});

Expand Down Expand Up @@ -210,7 +210,7 @@ describe('analytics autolinker', () => {
const link = document.createElement('bolt-link');
link.textContent = 'External URL - Untracked Domain';
link.style.display = 'inline-block'; // for some strange reason, without any :host styles or this, puppeteer can't seem to find this DOM node to click on
link.setAttribute('url', 'https://www.pega.com');
link.setAttribute('url', 'https://developer.mozilla.org');
document.body.appendChild(link);
});

Expand All @@ -237,7 +237,7 @@ describe('analytics autolinker', () => {
return window.drupalSettings.google_analytics.trackCrossDomains[0];
});

expect(config).toBe('pega.com');
expect(config).toBe('developer.mozilla.org');
}, 120000);

test('allow Drupal to configure which domains get configured / tracked by autolink.', async function() {
Expand All @@ -253,7 +253,7 @@ describe('analytics autolinker', () => {
const btn = document.createElement('bolt-button');
btn.textContent =
'External URL - Normally Untracked But Now Tracked Domain';
btn.setAttribute('url', 'https://www.pega.com');
btn.setAttribute('url', 'https://developer.mozilla.org');
document.body.appendChild(btn);
});

Expand Down
@@ -1,7 +1,7 @@
// example configuration of how data used to mock up the GA config getting used in Drupal
window.drupalSettings = {
google_analytics: {
trackCrossDomains: ['pega.com'],
trackCrossDomains: ['developer.mozilla.org'],
},
};

Expand Down

0 comments on commit dc41398

Please sign in to comment.