Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
- Fixed copy button screen reader announcement
- Added proper ARIA attributes to link definitions component
- Improved focus management for scroll to end button
- Fixed [#5439](https://github.com/microsoft/BotFramework-WebChat/issues/5439). Fixed batched livestream activities are not recognized in the same session, in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX)
- Fixed [#5439](https://github.com/microsoft/BotFramework-WebChat/issues/5439). Fixed batched livestream activities are not recognized in the same session, in PR [#5440](https://github.com/microsoft/BotFramework-WebChat/pull/5440), by [@compulim](https://github.com/compulim)
- Fixed [#5452](https://github.com/microsoft/BotFramework-WebChat/issues/5452). With Fluent/Copilot theme, the typing indicator padding should not be squashed, in PR [#5453](https://github.com/microsoft/BotFramework-WebChat/pull/5453), by [@compulim](https://github.com/compulim)

# Removed

Expand Down
55 changes: 55 additions & 0 deletions __tests__/html2/basic/sendBox.trimOutgoing.html
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="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>
</head>
<body>
<main id="webchat"></main>
<script type="module">
run(async function () {
const {
React: { createElement },
ReactDOM: { render },
testHelpers: {
createStore,
token: { fetchDirectLineToken }
},
WebChat: { createDirectLine, ReactWebChat }
} = window; // Imports in UMD fashion.

const directLine = createDirectLine({ token: await fetchDirectLineToken() });
const store = createStore();

render(
createElement(ReactWebChat, {
directLine,
store
}),
document.getElementById('webchat')
);

await pageConditions.uiConnected();

await pageObjects.sendMessageViaSendBox(
'\u00A0\u00A0There should be no space before and after this message.\u00A0\u00A0',
{ waitForSend: false }
);

await pageConditions.actionDispatched(
'DIRECT_LINE/INCOMING_ACTIVITY',
({ payload: { activity } = {}, type }) =>
type === 'DIRECT_LINE/INCOMING_ACTIVITY' &&
activity.from.role === 'user' &&
activity.text === 'There should be no space before and after this message.'
);

await pageConditions.minNumActivitiesShown(2);
});
</script>
</body>
</html>
23 changes: 22 additions & 1 deletion __tests__/html2/fluentTheme/typingIndicator.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,28 @@
await directLine.emulateIncomingActivity({
from: { id: 'u-00001', name: 'Bot', role: 'bot' },
id: 'a-00001',
text: 'Hello, World!',
text: 'In minim amet culpa adipisicing aliqua culpa minim culpa officia culpa laboris non commodo. Velit nisi ut sit amet in sunt eu voluptate Lorem eu do sint proident aute. Nulla nisi commodo consectetur anim id non ut est anim veniam occaecat excepteur dolor nulla. Adipisicing et dolor ex cillum sit ipsum amet labore officia dolor non ad aliquip officia. Irure quis occaecat cupidatat ut commodo culpa eiusmod ipsum pariatur. Excepteur aliqua consectetur anim laborum enim ipsum tempor occaecat voluptate.',
type: 'message'
});

await directLine.emulateIncomingActivity({
from: { id: 'u-00001', name: 'Bot', role: 'bot' },
id: 'a-00002',
text: 'Excepteur enim tempor ex do magna elit consectetur elit incididunt. Amet reprehenderit cupidatat amet velit nostrud esse est dolor proident ex ut deserunt. Velit veniam minim esse laboris irure esse duis dolor sint culpa. Sit ullamco eiusmod consectetur enim elit cillum sit elit irure ut commodo ad. Cillum ad mollit est labore culpa proident sunt tempor culpa pariatur elit laborum.',
type: 'message'
});

await directLine.emulateIncomingActivity({
from: { id: 'u-00001', name: 'Bot', role: 'bot' },
id: 'a-00003',
text: 'Ad minim fugiat sint et laboris consectetur eu ut in nisi fugiat cillum est labore. Et proident tempor veniam ex est incididunt Lorem. Culpa sit id eu voluptate.',
type: 'message'
});

await directLine.emulateIncomingActivity({
from: { id: 'u-00001', name: 'Bot', role: 'bot' },
id: 'a-00004',
text: 'Est voluptate eiusmod ad Lorem irure amet sint ea aliqua labore eu do nostrud exercitation. Non adipisicing non amet laborum. Anim fugiat minim cupidatat consequat ipsum minim ex mollit commodo ut aliqua quis consequat dolore. Cupidatat tempor laborum consectetur eiusmod cillum do consequat ad pariatur amet magna aliquip occaecat officia.',
type: 'message'
});

Expand Down
Binary file modified __tests__/html2/fluentTheme/typingIndicator.html.snap-1.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 __tests__/html2/fluentTheme/typingIndicator.html.snap-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions __tests__/sendBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,3 @@ test('should focus send box when message is being sent', async () => {

expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions);
});

test('should trim outgoing message when being sent', async () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox(
'\u00A0\u00A0There should be no space before and after this message.\u00A0\u00A0',
{ waitForSend: false }
);
await driver.wait(
actionDispatched(
({ payload: { activity } = {}, type }) =>
type === 'DIRECT_LINE/INCOMING_ACTIVITY' &&
activity.from.role === 'user' &&
activity.text === 'There should be no space before and after this message.'
),
timeouts.directLine
);
await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
});
2 changes: 1 addition & 1 deletion __tests__/setup/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
crossorigin="anonymous"
src="https://unpkg.com/event-target-shim@5.0.1/dist/event-target-shim.umd.js"
></script>
<script crossorigin="anonymous" src="https://unpkg.com/simple-update-in"></script>
<script crossorigin="anonymous" src="https://unpkg.com/simple-update-in?browser"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react@16.8.6/umd/react.development.js"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.development.js"></script>
<script crossorigin="anonymous" src="/createProduceConsumeBroker.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:global(.webchat-fluent) .sliding-dots-typing-indicator {
align-self: start;
display: flex;
flex: none;
height: 16px;
margin: auto var(--webchat-spacingHorizontalMNudge);
}
Expand Down
Loading