Fix automated test issues

Closes: https://github.com/damus-io/damus/issues/3275
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-10-20 17:33:40 -07:00
parent 690f8b891e
commit 9555145359
8 changed files with 65 additions and 49 deletions

View File

@@ -12,12 +12,12 @@ import EmojiPicker
// Generates a test damus state with configurable mock parameters
func generate_test_damus_state(
mock_profile_info: [Pubkey: Profile]?,
home: HomeModel? = nil
home: HomeModel? = nil,
addNdbToRelayPool: Bool = true
) -> DamusState {
// Create a unique temporary directory
let ndb = Ndb.test
let our_pubkey = test_pubkey
let pool = RelayPool(ndb: ndb)
let settings = UserSettingsStore()
let profiles: Profiles = {
@@ -51,7 +51,8 @@ func generate_test_damus_state(
ndb: ndb,
quote_reposts: .init(our_pubkey: our_pubkey),
emoji_provider: DefaultEmojiProvider(showAllVariations: false),
favicon_cache: .init()
favicon_cache: .init(),
addNdbToRelayPool: addNdbToRelayPool
)
home?.damus_state = damus