Skip to content

Assert the dictating class on the microphone button wrapper in speech recognition tests - #6042

Open
Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-test-microphone-dictating
Open

Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-test-microphone-dictating

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Ten speech recognition tests check that the microphone button is not dictating, but always pass.

Changelog Entry

Fixed

  • 👷🏻 Fixed speech recognition tests checking the dictating class on the wrong element, in PR #6042, by @OEvgeny

Description

The tests looked for webchat__microphone-button--dictating on the inner <button>, but Web Chat puts the class on its wrapper, so toBe(false) could never fail. They now check the wrapper (.parentElement), as dictating.forcedColors.html and the useStartDictate/useStopDictate/useMicrophoneButtonClick hook tests do.

Specific Changes

  • speech/recognition/{abortAfterAudioStart,birdTweet,microphoneNotAllowed,noNetwork,notConfident,silent,stopRecognizingOnMicrophoneButtonClick,stopSynthesizeOnKeyPress,stopSynthesizeWhenKeyPressBeforeSynthesis,unrecognizableSpeech}.html: assert the dictating class on the wrapper; with the class forced on, all 10 now fail (before: all passed)

  • I have added tests and executed them locally

  • I have added .changelog/<PR#>-<slug>.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review November 10, 2026 06:38
Copilot AI balanced review requested due to automatic review settings November 10, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants