Skip to content

Commit

Permalink
fixup! add dropdown primitive ctd
Browse files Browse the repository at this point in the history
  • Loading branch information
amk221 committed Dec 11, 2024
1 parent 5ffd644 commit f6197fc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module('select-box (edge cases)', function (hooks) {
await click('.select-box__option'); // Close
});

test('clicking a child that goes away (and so is the select box)', async function (assert) {
test('destroying a select box after clicking an option', async function (assert) {
assert.expect(1);

const state = new (class {
Expand Down Expand Up @@ -83,10 +83,10 @@ module('select-box (edge cases)', function (hooks) {
await click('.select-box .dropdown__trigger');
await click('.select-box__option');

assert.ok(true, 'does not cause infinite revalidation bug');
assert.dom('.select-box').doesNotExist('does not cause infinite revalidation bug');
});

test('destroying a select box with an input, and a dropdown with no trigger', async function (assert) {
test('destroying a select box with a focused input (and no trigger)', async function (assert) {
assert.expect(1);

const state = new (class {
Expand Down Expand Up @@ -124,6 +124,5 @@ module('select-box (edge cases)', function (hooks) {
await triggerKeyEvent('.select-box__input', 'keydown', 'ArrowDown');
await triggerKeyEvent('.select-box__option', 'keydown', 'Enter');

assert.dom('.select-box').doesNotExist();
});
assert.dom('.select-box').doesNotExist('does not cause infinite revalidation bug');
});

0 comments on commit f6197fc

Please sign in to comment.