diff --git a/ember-basic-dropdown/src/components/basic-dropdown-wormhole.hbs b/ember-basic-dropdown/src/components/basic-dropdown-wormhole.hbs index cfd4a445..d3e7804e 100644 --- a/ember-basic-dropdown/src/components/basic-dropdown-wormhole.hbs +++ b/ember-basic-dropdown/src/components/basic-dropdown-wormhole.hbs @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/ember-basic-dropdown/src/components/basic-dropdown-wormhole.ts b/ember-basic-dropdown/src/components/basic-dropdown-wormhole.ts index c8a58e86..f0c0e614 100644 --- a/ember-basic-dropdown/src/components/basic-dropdown-wormhole.ts +++ b/ember-basic-dropdown/src/components/basic-dropdown-wormhole.ts @@ -2,7 +2,11 @@ import Component from '@glimmer/component'; import { macroCondition, isTesting } from '@embroider/macros'; import config from 'ember-get-config'; -export default class BasicDropdownWormholeComponent extends Component { +export interface BasicDropdownWormholeSignature { + Element: Element; +} + +export default class BasicDropdownWormholeComponent extends Component { get getDestinationId(): string { // eslint-disable-next-line @typescript-eslint/no-explicit-any const _config = config as unknown as any; diff --git a/test-app/.eslintrc.js b/test-app/.eslintrc.js index 121ac75c..0c32c9a2 100644 --- a/test-app/.eslintrc.js +++ b/test-app/.eslintrc.js @@ -50,6 +50,9 @@ module.exports = { // test files files: ['tests/**/*-test.{js,ts}'], extends: ['plugin:qunit/recommended'], + rules: { + 'qunit/require-expect': 'off', + }, }, ], }; diff --git a/test-app/.template-lintrc.js b/test-app/.template-lintrc.js index f35f61c7..deafebf2 100644 --- a/test-app/.template-lintrc.js +++ b/test-app/.template-lintrc.js @@ -2,4 +2,8 @@ module.exports = { extends: 'recommended', + rules: { + 'no-inline-styles': false, + 'no-positive-tabindex': false, + }, }; diff --git a/test-app/tests/integration/components/basic-dropdown-test.js b/test-app/tests/integration/components/basic-dropdown-test.js index 61732cb7..1521f6aa 100644 --- a/test-app/tests/integration/components/basic-dropdown-test.js +++ b/test-app/tests/integration/components/basic-dropdown-test.js @@ -11,7 +11,6 @@ import { waitUntil, find, } from '@ember/test-helpers'; -import { settled } from '@ember/test-helpers'; let deprecations = []; @@ -278,7 +277,7 @@ module('Integration | Component | basic-dropdown', function (hooks) { `); await click('.ember-basic-dropdown-trigger'); - + assert .dom('.ember-basic-dropdown-trigger') .hasClass( @@ -922,7 +921,7 @@ module('Integration | Component | basic-dropdown', function (hooks) { `); - + //open the nested dropdown await click('.ember-basic-dropdown-trigger.parent'); assert.dom('.body-parent').exists('the parent dropdown is rendered'); diff --git a/test-app/tests/integration/components/basic-dropdown-wormhole-test.js b/test-app/tests/integration/components/basic-dropdown-wormhole-test.js new file mode 100644 index 00000000..85e2f950 --- /dev/null +++ b/test-app/tests/integration/components/basic-dropdown-wormhole-test.js @@ -0,0 +1,24 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { hbs } from 'ember-cli-htmlbars'; +import { render } from '@ember/test-helpers'; + +module('Integration | Component | basic-dropdown-wormhole', function (hooks) { + setupRenderingTest(hooks); + + test('Is present', async function (assert) { + await render(hbs` + + `); + + assert.dom('#ember-testing').exists('wormhole is present'); + }); + + test('Has class my-custom-class', async function (assert) { + await render(hbs` + + `); + + assert.dom('.my-custom-class').exists('my-custom-class was set'); + }); +});