Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
48 changes: 29 additions & 19 deletions apps/mission-control/e2e/core.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,38 +459,48 @@ test.describe("mission-control core onboarding + crash-proofing @core", () => {
await expect(page.getByText("Investigate gateway health")).toBeVisible();
});

test("guided tour shows explicit progress and covers events and config", async ({ page }) => {
test("guided tour walks the elevator floor by floor with explicit progress", async ({ page }) => {
await completeQuickstartLocalOnboarding(page);
const tourBubble = page.locator(".mc-tour-bubble");

await page.locator('[data-tour-id="topbar-tour"]').click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("1/13");
await expect(page.getByRole("heading", { name: "Boards = task execution" })).toBeVisible();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("1/7");
await expect(page.getByRole("heading", { name: "4F · The Office" })).toBeVisible();
// The first stop lands in the Office by stable room id, not tab label.
await expect(page.locator('[data-tour-id="nav-assistant"]')).toHaveAttribute(
"aria-current",
"page"
);

await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await tourBubble.getByRole("button", { name: "Next", exact: true }).click();

await expect(page.locator(".mc-tour-progress-chip")).toHaveText("4/13");
await expect(page.getByRole("heading", { name: "Events = runtime activity" })).toBeVisible();

for (let index = 0; index < 6; index += 1) {
await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
}
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("2/7");
await expect(page.getByRole("heading", { name: "3F · The Window" })).toBeVisible();

await expect(page.locator(".mc-tour-progress-chip")).toHaveText("10/13");
await expect(page.getByRole("heading", { name: "Strategy = management layer" })).toBeVisible();
await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("3/7");
await expect(page.getByRole("heading", { name: "2F · The Trenches" })).toBeVisible();
// Stops on the floor come from the resolved registry: History is off in
// this configuration, so the tour may not advertise it.
await expect(tourBubble).toContainText("Boards");
await expect(tourBubble).not.toContainText("History & Receipts");

await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("4/7");
await expect(page.getByRole("heading", { name: "BF · The Basement" })).toBeVisible();

await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("5/7");
await expect(page.getByRole("heading", { name: "Help & Docs" })).toBeVisible();

await expect(page.locator(".mc-tour-progress-chip")).toHaveText("12/13");
await expect(
page.getByRole("heading", { name: "Config = connection + recovery controls" })
).toBeVisible();
await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("6/7");
await expect(page.getByRole("heading", { name: "Config", exact: true })).toBeVisible();

await tourBubble.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("13/13");
await expect(page.locator(".mc-tour-progress-chip")).toHaveText("7/7");
await expect(page.getByRole("heading", { name: "Command palette" })).toBeVisible();

await tourBubble.getByRole("button", { name: "Finish", exact: true }).click();
await expect(tourBubble).toBeHidden();
});
});
Loading
Loading