MDL-78944 gradereport_grader: Spurious behat fix

This commit is contained in:
Mathew May
2024-02-15 11:00:07 +08:00
parent 6acc0648d8
commit 8a51a07d11
3 changed files with 13 additions and 4 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+11 -2
View File
@@ -242,6 +242,11 @@ export default class ColumnSearch extends GradebookSearchClass {
registerInputEvents() {
// Register & handle the text input.
this.searchInput.addEventListener('input', debounce(async() => {
if (this.getSearchTerm() === this.searchInput.value && this.searchResultsVisible()) {
window.console.warn(`Search term matches input value - skipping`);
// Debounce can happen multiple times quickly.
return;
}
this.setSearchTerms(this.searchInput.value);
// We can also require a set amount of input before search.
if (this.searchInput.value === '') {
@@ -251,9 +256,13 @@ export default class ColumnSearch extends GradebookSearchClass {
// Display the "clear" search button in the search bar.
this.clearSearchButton.classList.remove('d-none');
}
const pendingPromise = new Pending();
// User has given something for us to filter against.
await this.filterrenderpipe();
}, 300));
await this.filterrenderpipe().then(() => {
pendingPromise.resolve();
return true;
});
}, 300, {pending: true}));
}
/**