Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { organizationService } from "#/api/organization-service/organization-ser
import OrgProfilesService from "#/api/organization-service/org-profiles-service.api";
import { SUPER_ADMIN_SETUP_STEP_EVENT } from "#/components/features/setup/tours/types";
import { SuperAdminGroupSetupModal } from "#/components/features/super-admin/super-admin-group-setup-modal";
import translations from "#/i18n/translation.json";
import { createMockWebClientConfig } from "#/mocks/settings-handlers";
import { useSelectedOrganizationStore } from "#/stores/selected-organization-store";
import {
Expand Down Expand Up @@ -60,6 +61,15 @@ async function chooseModel(
}
}

async function openStep(
user: ReturnType<typeof userEvent.setup>,
stepId: string,
) {
const step = await screen.findByTestId(`sa-nux-starter-step-${stepId}`);
await user.click(step);
return document.getElementById(step.getAttribute("aria-controls") ?? "");
}

describe("SuperAdminGroupSetupModal", () => {
beforeEach(() => {
resetSuperAdminNux();
Expand Down Expand Up @@ -249,4 +259,36 @@ describe("SuperAdminGroupSetupModal", () => {
// Assert
expect(screen.queryByTestId("sa-nux-llm-api-key")).not.toBeInTheDocument();
});

it("tells the admin that Get started saves the LLM and opens the automation step", async () => {
// Arrange
const user = userEvent.setup();
renderModal();

// Act
const panel = await openStep(user, "automation");

// Assert
expect(panel).toHaveAttribute("aria-hidden", "false");
expect(panel).toHaveTextContent("SA_NUX$STARTER_AUTOMATION_DETAIL");
expect(translations.SA_NUX$STARTER_AUTOMATION_DETAIL.en).toContain(
"Get started saves your LLM and takes you there",
);
});

it("points the admin to the Setup guide in the lower-right corner for the rest of setup", async () => {
// Arrange
const user = userEvent.setup();
renderModal();

// Act
const panel = await openStep(user, "others");

// Assert
expect(panel).toHaveAttribute("aria-hidden", "false");
expect(panel).toHaveTextContent("SA_NUX$STARTER_OTHERS_DETAIL");
expect(translations.SA_NUX$STARTER_OTHERS_DETAIL.en).toContain(
"from the Setup guide in the lower-right corner",
);
});
});
60 changes: 30 additions & 30 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -34068,38 +34068,38 @@
"ca": "Connect a model so this organization can start running agents."
},
"SA_NUX$STARTER_AUTOMATION_DETAIL": {
"en": "Run a first automation and review the pull request it opens.",
"ja": "Run a first automation and review the pull request it opens.",
"zh-CN": "Run a first automation and review the pull request it opens.",
"zh-TW": "Run a first automation and review the pull request it opens.",
"ko-KR": "Run a first automation and review the pull request it opens.",
"no": "Run a first automation and review the pull request it opens.",
"it": "Run a first automation and review the pull request it opens.",
"pt": "Run a first automation and review the pull request it opens.",
"es": "Run a first automation and review the pull request it opens.",
"ar": "Run a first automation and review the pull request it opens.",
"fr": "Run a first automation and review the pull request it opens.",
"tr": "Run a first automation and review the pull request it opens.",
"de": "Run a first automation and review the pull request it opens.",
"uk": "Run a first automation and review the pull request it opens.",
"ca": "Run a first automation and review the pull request it opens."
"en": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"ja": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"zh-CN": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"zh-TW": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"ko-KR": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"no": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"it": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"pt": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"es": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"ar": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"fr": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"tr": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"de": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"uk": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there.",
"ca": "Run a first automation and review the pull request it opens. Get started saves your LLM and takes you there."
},
"SA_NUX$STARTER_OTHERS_DETAIL": {
"en": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"ja": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"zh-CN": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"zh-TW": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"ko-KR": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"no": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"it": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"pt": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"es": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"ar": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"fr": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"tr": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"de": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"uk": "Invite people, connect your tools, and finish the rest of setup when you are ready.",
"ca": "Invite people, connect your tools, and finish the rest of setup when you are ready."
"en": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"ja": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"zh-CN": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"zh-TW": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"ko-KR": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"no": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"it": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"pt": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"es": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"ar": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"fr": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"tr": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"de": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"uk": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner.",
"ca": "Invite people, connect your tools, and finish the rest of setup from the Setup guide in the lower-right corner."
},
"SETTINGS$NAV_QUOTA": {
"en": "Quota",
Expand Down
Loading