diff --git a/packages/test-app/tests/integration/components/portal-test.ts b/packages/test-app/tests/integration/components/portal-test.ts index 70319e716..4a315ba7b 100644 --- a/packages/test-app/tests/integration/components/portal-test.ts +++ b/packages/test-app/tests/integration/components/portal-test.ts @@ -287,4 +287,27 @@ module('Integration | Component | portal', function (hooks) { assert.ok(action.calledWithExactly(1)); }); + + test('initial rendering a portal into a target triggers onChange', async function (assert) { + const action = sinon.spy(); + this.set('action', action); + + await render(hbs` + + + +
foo
+
+ + +
bar
+
+ `); + + await settled(); + + assert.ok(action.calledWithExactly(1)); + assert.ok(action.calledWithExactly(2)); + assert.equal(action.callCount, 2); + }); });