Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test(dashboard): wait for the send button to disable in MessageTester

Yudhi Armyndharis9d4d451566c0
diff --git a/dashboard/src/pages/MessageTester.test.ts b/dashboard/src/pages/MessageTester.test.ts
index 7e5a9e4e5..16192e1cf 100644
--- a/dashboard/src/pages/MessageTester.test.ts
+++ b/dashboard/src/pages/MessageTester.test.ts
@@ -316,7 +316,7 @@ test('a session that stops being ready is replaced by what the selector shows',
status.s1 = 'disconnected';
await client.invalidateQueries({ queryKey: ['sessions'] });
await rtl.waitFor(() => assert.equal(select.value, ''));
- assert.equal(sendButton().disabled, true);
+ await rtl.waitFor(() => assert.equal(sendButton().disabled, true));
});
test('a recipients file over the cap is refused without being read', async () => {