Skip to content

Commit d9283ff

Browse files
committed
whoops - same for wallcard
1 parent 7ade811 commit d9283ff

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

app/components/InstrumentWallCard.test.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
import { IfcInstrumentStatus } from "@/app/types";
1+
import { instListEntryWithRunstatePVandValue } from "@/app/types";
22
import { render } from "@testing-library/react";
33
import InstrumentWallCard from "@/app/components/InstrumentWallCard";
44

55
it("renders instrumentwallcard unchanged", () => {
6-
const instrument: IfcInstrumentStatus = {
6+
const instrument: instListEntryWithRunstatePVandValue = {
77
name: "Instrument",
8-
runstate: "RUNNING",
8+
runStateValue: "RUNNING",
9+
pvPrefix: "",
10+
runStatePV: "",
11+
groups: ["EXCITATIONS"],
12+
isScheduled: true,
13+
seci: false,
14+
hostName: "",
15+
targetStation: "TS5",
916
};
1017
const { container } = render(<InstrumentWallCard instrument={instrument} />);
1118
expect(container).toMatchSnapshot();
1219
});
1320

1421
it("renders instrumentwallcard unchanged when runstate is unknown", () => {
15-
const instrument: IfcInstrumentStatus = {
22+
const instrument: instListEntryWithRunstatePVandValue = {
1623
name: "Instrument1",
24+
runStateValue: "",
25+
pvPrefix: "",
26+
runStatePV: "",
27+
groups: ["EXCITATIONS"],
28+
isScheduled: true,
29+
seci: false,
30+
hostName: "",
31+
targetStation: "TS5",
1732
};
1833
const { container } = render(<InstrumentWallCard instrument={instrument} />);
1934
expect(container).toMatchSnapshot();

app/components/PVutils.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ test("getPrefix returns an instrument prefix if instName is in instlist", () =>
172172
seci: false,
173173
groups: [],
174174
hostName: myInstName,
175+
targetStation: "TS9",
175176
},
176177
];
177178
expect(getPrefix(instList, myInstName)).toEqual(myInstPrefix);

app/components/__snapshots__/InstrumentWallCard.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`renders instrumentwallcard unchanged 1`] = `
77
>
88
<a
99
class="flex items-center justify-center text-center p-3 w-36 max-h-12 rounded-lg shadow-sm border-2 border-gray-700 dark:border-gray-200 hover:shadow-lg hover:border-black dark:hover:border-gray-700 transition-all duration-200
10-
bg-[#F08080] text-black"
10+
bg-[#90EE90] text-black"
1111
href="/instrument?name=Instrument"
1212
target="_blank"
1313
>
@@ -22,7 +22,7 @@ exports[`renders instrumentwallcard unchanged 1`] = `
2222
<span
2323
class="text-xs "
2424
>
25-
UNKNOWN
25+
RUNNING
2626
</span>
2727
</div>
2828
</a>

0 commit comments

Comments
 (0)