-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathsimple.customIcons.html
More file actions
69 lines (59 loc) · 3.31 KB
/
simple.customIcons.html
File metadata and controls
69 lines (59 loc) · 3.31 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html lang="en-US">
<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
<script crossorigin="anonymous" src="https://unpkg.com/@babel/standalone@7.8.7/babel.min.js"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react@16.8.6/umd/react.production.min.js"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script>
<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>
<script crossorigin="anonymous" src="/__dist__/botframework-webchat-fluent-theme.production.min.js"></script>
<style>
#webchat .sendbox__toolbar-button .icon__send {
--monochrome-image-masker__mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 22 22'%3E%3Cpath fill='%23000' d='M4 18.5v-13L19.423 12zM5 17l11.85-5L5 7v3.885L9.846 12L5 13.116zm0 0V7z'/%3E%3C/svg%3E");
}
#webchat .sendbox__toolbar-button .icon__attachment {
--monochrome-image-masker__mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 22 22'%3E%3Cpath fill='%23000' d='M16.346 11.385V6.769h1v4.616zm-5.538 5.457q-.452-.269-.726-.734q-.274-.466-.274-1.031V6.769h1zM11.96 21q-2.271 0-3.846-1.595t-1.575-3.867v-8.73q0-1.587 1.09-2.697Q8.722 3 10.309 3t2.678 1.11t1.091 2.698V14h-1V6.789q-.006-1.166-.802-1.977T10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.961 20q.556 0 1.056-.124t.945-.372v1.11q-.468.2-.972.293q-.505.093-1.03.093m4.386-1v-2.616h-2.615v-1h2.615V13.77h1v2.615h2.616v1h-2.616V20z'/%3E%3C/svg%3E");
}
</style>
</head>
<body>
<main id="webchat"></main>
<script type="text/babel">
run(async function () {
const {
React,
ReactDOM: { render },
WebChat: { FluentThemeProvider, ReactWebChat }
} = window; // Imports in UMD fashion.
const { directLine, store } = testHelpers.createDirectLineEmulator();
const App = () => <ReactWebChat directLine={directLine} store={store} />;
render(
<FluentThemeProvider>
<App />
</FluentThemeProvider>,
document.getElementById('webchat')
);
await pageConditions.uiConnected();
await directLine.emulateIncomingActivity(
'Eiusmod anim adipisicing cupidatat adipisicing officia sint qui consequat veniam id aute.'
);
await pageConditions.numActivitiesShown(1);
// THEN: Fluent theme should be loaded.
const buildInfo = Object.fromEntries(
document
.querySelector('head > meta[name="botframework-webchat:fluent-theme"]')
.content.split(';')
.map(value => value.trim().split('='))
);
expect(buildInfo).toHaveProperty('build-tool', 'tsup');
expect(buildInfo).toHaveProperty('module-format', 'esmodules');
expect(buildInfo.version).toMatch(/^\d+\.\d+\.\d+($|-)/u);
expect(window.WebChat.FluentThemeProvider).toBeTruthy();
// THEN: Should render the activity.
await host.snapshot('local');
});
</script>
</body>
</html>