Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design/tpr-ui-kit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4802,7 +4802,7 @@ <h4>Policies</h4>
<div class="group-card">
<h4>Emissions</h4>
<div class="item">
<p class="item-lab">Emissions target (driver)</p>
<p class="item-lab">Emissions target</p>
<p class="item-body absent">
Not a core driver for this pathway.
</p>
Expand Down
10 changes: 9 additions & 1 deletion src/components/CoreDrivers.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { describe, it, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import { CoreDriverItem, CORE_DRIVER_LABELS } from "./CoreDrivers";
import {
CoreDriverItem,
CORE_DRIVER_LABELS,
coreDriverLabel,
} from "./CoreDrivers";
import type { CoreDrivers } from "./CoreDrivers";

const drivers = {
Expand Down Expand Up @@ -93,4 +97,8 @@ describe("CoreDriverItem", () => {
"otherDrivers",
]);
});

it('labels the emissions target driver plainly, without "(driver)"', () => {
expect(coreDriverLabel("emissionsTargets")).toBe("Emissions target");
});
});
2 changes: 1 addition & 1 deletion src/components/CoreDrivers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type CoreDriverKey = keyof CoreDrivers;
*/
export const CORE_DRIVER_LABELS: { key: CoreDriverKey; label: string }[] = [
{ key: "policies", label: "Policy drivers" },
{ key: "emissionsTargets", label: "Emissions target (driver)" },
{ key: "emissionsTargets", label: "Emissions target" },
{ key: "technologyCosts", label: "Technology cost drivers" },
{ key: "investmentChange", label: "Investment change" },
{ key: "macroeconomicDrivers", label: "Macroeconomic drivers" },
Expand Down
Loading