diff --git a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs index 9e9711b50604e..b2f044d080947 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs +++ b/app/assets/javascripts/discourse/tests/integration/components/plugin-outlet-test.gjs @@ -1134,3 +1134,56 @@ module( }); } ); + +module( + "Integration | Component | plugin-outlet | whitespace", + function (hooks) { + setupRenderingTest(hooks); + + test("no whitespace for unused outlet", async function (assert) { + await render( + + ); + assert.dom(".test-wrapper").hasText(/^$/, "no whitespace"); // using regex to avoid hasText builtin strip + }); + + test("no whitespace for used outlet", async function (assert) { + extraConnectorComponent("test-name", ); + + await render( + + ); + assert.dom(".test-wrapper").hasText(/^$/, "no whitespace"); // using regex to avoid hasText builtin strip + }); + + test("no whitespace for unused wrapper outlet", async function (assert) { + await render( + + ); + assert.dom(".test-wrapper").hasText(/^foo$/, "no whitespace"); // using regex to avoid hasText builtin strip + }); + + test("no whitespace for used wrapper outlet", async function (assert) { + extraConnectorComponent( + "test-name", + + ); + await render( + + ); + assert.dom(".test-wrapper").hasText(/^foo$/, "no whitespace"); // using regex to avoid hasText builtin strip + }); + } +);