DEV: Abort on invalid state instead of hanging

DEV: Abort on invalid state instead of hanging

Not a cleanest solution but will prevent this test from timing out and will act as an early warning for composer state leakage.

diff --git a/test/javascripts/acceptance/encrypt-test.js.es6 b/test/javascripts/acceptance/encrypt-test.js.es6
index 2c44bd7..351b78f 100644
--- a/test/javascripts/acceptance/encrypt-test.js.es6
+++ b/test/javascripts/acceptance/encrypt-test.js.es6
@@ -237,6 +237,12 @@ test("posting does not leak plaintext", async assert => {
   await click("#create-topic");
   await composerActions.expand();
   await composerActions.selectRowByValue("reply_as_private_message");
+
+  if (find('.users-input').text().trim() != "") {
+    globalAssert = null;
+    throw new Error("Another test is leaking composer state");
+  }
+
   await fillIn("#private-message-users", "admin");
   await keyEvent("#private-message-users", "keydown", 8);
   await keyEvent("#private-message-users", "keydown", 13);

GitHub sha: 9e2ccd65