Better backup integration test harness

This commit is contained in:
Fedor Indutny 2024-09-20 20:10:28 -07:00 committed by GitHub
parent 32485abf06
commit a6a838a673
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 147 additions and 198 deletions

View file

@ -38,6 +38,7 @@ import { getTitleNoDefault } from './util/getTitle';
import * as StorageService from './services/storage';
import type { ConversationPropsForUnreadStats } from './util/countUnreadStats';
import { countAllConversationsUnreadStats } from './util/countUnreadStats';
import { isTestOrMockEnvironment } from './environment';
type ConvoMatchType =
| {
@ -183,7 +184,7 @@ export class ConversationController {
// then we reset the state right away.
this._conversations.on('add', (model: ConversationModel): void => {
// Don't modify conversations in backup integration testing
if (window.SignalCI?.isBackupIntegration) {
if (isTestOrMockEnvironment()) {
return;
}
model.startMuteTimer();