-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathsimple.skip.html
More file actions
48 lines (40 loc) · 1.33 KB
/
simple.skip.html
File metadata and controls
48 lines (40 loc) · 1.33 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
43
44
45
46
47
48
<!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>
</head>
<body>
<main id="webchat"></main>
<script type="importmap">
{
"imports": {
"botframework-webchat": "/__dist__/packages/bundle/dist/botframework-webchat.mjs"
}
}
</script>
<script type="module">
import { createDirectLine, createStoreWithOptions, renderWebChat } from 'botframework-webchat';
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,
store
},
document.getElementById('webchat')
);
await pageConditions.uiConnected();
await directLine.emulateIncomingActivity('Hello, World!');
await pageConditions.numActivitiesShown(1);
await host.snapshot('local');
});
</script>
</body>
</html>