A platform for community discussion. Free, open, simple.
DEV: wait for CSS transition in skip-links test (#43121)
David Taylorb0877e98d0d7
diff --git a/frontend/discourse/tests/integration/components/a11y/skip-links-test.gjs b/frontend/discourse/tests/integration/components/a11y/skip-links-test.gjsindex 017cdfc7cee..bb9e4c7768f 100644--- a/frontend/discourse/tests/integration/components/a11y/skip-links-test.gjs+++ b/frontend/discourse/tests/integration/components/a11y/skip-links-test.gjs@@ -1,4 +1,4 @@-import { find, focus, render } from "@ember/test-helpers";+import { find, focus, render, waitUntil } from "@ember/test-helpers";import { module, test } from "qunit";import { setupRenderingTest } from "discourse/tests/helpers/component-test";import { i18n } from "discourse-i18n";@@ -79,6 +79,8 @@ module("Integration | Component | A11y | SkipLinks", function (hooks) {await focus(skipLink);assert.dom(skipLink).isFocused("skip link receives focus");+ await waitUntil(() => window.getComputedStyle(skipLink).top === "0px");+computedStyle = window.getComputedStyle(skipLink);assert.strictEqual(computedStyle.top,