Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Update format
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed Jul 5, 2024
1 parent 1db5ed3 commit 9b5eac5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions frontend/tests/components/search/SearchSortBy.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ describe("SearchSortBy", () => {
target: { value: "opportunityTitleDesc" },
});

expect(
screen.getByText("Opportunity Title (Z to A)"),
).toBeInTheDocument();
expect(screen.getByText("Opportunity Title (Z to A)")).toBeInTheDocument();
});
});
6 changes: 4 additions & 2 deletions frontend/tests/e2e/search/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ test.describe("Search page tests", () => {
await waitForSearchResultsInitialLoad(page);

// Verify that page 1 is highlighted
currentPageButton = page.locator(".usa-pagination__button.usa-current").first();
currentPageButton = page
.locator(".usa-pagination__button.usa-current")
.first();
await expect(currentPageButton).toHaveAttribute("aria-label", "Page 1");

// It should not have a page query param set
expectURLContainsQueryParam(page, "page", "1", false);
});
Expand Down
8 changes: 3 additions & 5 deletions frontend/tests/hooks/useSearchParamUpdater.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jest.mock("next/navigation", () => ({
}));

describe("useSearchParamUpdater", () => {

it("updates a singular param and pushes new path", async () => {
const { result } = renderHook(() => useSearchParamUpdater());

Expand Down Expand Up @@ -49,10 +48,9 @@ describe("useSearchParamUpdater", () => {
result.current.updateQueryParams(statuses, "status", "test");

await waitFor(() => {
expect(routerPush).toHaveBeenCalledWith(
"/test?query=test",
{ scroll: false },
);
expect(routerPush).toHaveBeenCalledWith("/test?query=test", {
scroll: false,
});
});
});
});

0 comments on commit 9b5eac5

Please sign in to comment.