Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Sep 10, 2024
2 parents 0d6437a + 2e88374 commit e9a2279
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/__tests__/upload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe('Image upload form', () => {
});
});

async function submitForm(frm): Promise<boolean> {
async function submitForm(frm: HTMLFormElement): Promise<boolean> {
return new Promise(resolve => {
function onSubmit() {
frm.removeEventListener('submit', onSubmit);
Expand All @@ -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
Expand All @@ -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]);
Expand Down

0 comments on commit e9a2279

Please sign in to comment.