From 807539443046ae06dc134a07e55733c8ef4fa9e9 Mon Sep 17 00:00:00 2001 From: far-fetched Date: Wed, 3 Nov 2021 08:53:36 +0100 Subject: [PATCH] :white_check_mark: update dialog test - composition with transitions --- tests/integration/components/dialog-test.js | 40 ++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/tests/integration/components/dialog-test.js b/tests/integration/components/dialog-test.js index 94202663..62d581f6 100644 --- a/tests/integration/components/dialog-test.js +++ b/tests/integration/components/dialog-test.js @@ -315,15 +315,39 @@ module('Integration | Component | ', function (hooks) { }); module('Composition', function () { - todo( - 'it should be possible to open the Dialog via a Transition component', - async function () {} - ); + test('it should be possible to open the Dialog via a Transition component', async function () { + this.set('noop', function () {}); - todo( - 'it should be possible to close the Dialog via a Transition component', - async function () {} - ); + await render(hbs` + + + Hello +
+
+
+ `); + + assertDialog({ state: DialogState.Visible }); + assertDialogDescription({ + state: DialogState.Visible, + textContent: 'Hello', + }); + }); + + test('it should be possible to close the Dialog via a Transition component', async function () { + this.set('noop', function () {}); + + await render(hbs` + + + Hello +
+
+
+ `); + + assertDialog({ state: DialogState.InvisibleUnmounted }); + }); }); module('Keyboard interactions', function () {