From 8d5cc8956d979a48140cf840585069e10207c2e6 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Fri, 3 Apr 2020 14:45:27 +1100 Subject: [PATCH] DEV: avoid leaked HTTP call in test We were running a failed request on route transition, this avoids it by faking it. --- test/javascripts/acceptance/composer-test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/javascripts/acceptance/composer-test.js b/test/javascripts/acceptance/composer-test.js index b9da96ee5e..5af2698555 100644 --- a/test/javascripts/acceptance/composer-test.js +++ b/test/javascripts/acceptance/composer-test.js @@ -841,6 +841,10 @@ QUnit.test("can reply to a private message", async assert => { return [200, { "Content-Type": "application/json" }, {}]; }); + // a bit messy but we need a fake here cause we issue a route transition + // to the new post + server.get("/t/34/4.json", () => server.get("/t/34.json")); + await visit("/t/34"); await click(".topic-post:eq(0) button.reply"); await fillIn(".d-editor-input", "this is the *content* of the reply");