|
15 | 15 | // along with this program. If not, see <https://www.gnu.org/licenses/>.
|
16 | 16 | // =============================================================================
|
17 | 17 |
|
18 |
| -import { render, screen, fireEvent } from "@testing-library/react"; |
| 18 | +import { render, screen } from "@testing-library/react"; |
19 | 19 | import React from "react";
|
| 20 | +import contentFixture from "../contentModels/__fixtures__/tenant_content_exhaustive"; |
20 | 21 | import createMetricMapping from "../contentModels/createMetricMapping";
|
21 | 22 | import type PopulationBreakdownByLocationMetric from "../contentModels/PopulationBreakdownByLocationMetric";
|
22 |
| -import contentFixture from "../contentModels/__fixtures__/tenant_content_exhaustive"; |
23 |
| -import { reactImmediately } from "../testUtils"; |
24 | 23 | import LocalityFilterSelect from "./LocalityFilterSelect";
|
25 | 24 |
|
26 | 25 | const testTenantId = "US_ND";
|
@@ -57,40 +56,21 @@ test("has expected options", () => {
|
57 | 56 | const metric = getTestMetric();
|
58 | 57 | render(<LocalityFilterSelect metric={metric} />);
|
59 | 58 |
|
60 |
| - const menuButton = screen.getByRole("button", { |
| 59 | + const menuButton = screen.queryByRole("button", { |
61 | 60 | name: "Judicial District All Districts",
|
62 | 61 | });
|
63 |
| - fireEvent.click(menuButton); |
64 |
| - |
65 |
| - const options = screen.getAllByRole("option"); |
66 |
| - |
67 |
| - expect(options.length).toBe(expectedLocalities.length); |
68 | 62 |
|
69 |
| - options.forEach((option, index) => |
70 |
| - expect(option).toHaveTextContent(expectedLocalities[index].label) |
71 |
| - ); |
| 63 | + expect(menuButton).toBeNull(); // Jurisdiction Dropdowns should no longer display for ND as of February 2025 |
72 | 64 | });
|
73 | 65 |
|
74 | 66 | test("changes demographic filter", () => {
|
75 | 67 | const metric = getTestMetric();
|
76 | 68 | render(<LocalityFilterSelect metric={metric} />);
|
77 | 69 |
|
78 |
| - const menuButton = screen.getByRole("button", { |
| 70 | + const menuButton = screen.queryByRole("button", { |
79 | 71 | name: "Judicial District All Districts",
|
80 | 72 | });
|
81 | 73 |
|
82 |
| - expectedLocalities.forEach((expectedLocality) => { |
83 |
| - // open the menu |
84 |
| - fireEvent.click(menuButton); |
85 |
| - |
86 |
| - const option = screen.getByRole("option", { name: expectedLocality.label }); |
87 |
| - fireEvent.click(option); |
88 |
| - |
89 |
| - reactImmediately(() => { |
90 |
| - expect(metric.localityId).toBe(expectedLocality.id); |
91 |
| - expect(menuButton).toHaveTextContent(expectedLocality.label); |
92 |
| - }); |
93 |
| - }); |
94 |
| - |
| 74 | + expect(menuButton).toBeNull(); // Jurisdiction Dropdowns should no longer display for ND as of February 2025 |
95 | 75 | expect.hasAssertions();
|
96 | 76 | });
|
0 commit comments