Skip to content

Commit

Permalink
Merge pull request #122 from bertdeblock/enable-skipped-dialog-tests-…
Browse files Browse the repository at this point in the history
…again

Enable skipped dialog tests again
  • Loading branch information
GavinJoyce authored Dec 20, 2021
2 parents 8ac9d1d + 06625ba commit 566ec2d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/integration/components/dialog-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
triggerKeyEvent,
} from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { module, skip, test, todo } from 'qunit';
import { module, test, todo } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';

import userEvent from '@testing-library/user-event';
Expand Down Expand Up @@ -451,8 +451,7 @@ module('Integration | Component | <Dialog>', function (hooks) {
assertDialog({ state: DialogState.InvisibleUnmounted });
});

// https://github.com/GavinJoyce/ember-headlessui/issues/113
skip('it should be possible to close the dialog, and re-focus the button when we click outside on the body element', async function () {
test('it should be possible to close the dialog, and re-focus the button when we click outside on the body element', async function () {
this.set('isOpen', false);

await render(hbs`
Expand All @@ -477,8 +476,7 @@ module('Integration | Component | <Dialog>', function (hooks) {
await assertActiveElement(getByText('Trigger'));
});

// https://github.com/GavinJoyce/ember-headlessui/issues/113
skip('it should be possible to close the dialog, and keep focus on the focusable element', async function () {
test('it should be possible to close the dialog, and keep focus on the focusable element', async function () {
this.set('isOpen', false);

await render(hbs`
Expand Down Expand Up @@ -605,8 +603,7 @@ module('Integration | Component | <Dialog>', function (hooks) {
});

module('Nesting', function () {
// https://github.com/GavinJoyce/ember-headlessui/issues/113
skip.each(
test.each(
'it should be possible to open nested Dialog components and close them with `${strategy}`',
[
{
Expand Down Expand Up @@ -639,7 +636,11 @@ module('Integration | Component | <Dialog>', function (hooks) {
/>
`);

assert.strictEqual(getDialogs(), 0, 'Verify we have no open dialogs');
assert.strictEqual(
getDialogs().length,
0,
'Verify we have no open dialogs'
);

await click(getByText('Open 1'), 'Open Dialog 1');

Expand Down Expand Up @@ -882,8 +883,7 @@ module('Integration | Component | <Dialog>', function (hooks) {
});

module('InitialFocus', function () {
skip('it should focus requested element', async function (assert) {
// https://github.com/GavinJoyce/ember-headlessui/issues/113
test('it should focus requested element', async function (assert) {
this.set('isOpen', false);

await render(hbs`
Expand Down

0 comments on commit 566ec2d

Please sign in to comment.