feat(permissions): expose network permission state (#103)
This commit is contained in:
@ -55,6 +55,22 @@ describe("TerminalView (with MockTerminalGateway)", () => {
|
||||
expect(screen.getByTestId("terminal-view")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("shows a non-blocking network banner when system permissions are locked", () => {
|
||||
renderView(new MockTerminalGateway(), "/home/me/proj", {
|
||||
systemPermissions: {
|
||||
wanted: "allow",
|
||||
effective: "deny",
|
||||
runtimeLock: { state: "locked", reason: "Runtime network locked." },
|
||||
control: { mode: "readOnly", reason: "Runtime network locked." },
|
||||
},
|
||||
});
|
||||
|
||||
expect(screen.getByTestId("terminal-network-banner").textContent).toContain(
|
||||
"Réseau verrouillé par le runtime.",
|
||||
);
|
||||
expect(screen.getByTestId("terminal-view")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("opens a terminal through the gateway with the given cwd", async () => {
|
||||
const gw = new MockTerminalGateway();
|
||||
const openSpy = vi.spyOn(gw, "openTerminal");
|
||||
|
||||
Reference in New Issue
Block a user