feat: finish Pi and workspace management updates
This commit is contained in:
@@ -238,25 +238,30 @@ test("shows a seven-step host-terminal workflow in scrollable platform tabs", as
|
||||
"Open the project root",
|
||||
"Edit the provider catalog",
|
||||
"Enable the model",
|
||||
"Set the provider credential",
|
||||
"Check the provider credential",
|
||||
"Reload Pi configuration",
|
||||
"Update the Pi version",
|
||||
"Recover a failed update",
|
||||
]);
|
||||
expect(linux).toHaveTextContent("The deploy directory is in the ThothII project root, beside compose.yaml");
|
||||
expect(linux).toHaveTextContent("The deploy directory is beside compose.yaml");
|
||||
expect(linux).toHaveTextContent("All commands below start in this project root");
|
||||
expect(linux).toHaveTextContent("mkdir -p bin");
|
||||
expect(linux).toHaveTextContent("go -C tools/thothctl build -o ../../bin/thothctl ./cmd/thothctl");
|
||||
expect(linux).toHaveTextContent("deploy/pi/models.json");
|
||||
expect(linux).toHaveTextContent("deploy/pi/settings.json");
|
||||
expect(linux).toHaveTextContent("baseUrl is the provider API endpoint");
|
||||
expect(linux).toHaveTextContent("enabledModels uses provider/model identifiers");
|
||||
expect(linux).toHaveTextContent("PI_AUTH_FILE is a setting in the installation environment file");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi restart --yes --drain");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi update --version <VERSION> --source build --yes --drain");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain");
|
||||
expect(linux).toHaveTextContent("<VERSION> is a placeholder. Replace it with the Pi release/version you want to install.");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi maintenance status");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi logs");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi rollback --yes");
|
||||
expect(linux).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi maintenance recover --yes");
|
||||
expect(linux).toHaveTextContent("Pi reads the provider API key from a protected file on the host");
|
||||
expect(linux).toHaveTextContent("Do not put the key in models.json or settings.json");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi restart --yes --drain");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi update");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain");
|
||||
expect(linux).toHaveTextContent("The command installs the Pi version pinned in docker/core.Dockerfile");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi maintenance status");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi logs");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi rollback --yes");
|
||||
expect(linux).toHaveTextContent("./bin/thothctl pi maintenance recover --yes");
|
||||
expect(linux).not.toHaveTextContent("~/bin/");
|
||||
expect(linux).not.toHaveTextContent("~/.pi/agent/");
|
||||
|
||||
await user.click(macosTab);
|
||||
@@ -266,22 +271,24 @@ test("shows a seven-step host-terminal workflow in scrollable platform tabs", as
|
||||
"Open the project root",
|
||||
"Edit the provider catalog",
|
||||
"Enable the model",
|
||||
"Set the provider credential",
|
||||
"Check the provider credential",
|
||||
"Reload Pi configuration",
|
||||
"Update the Pi version",
|
||||
"Recover a failed update",
|
||||
]);
|
||||
expect(macos).toHaveTextContent("The deploy directory is in the ThothII project root, beside compose.yaml");
|
||||
expect(macos).toHaveTextContent("The deploy directory is beside compose.yaml");
|
||||
expect(macos).toHaveTextContent("All commands below start in this project root");
|
||||
expect(macos).toHaveTextContent("go -C tools/thothctl build -o ../../bin/thothctl ./cmd/thothctl");
|
||||
expect(macos).toHaveTextContent("deploy/pi/models.json");
|
||||
expect(macos).toHaveTextContent("deploy/pi/settings.json");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi restart --yes --drain");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi update --version <VERSION> --source build --yes --drain");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain");
|
||||
expect(macos).toHaveTextContent("<VERSION> is a placeholder. Replace it with the Pi release/version you want to install.");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi maintenance status");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi logs");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi rollback --yes");
|
||||
expect(macos).toHaveTextContent("~/bin/thothctl --installation ~/thothii-installation.yaml pi maintenance recover --yes");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi restart --yes --drain");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi update");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain");
|
||||
expect(macos).toHaveTextContent("The command installs the Pi version pinned in docker/core.Dockerfile");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi maintenance status");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi logs");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi rollback --yes");
|
||||
expect(macos).toHaveTextContent("./bin/thothctl pi maintenance recover --yes");
|
||||
|
||||
await user.click(windowsTab);
|
||||
const windows = screen.getByRole("tabpanel", { name: "Windows" });
|
||||
@@ -290,22 +297,26 @@ test("shows a seven-step host-terminal workflow in scrollable platform tabs", as
|
||||
"Open the project root",
|
||||
"Edit the provider catalog",
|
||||
"Enable the model",
|
||||
"Set the provider credential",
|
||||
"Check the provider credential",
|
||||
"Reload Pi configuration",
|
||||
"Update the Pi version",
|
||||
"Recover a failed update",
|
||||
]);
|
||||
expect(windows).toHaveTextContent("The deploy directory is in the ThothII project root, beside compose.yaml");
|
||||
expect(windows).toHaveTextContent("The deploy directory is beside compose.yaml");
|
||||
expect(windows).toHaveTextContent("All commands below start in this project root");
|
||||
expect(windows).toHaveTextContent("deploy\\pi\\models.json");
|
||||
expect(windows).toHaveTextContent("deploy\\pi\\settings.json");
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi restart --yes --drain');
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi update --version <VERSION> --source build --yes --drain');
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain');
|
||||
expect(windows).toHaveTextContent("<VERSION> is a placeholder. Replace it with the Pi release/version you want to install.");
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi maintenance status');
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi logs');
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi rollback --yes');
|
||||
expect(windows).toHaveTextContent('& (Resolve-Path "~\\bin\\thothctl-windows-amd64.exe") --installation (Resolve-Path "~\\thothii-installation.yaml") pi maintenance recover --yes');
|
||||
expect(windows).toHaveTextContent("New-Item -ItemType Directory -Force bin");
|
||||
expect(windows).toHaveTextContent("go -C tools/thothctl build -o ../../bin/thothctl.exe ./cmd/thothctl");
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi restart --yes --drain');
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi update');
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi update --version <VERSION> --source pull --image <IMAGE>@sha256:<DIGEST> --yes --drain');
|
||||
expect(windows).toHaveTextContent("The command installs the Pi version pinned in docker/core.Dockerfile");
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi maintenance status');
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi logs');
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi rollback --yes');
|
||||
expect(windows).toHaveTextContent('.\\bin\\thothctl.exe pi maintenance recover --yes');
|
||||
expect(windows).not.toHaveTextContent("~\\bin\\");
|
||||
});
|
||||
|
||||
test("keeps the required PI_AUTH_FILE guidance in one static text node", async () => {
|
||||
@@ -314,13 +325,13 @@ test("keeps the required PI_AUTH_FILE guidance in one static text node", async (
|
||||
|
||||
const tablist = await screen.findByRole("tablist", { name: "Pi host platform" });
|
||||
await user.click(within(tablist).getByRole("tab", { name: "Linux" }));
|
||||
const credentialStep = screen.getByRole("heading", { name: "Set the provider credential" }).closest("li");
|
||||
const credentialStep = screen.getByRole("heading", { name: "Check the provider credential" }).closest("li");
|
||||
const guidance = credentialStep?.querySelector("p");
|
||||
|
||||
expect(
|
||||
Array.from(guidance?.childNodes ?? []).some(
|
||||
(node) => node.nodeType === Node.TEXT_NODE
|
||||
&& node.textContent?.includes("PI_AUTH_FILE is a setting in the installation environment file"),
|
||||
&& node.textContent?.includes("Pi reads the provider API key from a protected file on the host"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user