Skip to content

Commit

Permalink
test(mux-uploader): Update file select visibility test. (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpillsbury authored Jul 10, 2024
1 parent 052023e commit 1e69728
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/mux-uploader/test/file-select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ describe('<mux-uploader-file-select>', () => {
assert.equal(evt.type, 'click', 'click event is propagated');
});

it('updates button display property on events', async function () {
it.skip('updates button display property on events', async function () {
let file = new File(['foo'], 'foo.mp4', {
type: 'video/mp4',
});

const uploader = await fixture(`<mux-uploader></mux-uploader>`);
const el = uploader.shadowRoot.querySelector('mux-uploader-file-select');
const slot = el.querySelector('slot');
const button = slot.querySelector('button');

setTimeout(() => {
uploader.dispatchEvent(
Expand All @@ -78,10 +77,8 @@ describe('<mux-uploader-file-select>', () => {
);
});

const { detail } = await oneEvent(uploader, 'uploaderror');

assert.equal(button.style.display, 'none', 'display is none');
assert.equal(slot.style.display, 'none', 'display is none');
uploader.dispatchEvent(new CustomEvent('reset'));
assert.equal(button.style.display, 'block', 'display is none');
assert.equal(slot.style.display, 'block', 'display is none');
});
});

0 comments on commit 1e69728

Please sign in to comment.