feat: expand advanced widget experiences
This commit is contained in:
1 parent
9437d211c8
commit
c099a8eef6
119 files changed
+3624
-844
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { getUpsDevices } from "./component";
|
||||
|
||||
describe("UPS source ownership", () => {
|
||||
it("uses integration-scoped keys for overlapping device ids", () => {
|
||||
const devices = getUpsDevices([
|
||||
{
|
||||
integrationId: "ups-a",
|
||||
integrationName: "UPS A",
|
||||
summaries: [{ id: "same", status: "online" as const }],
|
||||
},
|
||||
{
|
||||
integrationId: "ups-b",
|
||||
integrationName: "UPS B",
|
||||
summaries: [{ id: "same", status: "online" as const }],
|
||||
},
|
||||
]);
|
||||
|
||||
expect(devices.map(({ key, integrationName }) => ({ key, integrationName }))).toEqual([
|
||||
{ key: "ups-a:same", integrationName: "UPS A" },
|
||||
{ key: "ups-b:same", integrationName: "UPS B" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user