removelevelbutton tests

This commit is contained in:
realaravinth
2021-05-07 18:37:44 +05:30
parent 5b5a995f57
commit d4cf24493a
5 changed files with 148 additions and 14 deletions

View File

@@ -29,13 +29,13 @@ const updateInput = (levelGroup: Element, newLevel: number) => {
const id = `${CONST.VISITOR_WITHOUT_LEVEL}${newLevel}`;
input.id = id;
input.name = id;
}
if (input.id.includes(CONST.DIFFICULTY_WITHOUT_LEVEL)) {
} else if (input.id.includes(CONST.DIFFICULTY_WITHOUT_LEVEL)) {
log.log('changing difficulty input');
const id = `${CONST.DIFFICULTY_WITHOUT_LEVEL}${newLevel}`;
input.id = id;
input.name = id;
} else {
throw new Error('Did you add an extra input to DOM?');
}
});
};