mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
feat: load plugin frontends at runtime and remove plugin ids from the shell
This commit is contained in:
1 parent
49f0286a14
commit
e88d5a52e3
721 files changed
+54265
-44416
No files matched your search
@@ -30,24 +30,15 @@ describe("ONBOARDING_STEPS", () => {
|
||||
});
|
||||
|
||||
it("has no add-a-host step, which used to close onboarding mid-flow", () => {
|
||||
const ids = relevantSteps({ aiGloballyEnabled: false }).map((s) => s.id);
|
||||
const ids = relevantSteps({}).map((s) => s.id);
|
||||
expect(ids).not.toContain("first-host");
|
||||
});
|
||||
|
||||
it("ends on the done step", () => {
|
||||
const ids = relevantSteps({ aiGloballyEnabled: false }).map((s) => s.id);
|
||||
const ids = relevantSteps({}).map((s) => s.id);
|
||||
expect(ids[ids.length - 1]).toBe("done");
|
||||
});
|
||||
|
||||
it("only offers the AI step when an admin has enabled the assistant", () => {
|
||||
// A user on an instance with AI switched off should never be told the
|
||||
// feature exists, so the step has to disappear rather than render disabled.
|
||||
const off = relevantSteps({ aiGloballyEnabled: false }).map((s) => s.id);
|
||||
const on = relevantSteps({ aiGloballyEnabled: true }).map((s) => s.id);
|
||||
expect(off).not.toContain("ai");
|
||||
expect(on).toContain("ai");
|
||||
});
|
||||
|
||||
it("tours the feature set after the setup choices", () => {
|
||||
const ids = ONBOARDING_STEPS.map((s) => s.id);
|
||||
for (const id of ["features", "workflow", "security"]) {
|
||||
@@ -60,16 +51,8 @@ describe("ONBOARDING_STEPS", () => {
|
||||
describe("onboarding step body translations", () => {
|
||||
const KEYS: Record<string, string[]> = {
|
||||
welcome: ["hosts", "terminal", "files"],
|
||||
feature: [
|
||||
"files",
|
||||
"desktop",
|
||||
"tunnels",
|
||||
"docker",
|
||||
"snippets",
|
||||
"automations",
|
||||
"metrics",
|
||||
],
|
||||
workflow: ["palette", "split", "dock", "workspaces"],
|
||||
feature: ["files", "tunnels", "snippets"],
|
||||
workflow: ["palette", "split", "dock"],
|
||||
security: ["credentials", "twofa", "identity", "sharing"],
|
||||
done: ["settings", "rerun", "docs"],
|
||||
};
|
||||
@@ -97,12 +80,6 @@ describe("onboarding step body translations", () => {
|
||||
"featuresIntro",
|
||||
"workflowIntro",
|
||||
"securityIntro",
|
||||
"aiIntro",
|
||||
"aiEnableTitle",
|
||||
"aiEnableDesc",
|
||||
"aiSkipTitle",
|
||||
"aiSkipDesc",
|
||||
"aiNote",
|
||||
"doneDesc",
|
||||
]) {
|
||||
expect(lookup(`onboarding.${key}`), key).toBeTypeOf("string");
|
||||
|
||||
Reference in new issue
Block a user