diff --git a/assets/js/__tests__/upload.spec.ts b/assets/js/__tests__/upload.spec.ts index bd5d9c5e..027241f8 100644 --- a/assets/js/__tests__/upload.spec.ts +++ b/assets/js/__tests__/upload.spec.ts @@ -214,7 +214,7 @@ describe('Image upload form', () => { }); }); - async function submitForm(frm): Promise { + async function submitForm(frm: HTMLFormElement): Promise { return new Promise(resolve => { function onSubmit() { frm.removeEventListener('submit', onSubmit); @@ -232,7 +232,7 @@ describe('Image upload form', () => { it('should prevent form submission if tag checks fail', async () => { for (let i = 0; i < tagSets.length; i += 1) { - taginputEl.value = tagSets[i]; + taginputEl.innerText = tagSets[i]; if (await submitForm(form)) { // form submit succeeded @@ -243,7 +243,7 @@ describe('Image upload form', () => { }); } else { // form submit prevented - frm = form; + const frm = form; await waitFor(() => { assertSubmitButtonIsEnabled(); expect(frm.querySelectorAll('.help-block')).toHaveLength(tagErrorCounts[i]);