From 1b4dea75ee299f89bfbe0bde70d257f8bbf1c264 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Sat, 16 Jul 2022 22:56:19 +0200 Subject: [PATCH] DEV: Also reset horizontal scroll after each test (#17527) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤞 maybe this will cover the remaining out-of-viewport flakes --- app/assets/javascripts/discourse/tests/setup-tests.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/tests/setup-tests.js b/app/assets/javascripts/discourse/tests/setup-tests.js index 5af7971802f..3f24b5122a9 100644 --- a/app/assets/javascripts/discourse/tests/setup-tests.js +++ b/app/assets/javascripts/discourse/tests/setup-tests.js @@ -311,8 +311,10 @@ export default function setupTests(config) { let testing = document.getElementById("ember-testing"); testing.removeAttribute("class"); testing.removeAttribute("style"); - let testContainer = document.getElementById("ember-testing-container"); + + const testContainer = document.getElementById("ember-testing-container"); testContainer.scrollTop = 0; + testContainer.scrollLeft = 0; flushMap();