fix jests

This commit is contained in:
Ahmed Awan
2023-10-12 10:33:31 -05:00
parent 1201ea0f75
commit 7cae1a6583
3 changed files with 2 additions and 11 deletions
@@ -201,7 +201,7 @@ describe("FilterMenu", () => {
// only add name filter in the advanced menu
let filterName = wrapper.find("[placeholder='any name']");
if (filterName.vm && filterName.props().type == "text") {
filterName.setValue("sample name");
await filterName.setValue("sample name");
}
// -------- Test keyup.enter key: ---------
@@ -81,15 +81,6 @@ const onTagsUpdate = (newTags, row) => {
updateTags(row.item.id, "History", row.item.tags);
};
const onToggle = () => {
showAdvanced.value = !showAdvanced.value;
};
const onSearch = () => {
onToggle();
updateFilter(filters.getFilterText(filterSettings.value));
};
const scrollToTop = () => {
scrollableDiv.value.scrollTo({ top: 0, behavior: "smooth" });
};
@@ -68,7 +68,7 @@ describe("ToolSearch", () => {
// Test: we route to the list with filters
const mockMethod = jest.fn();
$router.push = mockMethod;
wrapper.find("[data-description='apply filters']").trigger("click");
await wrapper.find("[data-description='apply filters']").trigger("click");
const filterSettings = {
name: "name-filter",
section: "section-filter",