Tests: Add test for selection option in <select>

Verify that we can select option using JS
This commit is contained in:
Timur Sultanov 2024-07-25 21:11:53 +04:00 committed by Sam Atkins
parent ad7b2b7c26
commit 1ce9bbdd6d
Notes: github-actions[bot] 2024-07-26 08:16:34 +00:00
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<select id="select-test">
<option>A</option>
<option>B</option>
</select>
<script>
test(() => {
const s = document.getElementById("select-test");
s.options[1].selected = true;
if(s.value === "B") {
println("PASS");
}
});
</script>