Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1525 Add "Render error" connectivity status for JavaScript errors. #1927

Merged
merged 18 commits into from
Apr 29, 2019
2 changes: 1 addition & 1 deletion .github/HowToQuestions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Please feel free to peruse our [samples](https://github.com/Microsoft/BotFramework-WebChat/tree/master/samples), which provide a lot of ideas and foundation for customizing your version of Web Chat.

'How to' questions such as this one are better suited for [Stack Overflow](https://stackoverflow.com/tags/botframework). Please feel free to post other questions you have about developing your own features over there so the community at large may help out. Thank you!
'How to' questions such as this one are better suited for [Stack Overflow](https://stackoverflow.com/tags/botframework). Please feel free to post other questions you have about developing your own features over there so the community at large may help out. If you need help with a Web Chat implementation, you can post a question to the [Web Chat tag](https://stackoverflow.com/questions/tagged/web-chat). Thank you!

Please share the link to your Stack Overflow question on this issue. The Web Chat team will close this issue after a week of inactivity or when the Stack Overflow link has been added.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix [#1877](https://github.com/Microsoft/BotFramework-WebChat/issues/1877). Add viewport meta tag and fix a few sample links, by [@corinagum](https://github.com/corinagum) in PR [#1919](https://github.com/Microsoft/BotFramework-WebChat/pull/1919)
- Fix [#1789](https://github.com/Microsoft/BotFramework-WebChat/issues/1789). Focus send box after message is being sent, by [@corinagum](https://github.com/corinagum) in PR [#1915](https://github.com/Microsoft/BotFramework-WebChat/pull/1915)
- Fix [#1920](https://github.com/Microsoft/BotFramework-WebChat/issues/1920). Added disabled property to send button, by [@tdurnford](https://github.com/tdurnford) in PR [#1922](https://github.com/Microsoft/BotFramework-WebChat/pull/1922)
- Fix [#1525](https://github.com/Microsoft/BotFramework-WebChat/issues/1525). Add JavaScript error Offline UI, by [@corinagum](https://github.com/corinagum) in PR [#1927](https://github.com/Microsoft/BotFramework-WebChat/pull/1927)

### Changed
- Deployment: Bumps to [`[email protected]`](https://github.com/azure/blobxfer/), by [@compulim](https://github.com/compulim), in PR [#1897](https://github.com/Microsoft/BotFramework-WebChat/pull/1897)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ There are several properties that you might pass into your Web Chat React Compon
| `adaptiveCardHostConfig` | Pass in a custom Adaptive Cards host config. |
| `attachmentMiddleware` | A chain of middleware that allows the developer to add their own custom HTML Elements on attachments. The signature is the following: `options => next => card => next(card)`. |
| `attachmentRenderer` | The "flattened" version of `attachmentMiddleware`. |
| `createStore` | A chain of middleware that allows the developer to modify the store actions. The middleware signature is the following: `createStore: ({}, ({ dispatch }) => next => action => next(cardAction)` |
corinagum marked this conversation as resolved.
Show resolved Hide resolved
| `cardActionMiddleware` | A chain of middleware that allows the developer to modify card actions, like Adaptive Cards or suggested actions. The middleware signature is the following: `cardActionMiddleware: () => next => ({ cardAction, getSignInUrl }) => next(cardAction)` |
| `directLine` | Specify the DirectLine object with DirectLine token. |
| `disabled` | Disable the UI (i.e. for presentation mode) of Web Chat. |
Expand Down
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.
10 changes: 5 additions & 5 deletions __tests__/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test('setup', async () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout carousel');
await pageObjects.sendMessageViaSendBox('layout carousel', { waitForSend: true });
corinagum marked this conversation as resolved.
Show resolved Hide resolved

await driver.wait(minNumActivitiesShown(2), 2000);
await driver.wait(allImagesLoaded(), 2000);
Expand All @@ -27,7 +27,7 @@ test('long URLs with break-word', async () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/')
await pageObjects.sendMessageViaSendBox('https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/', { waitForSend: true })

await driver.wait(minNumActivitiesShown(2), 2000);
await driver.wait(allImagesLoaded(), 2000);
Expand All @@ -43,7 +43,7 @@ test('long URLs with break-all', async () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/')
await pageObjects.sendMessageViaSendBox('https://subdomain.domain.com/pathname0/pathname1/pathname2/pathname3/pathname4/', { waitForSend: true })

await driver.wait(minNumActivitiesShown(2), 2000);
await driver.wait(allImagesLoaded(), 2000);
Expand All @@ -58,7 +58,7 @@ test('long URLs with keep-all', async () => {

const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await pageObjects.sendMessageViaSendBox('箸より重いものを持ったことがない箸より重いものを持ったことがない');
await pageObjects.sendMessageViaSendBox('箸より重いものを持ったことがない箸より重いものを持ったことがない', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), 2000);
await driver.wait(allImagesLoaded(), 2000);
Expand All @@ -72,7 +72,7 @@ test('unknown activities do not render anything in the transcript', async () =>
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('unknown activity');
await pageObjects.sendMessageViaSendBox('unknown activity', { waitForSend: true });

await driver.wait(minNumActivitiesShown(1), 2000);

Expand Down
4 changes: 2 additions & 2 deletions __tests__/cardActionMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('card action "openUrl"', async () => {
});

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('card-actions');
await pageObjects.sendMessageViaSendBox('card-actions', { waitForSend: true });

await driver.wait(suggestedActionsShowed(), timeouts.directLine);

Expand Down Expand Up @@ -65,7 +65,7 @@ test('card action "signin"', async () => {
});

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('oauth');
await pageObjects.sendMessageViaSendBox('oauth', { waitForSend: true });

const openUrlButton = await driver.findElement(By.css('[role="log"] ul > li button'));

Expand Down
24 changes: 12 additions & 12 deletions __tests__/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('carousel');
await pageObjects.sendMessageViaSendBox('carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -40,7 +40,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout carousel');
await pageObjects.sendMessageViaSendBox('layout carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -64,7 +64,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout double');
await pageObjects.sendMessageViaSendBox('layout double', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -76,7 +76,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ width: 640 });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout double');
await pageObjects.sendMessageViaSendBox('layout double', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -88,7 +88,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver();

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout single carousel');
await pageObjects.sendMessageViaSendBox('layout single carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -100,7 +100,7 @@ describe('carousel without avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ width: 640 });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout single carousel');
await pageObjects.sendMessageViaSendBox('layout single carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -116,7 +116,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('carousel');
await pageObjects.sendMessageViaSendBox('carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -140,7 +140,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout carousel');
await pageObjects.sendMessageViaSendBox('layout carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -164,7 +164,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout double');
await pageObjects.sendMessageViaSendBox('layout double', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -176,7 +176,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS, width: 640 });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout double');
await pageObjects.sendMessageViaSendBox('layout double', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -188,7 +188,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout single carousel');
await pageObjects.sendMessageViaSendBox('layout single carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand All @@ -200,7 +200,7 @@ describe('carousel with avatar initials', () => {
const { driver, pageObjects } = await setupWebDriver({ props: WEB_CHAT_PROPS, width: 640 });

await driver.wait(uiConnected(), timeouts.directLine);
await pageObjects.sendMessageViaSendBox('layout single carousel');
await pageObjects.sendMessageViaSendBox('layout single carousel', { waitForSend: true });

await driver.wait(minNumActivitiesShown(2), timeouts.directLine);
await driver.wait(allImagesLoaded(), timeouts.fetch);
Expand Down
Loading