forked from microsoft/BotFramework-WebChat
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrole.application.html
More file actions
42 lines (35 loc) · 1.36 KB
/
Copy pathrole.application.html
File metadata and controls
42 lines (35 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!doctype html>
<html lang="en-US">
<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<main id="webchat"></main>
<script type="importmap">
{
"imports": {
"botframework-webchat": "/__dist__/packages/bundle/static/botframework-webchat.js",
"react": "/__dist__/packages/bundle/static/react.baseline.js",
"react-dom": "/__dist__/packages/bundle/static/react-dom.baseline.js"
}
}
</script>
<script type="module">
import '/test-harness.mjs';
import '/test-page-object.mjs';
import { createDirectLine, createStoreWithOptions, renderWebChat } from 'botframework-webchat';
import { version } from 'react';
run(async function () {
const {
testHelpers: { createDirectLineEmulator }
} = window;
// TODO: This is for `createDirectLineEmulator` only, should find ways to eliminate this line.
window.WebChat = { createStoreWithOptions };
const { directLine, store } = createDirectLineEmulator();
renderWebChat({ directLine, role: 'application', store }, document.getElementById('webchat'));
await pageConditions.uiConnected();
expect(document.querySelector('#webchat .webchat__surface').getAttribute('role')).toBe('application');
});
</script>
</body>
</html>