Skip to content

Add HTML content transformer middleware #1198

Add HTML content transformer middleware

Add HTML content transformer middleware #1198

Triggered via pull request October 29, 2024 17:47
Status Failure
Total duration 12m 22s
Artifacts 3

pull-request-validation.yml

on: pull_request
Matrix: html-test
Merge test results
17s
Merge test results
Merge test snapshots
4s
Merge test snapshots
Fit to window
Zoom out
Zoom in

Annotations

14 errors and 1 warning
renderMarkdown › should properly render newline characters to markdown: packages/bundle/src/__tests__/renderMarkdown.spec.js#L25
expect(received).toBe(expected) // Object.is equality - Expected - 1 + Received + 1 - <p>Same line. + <p xmlns="http://www.w3.org/1999/xhtml">Same line. Same line.<br /> 2nd line.</p> at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:25:104)
renderMarkdown › should respect CRLF: packages/bundle/src/__tests__/renderMarkdown.spec.js#L33
expect(received).toBe(expected) // Object.is equality - Expected - 3 + Received + 3 - <p>Same Line. - Same Line.</p> - <p>2nd line.</p> + <p xmlns="http://www.w3.org/1999/xhtml">Same Line. + Same Line.</p> + <p xmlns="http://www.w3.org/1999/xhtml">2nd line.</p> at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:33:106)
renderMarkdown › should respect LFCR: packages/bundle/src/__tests__/renderMarkdown.spec.js#L41
expect(received).toBe(expected) // Object.is equality - Expected - 3 + Received + 3 - <p>Same Line. - Same Line.</p> - <p>2nd line.</p> + <p xmlns="http://www.w3.org/1999/xhtml">Same Line. + Same Line.</p> + <p xmlns="http://www.w3.org/1999/xhtml">2nd line.</p> at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:41:106)
renderMarkdown › should render bold text: packages/bundle/src/__tests__/renderMarkdown.spec.js#L51
expect(received).toBe(expected) // Object.is equality - Expected - 2 + Received + 2 - <p><strong>Message with Markdown</strong></p> + <p xmlns="http://www.w3.org/1999/xhtml"><strong>Message with Markdown</strong></p> - <p>Should see bold text.</p> + <p xmlns="http://www.w3.org/1999/xhtml">Should see bold text.</p> at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:51:7)
renderMarkdown › should render code correctly: packages/bundle/src/__tests__/renderMarkdown.spec.js#L64
expect(received).toBe(expected) // Object.is equality - Expected - 4 + Received + 1 - <pre class="webchat__render-markdown__code-block"><webchat--code-block-copy-button class="webchat__code-block-copy-button" data-alt-copied="Copied" data-alt-copy="Copy" data-value="{ - &quot;hello&quot;: &quot;World!&quot; - } - "></webchat--code-block-copy-button><code>{ + <pre xmlns="http://www.w3.org/1999/xhtml"><code>{ "hello": "World!" } </code></pre> at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:64:8)
renderMarkdown › should render aria-labels: packages/bundle/src/__tests__/renderMarkdown.spec.js#L76
expect(received).toBe(expected) // Object.is equality Expected: "<p>​<a href=\"https://sample.com\" aria-label=\"example \" rel=\"noopener noreferrer\" target=\"_blank\">example<img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" class=\"webchat__render-markdown__external-link-icon\" /></a>​</p>" Received: "<p xmlns=\"http://www.w3.org/1999/xhtml\">​<a href=\"https://sample.com\" aria-label=\"example \" rel=\"noopener noreferrer\" target=\"_blank\">example<img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" class=\"webchat__render-markdown__external-link-icon\" /></a>​</p>" at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:76:98)
renderMarkdown › should render "open in new window" icon: packages/bundle/src/__tests__/renderMarkdown.spec.js#L85
expect(received).toBe(expected) // Object.is equality Expected: "<p>​<a href=\"https://sample.com\" aria-label=\"example Opens in a new window, external.\" rel=\"noopener noreferrer\" target=\"_blank\">example<img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" class=\"webchat__render-markdown__external-link-icon\" title=\"Opens in a new window, external.\" /></a>​</p>" Received: "<p xmlns=\"http://www.w3.org/1999/xhtml\">​<a href=\"https://sample.com\" aria-label=\"example Opens in a new window, external.\" rel=\"noopener noreferrer\" target=\"_blank\">example<img src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"\" class=\"webchat__render-markdown__external-link-icon\" title=\"Opens in a new window, external.\" /></a>​</p>" at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:85:84)
renderMarkdown › should render sip protocol links correctly: packages/bundle/src/__tests__/renderMarkdown.spec.js#L93
expect(received).toBe(expected) // Object.is equality Expected: "<p>​<a href=\"sip:[email protected]\" rel=\"noopener noreferrer\" target=\"_blank\">[email protected]</a>​</p>" Received: "<p xmlns=\"http://www.w3.org/1999/xhtml\">​<a href=\"sip:[email protected]\" rel=\"noopener noreferrer\" target=\"_blank\">[email protected]</a>​</p>" at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:93:109)
renderMarkdown › should render tel protocol links correctly: packages/bundle/src/__tests__/renderMarkdown.spec.js#L101
expect(received).toBe(expected) // Object.is equality Expected: "<p>​<a href=\"tel:505-503-4455\" rel=\"noopener noreferrer\" target=\"_blank\">(505)503-4455</a>​</p>" Received: "<p xmlns=\"http://www.w3.org/1999/xhtml\">​<a href=\"tel:505-503-4455\" rel=\"noopener noreferrer\" target=\"_blank\">(505)503-4455</a>​</p>" at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:101:102)
renderMarkdown › should render strikethrough text correctly: packages/bundle/src/__tests__/renderMarkdown.spec.js#L109
expect(received).toBe(expected) // Object.is equality Expected: "<p><del>strike text</del></p>" Received: "<p xmlns=\"http://www.w3.org/1999/xhtml\"><del>strike text</del></p>" at Object.toBe (packages/bundle/src/__tests__/renderMarkdown.spec.js:109:84)
with Web Worker upload a picture with custom thumbnail quality › should send: packages/test/harness/src/host/common/host/snapshot.js#L15
Expected image to match or be a close match to snapshot but was 0.06727430555555555% different from snapshot (155 differing pixels). See diff for details: /home/runner/work/BotFramework-WebChat/BotFramework-WebChat/__tests__/__image_snapshots__/html/__diff_output__/custom-thumbnail-quality-js-with-web-worker-upload-a-picture-with-custom-thumbnail-quality-should-send-1-snap-diff.png at toMatchImageSnapshot (packages/test/harness/src/host/common/host/snapshot.js:15:24) at tryCatch (node_modules/@babel/runtime/helpers/regeneratorRuntime.js:45:16) at Generator.<anonymous> (node_modules/@babel/runtime/helpers/regeneratorRuntime.js:133:17) at Generator.next (node_modules/@babel/runtime/helpers/regeneratorRuntime.js:74:21) at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17) at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
HTML test (16/17)
Process completed with exit code 1.
markdown/codeBlockCopyButton/fluent/layout.html: <anonymous>#L47
expect(received).toHaveLength(expected) Expected length: 2 Received length: 1 Received object: [<button aria-disabled="false" aria-live="assertive" class="webchat--css-rrbfi-1dmxy1j webchat__code-block-copy-button" data-testid="code block copy button" type="button"><div aria-label="Copy" class="webchat__code-block-copy-button__icon webchat__code-block-copy-button__icon--copy" role="img" /><div aria-hidden="true" aria-label="Copied" class="webchat__code-block-copy-button__icon webchat__code-block-copy-button__icon--copied" role="img" /></button>] at _callee$ (<anonymous>:47:125) at tryCatch (<anonymous>:4:1062) at Generator.<anonymous> (<anonymous>:4:3008) at Generator.next (<anonymous>:4:1699) at asyncGeneratorStep (<anonymous>:5:70) at _next (<anonymous>:6:163)
HTML test (1/17)
Process completed with exit code 1.
HTML test (1/17)
No files were found with the provided path: ./__tests__/__image_snapshots__/*/__diff_output__/*. No artifacts will be uploaded.

Artifacts

Produced during runtime
Name Size
docker Expired
110 MB
test-result
1.28 MB
test-snapshot-diff
335 KB