mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
quick fixup
This commit is contained in:
parent
516f4a98fd
commit
2e88374ac1
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue