microsoft / microsoft/BotFramework-WebChat
Test reliability: suggestedActions.js "should show response from bot and text from user on messageback"
Open
Nobody has claimed this yet.
backlog
feature-request
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
Feature Request
This is due to race conditions from Direct Line channel.
FAIL __tests__/suggestedActions.js (92.842s)
● suggested-actions command › should show response from bot and text from user on messageback
Expected image to match or be a close match to snapshot but was 1.745659722222222% different from snapshot (4022 differing pixels).
[1m[31mSee diff for details:[39m[22m [31m/home/vsts/work/1/s/__tests__/__image_snapshots__/chrome-docker/__diff_output__/suggested-actions-js-suggested-actions-command-should-show-response-from-bot-and-text-from-user-on-messageback-1-diff.png[39m
147 | const base64PNG = await driver.takeScreenshot();
148 |
> 149 | expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions);
| ^
150 | });
151 |
152 | test('should not show suggested actions not destined for the user', async () => {
at _callee7$ (__tests__/suggestedActions.js:149:23)
at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

[Enhancement]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The failure is in tests/suggestedActions.js at the messageback snapshot assertion on line 149; start by running that test and tracing its Direct Line message timing. Done means the test reliably captures the expected state and passes with the expected image snapshot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100