-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ui-temp-ext
- Loading branch information
Showing
11 changed files
with
2,578 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { describe, expect, it } from "vitest"; | ||
import { getOsData } from "./useSearch"; | ||
import { cpocsList } from "mocks/data/cpocs"; | ||
import { getMainExportData } from "./useSearch"; | ||
import { DEFAULT_FILTERS } from "@/components/Opensearch/main/useOpensearch"; | ||
import { getFilteredDocList } from "mocks/data/items"; | ||
|
||
describe("getOsData tests", () => { | ||
it("should return cpocs", async () => { | ||
const results = await getOsData({ | ||
index: "cpocs", | ||
sort: { | ||
field: "lastName", | ||
order: "asc", | ||
}, | ||
pagination: { | ||
number: 0, | ||
size: 20, | ||
}, | ||
filters: [], | ||
}); | ||
expect(results.hits.hits).toEqual(cpocsList); | ||
describe("getMainExportData tests", () => { | ||
it("should return spa items", async () => { | ||
const results = await getMainExportData(DEFAULT_FILTERS.spas.filters); | ||
expect(results).toEqual(getFilteredDocList(["Medicaid SPA", "CHIP SPA"])); | ||
}); | ||
|
||
it("should return waiver items", async () => { | ||
const results = await getMainExportData(DEFAULT_FILTERS.waivers.filters); | ||
expect(results).toEqual(getFilteredDocList(["1915(b)", "1915(c)"])); | ||
}); | ||
|
||
it("should return an empty array if there are no filters", async () => { | ||
const results = await getMainExportData(); | ||
expect(results).toEqual([]); | ||
}); | ||
}); |
Oops, something went wrong.