fix(curriculum): add generate-btn click to sort-btn test (#62252)

This commit is contained in:
happypepii
2025-09-19 18:09:33 +08:00
committed by GitHub
parent 39164ca87f
commit dc5a75fbc3
@@ -286,11 +286,13 @@ try {
When you click the `#sort-btn`, you should make use of the `highlightCurrentEls` function to highlight the elements being compared in each step.
```js
const genBtn = document.querySelector("#generate-btn");
const sortBtn = document.querySelector("#sort-btn");
let flag = false;
const temp = highlightCurrentEls;
highlightCurrentEls = () => flag = true;
try {
genBtn.dispatchEvent(new Event("click"));
sortBtn.dispatchEvent(new Event("click"));
assert.isTrue(flag);
} finally {