Skip to content

Conversation

@richvdh
Copy link
Member

@richvdh richvdh commented Jul 25, 2025

a couple of cleanups in MatrixChat which may make it more robust, but at the very least will make it log less spam.

Possible this will help with #30337 and/or #29708

@richvdh richvdh added the T-Task Tasks for the team like planning label Jul 25, 2025
@richvdh richvdh requested a review from a team as a code owner July 25, 2025 14:16
@richvdh richvdh requested review from florianduros and t3chguy July 25, 2025 14:16
@richvdh richvdh added the T-Task Tasks for the team like planning label Jul 25, 2025
richvdh added 2 commits July 25, 2025 15:17
Make the MatrixChat tests behave better by letting them finish their work in an
`act` in afterEach. Otherwise we can end up mounting new components during
cleanup, which run tasks in the background
This test was kicking off a dispatcher job which would then open a
UserDeviceSettings dialog once the test had finished. That would then throw
exceptions because some of the mock environment had been torn down.

We're just testing that it opens the right dialog, so better to intercept
`createDialog`.

Aso add an `act` to reduce warnings, and replace a `flushPromises` with a
`waitFor` to make the test more robust.
@richvdh richvdh added this pull request to the merge queue Jul 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2025
@richvdh richvdh added this pull request to the merge queue Jul 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2025
@richvdh richvdh added this pull request to the merge queue Jul 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 28, 2025
@richvdh richvdh added this pull request to the merge queue Jul 28, 2025
Merged via the queue into develop with commit 7e40e36 Jul 28, 2025
45 checks passed
@richvdh richvdh deleted the rav/matrixchat_test_fixes branch July 28, 2025 16:48
Dileep9999 pushed a commit to hemanth-nag/element-web that referenced this pull request Oct 8, 2025
* MatrixChat-test: clean up better in `afterEach`

Make the MatrixChat tests behave better by letting them finish their work in an
`act` in afterEach. Otherwise we can end up mounting new components during
cleanup, which run tasks in the background

* MatrixChat-test: clean up dispatcher test

This test was kicking off a dispatcher job which would then open a
UserDeviceSettings dialog once the test had finished. That would then throw
exceptions because some of the mock environment had been torn down.

We're just testing that it opens the right dialog, so better to intercept
`createDialog`.

Aso add an `act` to reduce warnings, and replace a `flushPromises` with a
`waitFor` to make the test more robust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants