-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWPW-137930 DCXY-18989 if snippet is loaded inline, use it #417
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
|
Codecov Report
@@ Coverage Diff @@
## stage #417 +/- ##
==========================================
- Coverage 96.61% 96.58% -0.03%
==========================================
Files 26 26
Lines 2985 2989 +4
==========================================
+ Hits 2884 2887 +3
- Misses 101 102 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
707ffc1
to
2f61489
Compare
|
|
c2c3279
to
72baadf
Compare
|
72baadf
to
0b84df5
Compare
|
|
|
@@ -37,6 +37,18 @@ describe('dc-converter-widget', () => { | |||
expect(fetchUrl).toMatch(/^https:\/\/www.adobe.com\/dc\//); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -37,6 +37,18 @@ | |||
expect(fetchUrl).toMatch(/^https:\/\/www.adobe.com\/dc\//); | |||
}); | |||
|
|||
it('handles content inserted from edge', async () => { | |||
delete window.location; | |||
window.location = new URL('https://www.adobe.com'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <compat/compat> reported by reviewdog 🐶
URL is not supported in op_mini all
section.appendChild(document.createTextNode('content')); | ||
block.appendChild(section); | ||
const widget = await init(block); | ||
expect(document.querySelector('#CID').dataset.rendered).toEqual("true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
section.appendChild(document.createTextNode('content')); | ||
block.appendChild(section); | ||
await init(block); | ||
expect(document.querySelector('#CID').dataset.rendered).toEqual('true'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me
|
widgetContainer.dataset.rendered = 'true'; | ||
widgetContainer.appendChild(...INLINE_SNIPPET.childNodes); | ||
widget.removeChild(INLINE_SNIPPET); | ||
cacheLoad = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The edge worker will load the dc-generate-cache snippet and inline it in the HTML page in a section tag id="edge-snippet". If it's already there, use the DOM rather than fetch it over http.