Playwright tests for RoomStatusBar (#31579)

* Add a timeout for toast checks

* Add tests for room status bar

* Fix MAU toast never appearing.

* Also cover local room create fails.

* fix await

* docstring

* Enwiden

* Add a test for the changes
This commit is contained in:
Will Hunt
2025-12-19 12:16:01 +00:00
committed by GitHub
parent 63bf04384a
commit 87d529701c
8 changed files with 207 additions and 5 deletions
+4 -3
View File
@@ -359,14 +359,15 @@ class LoggedInView extends React.Component<IProps, IState> {
const newErrCode = (data?.error as MatrixError)?.errcode;
if (syncState === oldSyncState && oldErrCode === newErrCode) return;
const syncErrorData = syncState === SyncState.Error ? data : undefined;
this.setState({
syncErrorData: syncState === SyncState.Error ? data : undefined,
syncErrorData,
});
if (oldSyncState === SyncState.Prepared && syncState === SyncState.Syncing) {
this.updateServerNoticeEvents();
} else {
this.calculateServerLimitToast(this.state.syncErrorData, this.state.usageLimitEventContent);
this.calculateServerLimitToast(syncErrorData, this.state.usageLimitEventContent);
}
};
@@ -391,7 +392,7 @@ class LoggedInView extends React.Component<IProps, IState> {
// usageLimitDismissed is true when the user has explicitly hidden the toast
// and it will be reset to false if a *new* usage alert comes in.
if (usageLimitEventContent && this.state.usageLimitDismissed) {
if (usageLimitEventContent && !this.state.usageLimitDismissed) {
showServerLimitToast(
usageLimitEventContent.limit_type,
this.onUsageLimitDismissed,