From f00eed8633cd1ab714bfc962f0509e61771b954f Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Mon, 10 Mar 2025 13:35:13 -0500 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=92=8D=20fix=20false=20positive?= =?UTF-8?q?=20test=20(#2712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/admin/tests/acceptance/develop-test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/admin/tests/acceptance/develop-test.js b/ui/admin/tests/acceptance/develop-test.js index 3c8253daa..c0fe3825f 100644 --- a/ui/admin/tests/acceptance/develop-test.js +++ b/ui/admin/tests/acceptance/develop-test.js @@ -13,6 +13,7 @@ module('Acceptance | develop', function (hooks) { setupMirage(hooks); let featuresService; + const DEV_TOGGLE_SELECTOR = '[data-test-dev-edition-toggle]'; hooks.beforeEach(function () { const { owner } = getContext(); @@ -21,14 +22,17 @@ module('Acceptance | develop', function (hooks) { test('edition toggle is hidden when `dev-edition-toggle` is false', async function (assert) { await visit('/'); + assert.false(featuresService.isEnabled('dev-edition-toggle')); - assert.dom('data-dev-edition-toggle').doesNotExist(); + assert.dom(DEV_TOGGLE_SELECTOR).doesNotExist(); }); test('edition toggle is visible when `dev-edition-toggle` is true', async function (assert) { assert.false(featuresService.isEnabled('dev-edition-toggle')); featuresService.enable('dev-edition-toggle'); + await visit('/'); - assert.dom('data-dev-edition-toggle').doesNotExist(); + + assert.dom(DEV_TOGGLE_SELECTOR).isVisible(); }); });