-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HIGH] New UIs for better bot response (#4846)
* Refactor TextAttachment * Add schema.org * Add @types/jest * Refactor Markdown-It plugins * Fix test * Add ModalDialogComposer * Use constants * Add link definitions * Clean up * Cosmetics * Cosmetics * Add citation, definitions, provenance, vote buttons * Use ReplyAction instead of Person * Clean up styles * Style slotted * Localize feedback buttons * Focus indicator cosmetics * Click on citation should show modal * Fix colors * Fix accessibility on link definitions * Add open in new window icon * Clean up * Show host if no name on link * Remove transition * Chevron cosmetics * Clean up vote buttons * Use VoteAction directly * Fix @context * Add onErrorResumeNext * Allow different type for default value * Clean up * Simplify * Fix test * Simplify * Add test for Thing * Add tests * Add tests * Add test * Add test entrypoints * Add tests * Add screenshots * Add entries * Fix px * Fix slotted activity status padding * Fix test * Fix tests * Fix tests * Migrate test * Delete old test * Fix send status padding * Fix screenshot * Fix tests * Update snapshots * Fix tests * Rename CSS variables * Fix prop types * Fix flaky test * Update screenshots * Fix screenshots * Typo * Add comment * Update scrollbar size * Update screenshot * Fix tests because DOM go deeper
- Loading branch information
Showing
166 changed files
with
5,127 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-6 Bytes
(100%)
...e-docker/style-options-js-style-options-hide-scroll-to-bottom-button-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8 Bytes
(100%)
...e-docker/style-options-js-style-options-hide-scroll-to-bottom-button-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6 Bytes
(100%)
...activity-grouping-should-not-break-legacy-activity-status-middleware-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7 Bytes
(100%)
...activity-grouping-should-not-break-legacy-activity-status-middleware-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...uto-scroll-after-send-js-auto-scroll-should-scroll-to-bottom-on-send-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29 KB
...-accordion-js-citation-accordion-should-expand-and-collapse-on-click-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.8 KB
...-accordion-js-citation-accordion-should-expand-and-collapse-on-click-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29 KB
...-accordion-js-citation-accordion-should-expand-and-collapse-on-click-3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29 KB
..._/__image_snapshots__/html/citation-basic-js-citation-should-display-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...-js-citation-modal-dialog-should-close-when-clicking-on-close-button-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.1 KB
...-js-citation-modal-dialog-should-close-when-clicking-on-close-button-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...ape-js-citation-modal-dialog-should-close-when-escape-key-is-pressed-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.1 KB
...ape-js-citation-modal-dialog-should-close-when-escape-key-is-pressed-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...dal-dialog-should-show-when-clicking-on-citation-in-link-definitions-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...dal-dialog-should-show-when-clicking-on-citation-in-link-definitions-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...ation-modal-dialog-should-show-when-clicking-on-citation-in-markdown-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.5 KB
...ation-modal-dialog-should-show-when-clicking-on-citation-in-markdown-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.26 KB
...__/html/feedback-activity-status-basic-js-vote-button-should-display-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.46 KB
...__/html/feedback-activity-status-basic-js-vote-button-should-display-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.46 KB
...__/html/feedback-activity-status-basic-js-vote-button-should-display-3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.46 KB
...__/html/feedback-activity-status-basic-js-vote-button-should-display-4-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.26 KB
...back-activity-status-click-js-vote-button-should-send-event-on-click-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.38 KB
...back-activity-status-click-js-vote-button-should-send-event-on-click-2-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.39 KB
...back-activity-status-click-js-vote-button-should-send-event-on-click-3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.39 KB
...back-activity-status-click-js-vote-button-should-send-event-on-click-4-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9 KB
...activity-status-single-js-vote-button-should-display-a-single-button-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...js-use-create-activity-status-renderer-should-render-activity-status-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...y-status-js-use-render-activity-status-should-render-activity-status-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...shots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...shots__/html/hooks-use-text-box-js-use-text-box-should-work-properly-2-snap.png
Oops, something went wrong.
File renamed without changes
File renamed without changes
Binary file added
BIN
+11.5 KB
...image_snapshots__/html/provenance-basic-js-provenance-should-display-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...tton-tab-order-js-scroll-to-end-button-should-have-correct-tab-order-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...ton-visibility-js-scroll-to-end-button-should-show-and-hide-properly-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
...ton-visibility-js-scroll-to-end-button-should-show-and-hide-properly-3-snap.png
Oops, something went wrong.
Binary file modified
BIN
+7 Bytes
(100%)
...ge_snapshots__/html/timestamp-prepend-text-js-timestamp-prepend-text-1-snap.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...ssword-input-js-transcript-legacy-activity-middleware-password-input-1-snap.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<main id="webchat"></main> | ||
<script> | ||
run(async function () { | ||
const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
||
WebChat.renderWebChat( | ||
{ | ||
directLine, | ||
store | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
|
||
await directLine.emulateIncomingActivity({ | ||
entities: [ | ||
{ | ||
'@context': 'https://schema.org', | ||
'@id': 'cite:1', | ||
'@type': 'Claim', | ||
type: 'https://schema.org/Claim', | ||
text: 'Reprehenderit exercitation laborum labore ut. Nostrud do et ut nostrud nisi excepteur labore adipisicing nostrud nostrud ipsum id dolore. Anim aliquip incididunt incididunt sunt sit proident consectetur exercitation qui aliqua aliquip adipisicing nisi et. Id commodo labore sunt quis do aute cillum laborum veniam [proident](https://bing.com/).' | ||
} | ||
], | ||
text: `Sure, you should override the default proxy settings[1]\u200C[2], when your proxy server requires authentication[3]. | ||
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 | ||
[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server" | ||
[3]: cite:1 "Citation-1" | ||
`, | ||
type: 'message' | ||
}); | ||
|
||
await host.snapshot(); | ||
|
||
const summary = pageElements.linkDefinitions()[0].querySelector('summary'); | ||
|
||
await host.click(summary); | ||
await host.snapshot(); | ||
|
||
await host.click(summary); | ||
await host.snapshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('citation accordion', () => { | ||
test('should expand and collapse on click', () => runHTML('citation.accordion.html')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<main id="webchat"></main> | ||
<script> | ||
run(async function () { | ||
const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
||
WebChat.renderWebChat( | ||
{ | ||
directLine, | ||
store | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
|
||
await directLine.emulateIncomingActivity({ | ||
entities: [ | ||
{ | ||
'@context': 'https://schema.org', | ||
'@id': 'cite:1', | ||
'@type': 'Claim', | ||
type: 'https://schema.org/Claim', | ||
text: 'Reprehenderit exercitation laborum labore ut. Nostrud do et ut nostrud nisi excepteur labore adipisicing nostrud nostrud ipsum id dolore. Anim aliquip incididunt incididunt sunt sit proident consectetur exercitation qui aliqua aliquip adipisicing nisi et. Id commodo labore sunt quis do aute cillum laborum veniam [proident](https://bing.com/).' | ||
} | ||
], | ||
text: `Sure, you should override the default proxy settings[1]\u200C[2], when your proxy server requires authentication[3]. | ||
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 | ||
[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server" | ||
[3]: cite:1 "Citation-1" | ||
`, | ||
type: 'message' | ||
}); | ||
|
||
await host.snapshot(); | ||
|
||
const markdownElement = pageElements.activities()[0].querySelector('.webchat__text-content__markdown'); | ||
const markdownLinks = markdownElement.querySelectorAll('a'); | ||
const markdownButtons = markdownElement.querySelectorAll('button'); | ||
|
||
expect(markdownLinks).toHaveLength(2); | ||
expect(markdownButtons).toHaveLength(1); | ||
|
||
expect(markdownLinks[0].getAttribute('href')).toBe( | ||
'https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1' | ||
); | ||
|
||
expect(markdownLinks[1].getAttribute('href')).toBe( | ||
'https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings' | ||
); | ||
|
||
expect(markdownButtons[0].getAttribute('type')).toBe('button'); | ||
|
||
const linkDefinitionItems = pageElements.linkDefinitions()[0].querySelectorAll('[role="listitem"] > *'); | ||
|
||
expect(linkDefinitionItems[0].getAttribute('href')).toBe( | ||
'https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1' | ||
); | ||
|
||
expect(linkDefinitionItems[1].getAttribute('href')).toBe( | ||
'https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings' | ||
); | ||
|
||
expect(linkDefinitionItems[2].tagName).toBe('BUTTON'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('citation', () => { | ||
test('should display', () => runHTML('citation.basic.html')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<main id="webchat"></main> | ||
<script> | ||
run(async function () { | ||
const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
||
WebChat.renderWebChat( | ||
{ | ||
directLine, | ||
store | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
|
||
await directLine.emulateIncomingActivity({ | ||
entities: [ | ||
{ | ||
'@context': 'https://schema.org', | ||
'@id': 'cite:1', | ||
'@type': 'Claim', | ||
type: 'https://schema.org/Claim', | ||
text: 'Reprehenderit exercitation laborum labore ut. Nostrud do et ut nostrud nisi excepteur labore adipisicing nostrud nostrud ipsum id dolore. Anim aliquip incididunt incididunt sunt sit proident consectetur exercitation qui aliqua aliquip adipisicing nisi et. Id commodo labore sunt quis do aute cillum laborum veniam [proident](https://bing.com/).' | ||
} | ||
], | ||
text: `Sure, you should override the default proxy settings[1]\u200C[2], when your proxy server requires authentication[3]. | ||
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 | ||
[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server" | ||
[3]: cite:1 "Citation-1" | ||
`, | ||
type: 'message' | ||
}); | ||
|
||
const markdownElement = pageElements.activities()[0].querySelector('.webchat__text-content__markdown'); | ||
const markdownButtons = markdownElement.querySelectorAll('button'); | ||
|
||
await host.click(markdownButtons[0]); | ||
await host.snapshot(); | ||
|
||
await host.sendKeys(' '); | ||
await host.snapshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('citation modal dialog', () => { | ||
test('should close when clicking on close button', () => runHTML('citation.showModal.close.button.html')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<main id="webchat"></main> | ||
<script> | ||
run(async function () { | ||
const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
||
WebChat.renderWebChat( | ||
{ | ||
directLine, | ||
store | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
|
||
await directLine.emulateIncomingActivity({ | ||
entities: [ | ||
{ | ||
'@context': 'https://schema.org', | ||
'@id': 'cite:1', | ||
'@type': 'Claim', | ||
type: 'https://schema.org/Claim', | ||
text: 'Reprehenderit exercitation laborum labore ut. Nostrud do et ut nostrud nisi excepteur labore adipisicing nostrud nostrud ipsum id dolore. Anim aliquip incididunt incididunt sunt sit proident consectetur exercitation qui aliqua aliquip adipisicing nisi et. Id commodo labore sunt quis do aute cillum laborum veniam [proident](https://bing.com/).' | ||
} | ||
], | ||
text: `Sure, you should override the default proxy settings[1]\u200C[2], when your proxy server requires authentication[3]. | ||
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 | ||
[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server" | ||
[3]: cite:1 "Citation-1" | ||
`, | ||
type: 'message' | ||
}); | ||
|
||
const markdownElement = pageElements.activities()[0].querySelector('.webchat__text-content__markdown'); | ||
const markdownButtons = markdownElement.querySelectorAll('button'); | ||
|
||
await host.click(markdownButtons[0]); | ||
await host.snapshot(); | ||
|
||
await host.sendTab(); | ||
await host.sendKeys('ESCAPE'); | ||
await host.snapshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('citation modal dialog', () => { | ||
test('should close when escape key is pressed', () => runHTML('citation.showModal.close.escape.html')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<main id="webchat"></main> | ||
<script> | ||
run(async function () { | ||
const { directLine, store } = testHelpers.createDirectLineEmulator(); | ||
|
||
WebChat.renderWebChat( | ||
{ | ||
directLine, | ||
store | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
|
||
await directLine.emulateIncomingActivity({ | ||
entities: [ | ||
{ | ||
'@context': 'https://schema.org', | ||
'@id': 'cite:1', | ||
'@type': 'Claim', | ||
type: 'https://schema.org/Claim', | ||
text: 'Reprehenderit exercitation laborum labore ut. Nostrud do et ut nostrud nisi excepteur labore adipisicing nostrud nostrud ipsum id dolore. Anim aliquip incididunt incididunt sunt sit proident consectetur exercitation qui aliqua aliquip adipisicing nisi et. Id commodo labore sunt quis do aute cillum laborum veniam [proident](https://bing.com/).' | ||
} | ||
], | ||
text: `Sure, you should override the default proxy settings[1]\u200C[2], when your proxy server requires authentication[3]. | ||
[1]: https://support.microsoft.com/en-us/windows/use-a-proxy-server-in-windows-03096c53-0554-4ffe-b6ab-8b1deee8dae1 | ||
[2]: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-proxy-server-settings "Configure proxy server settings - Windows Server" | ||
[3]: cite:1 "Citation-1" | ||
`, | ||
type: 'message' | ||
}); | ||
|
||
const linkDefinitionItems = pageElements.linkDefinitions()[0].querySelectorAll('[role="listitem"] > *'); | ||
|
||
await host.click(linkDefinitionItems[2]); | ||
await host.snapshot(); | ||
|
||
await host.sendTab(); | ||
await host.snapshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('citation modal dialog', () => { | ||
test('should show when clicking on citation in link definitions', () => runHTML('citation.showModal.linkDefinitions.html')); | ||
}); |
Oops, something went wrong.