mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix: hide the built-in source pill in the host editor
This commit is contained in:
1 parent
f97f35de1f
commit
c28cb1bfc6
2 files changed
+9
-1
No files matched your search
@@ -54,6 +54,14 @@ describe("HostDefaultBadge", () => {
|
||||
expect(screen.getByText("hostDefaults.source.folder:Prod")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("shows nothing for a value that follows the built-in default", () => {
|
||||
const { container } = withContext(
|
||||
context({ source: () => ({ level: "builtin" }) }),
|
||||
<HostDefaultBadge settingKey="core.sshPort" />,
|
||||
);
|
||||
expect(container.textContent).toBe("");
|
||||
});
|
||||
|
||||
it("offers a reset for a host's own value", () => {
|
||||
const value = context({ isOwn: () => true });
|
||||
withContext(value, <HostDefaultBadge settingKey="core.sshPort" />);
|
||||
|
||||
Reference in new issue
Block a user