From 068dfbc327e6550e3e12dd434ddbc94855803213 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 8 Aug 2024 22:44:19 +1000 Subject: [PATCH] Attachment mock test: wait for draft attachment ready before send --- ts/models/conversations.ts | 2 +- ts/test-mock/messaging/attachments_test.ts | 3 +++ ts/textsecure/AccountManager.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 2947ffabd..475665b47 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -4152,7 +4152,7 @@ export class ConversationModel extends window.Backbone ) ); drop( - this.queueJob('maybeAddRemovedNotificaiton', async () => + this.queueJob('maybeAddRemovedNotification', async () => this.maybeSetContactRemoved() ) ); diff --git a/ts/test-mock/messaging/attachments_test.ts b/ts/test-mock/messaging/attachments_test.ts index b06b4545c..28457c072 100644 --- a/ts/test-mock/messaging/attachments_test.ts +++ b/ts/test-mock/messaging/attachments_test.ts @@ -65,6 +65,9 @@ describe('attachments', function (this: Mocha.Suite) { .setInputFiles( path.join(__dirname, '..', '..', '..', 'fixtures', 'cat-screenshot.png') ); + await page + .locator('.module-image.module-staged-attachment .module-image__image') + .waitFor(); const input = await app.waitForEnabledComposer(); await typeIntoInput(input, 'This is my cat'); await input.press('Enter'); diff --git a/ts/textsecure/AccountManager.ts b/ts/textsecure/AccountManager.ts index b477b8ebf..9a1d8ba5d 100644 --- a/ts/textsecure/AccountManager.ts +++ b/ts/textsecure/AccountManager.ts @@ -779,7 +779,7 @@ export default class AccountManager extends EventTarget { serviceIdKind: ServiceIdKind, identityKey: KeyPairType ): Promise { - const logId = `generateLastRestortKyberKey(${serviceIdKind})`; + const logId = `generateLastResortKyberKey(${serviceIdKind})`; const kyberKeyId = getNextKeyId(serviceIdKind, KYBER_KEY_ID_KEY); if (typeof kyberKeyId !== 'number') {