Match Home, top nav, hero, and logo wall to the current marketing frames.
Puts Workshops in the header, pairs the hero with a static rule card and breakpoint CTAs, and shows the three pilot marks with no wall label. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
e12e06f7ce
commit
33cdaf135c
47 files changed
+728
-527
No files matched your search
@@ -131,7 +131,7 @@ describe("Top header chrome", () => {
|
||||
);
|
||||
expect(
|
||||
screen.getAllByRole("menuitem", {
|
||||
name: /navigate to use cases page/i,
|
||||
name: /navigate to workshops page/i,
|
||||
hidden: true,
|
||||
}),
|
||||
).toHaveLength(1);
|
||||
@@ -146,7 +146,7 @@ describe("Top header chrome", () => {
|
||||
name: /go to your profile/i,
|
||||
hidden: true,
|
||||
}),
|
||||
).toHaveLength(1);
|
||||
).toHaveLength(2);
|
||||
expect(
|
||||
screen.getAllByRole("button", {
|
||||
name: /create a new rule/i,
|
||||
@@ -157,11 +157,18 @@ describe("Top header chrome", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("points Workshops at /workshops", () => {
|
||||
renderWithProviders(<Top folderTop={false} />);
|
||||
expect(
|
||||
screen.getByRole("menuitem", { name: /navigate to workshops page/i }),
|
||||
).toHaveAttribute("href", "/workshops");
|
||||
});
|
||||
|
||||
it("shows Profile instead of Log in when signed in", () => {
|
||||
renderWithProviders(<Top folderTop={false} loggedIn />);
|
||||
expect(
|
||||
screen.getByRole("menuitem", { name: /go to your profile/i }),
|
||||
).toBeInTheDocument();
|
||||
screen.getAllByRole("menuitem", { name: /go to your profile/i }).length,
|
||||
).toBeGreaterThan(0);
|
||||
expect(
|
||||
screen.queryByRole("button", { name: /log in to your account/i }),
|
||||
).not.toBeInTheDocument();
|
||||
@@ -174,6 +181,7 @@ describe("Top header chrome", () => {
|
||||
const headerNav = document.querySelector("header nav");
|
||||
expect(logo?.className).not.toMatch(/\bz-20\b/);
|
||||
expect(nav?.className).not.toMatch(/\babsolute\b/);
|
||||
expect(headerNav?.className).toContain("flex");
|
||||
expect(headerNav?.className).toContain(
|
||||
"md:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]",
|
||||
);
|
||||
@@ -183,9 +191,8 @@ describe("Top header chrome", () => {
|
||||
renderWithProviders(<Top folderTop />);
|
||||
const tab = document.querySelector(".HeaderTab");
|
||||
const nav = document.querySelector("[data-top='nav']");
|
||||
expect(tab?.className).toContain("w-fit");
|
||||
expect(tab?.className).toContain("sm:w-auto");
|
||||
expect(tab?.className).toContain("sm:flex-1");
|
||||
expect(tab?.className).toContain("flex-1");
|
||||
expect(tab?.className).toContain("justify-between");
|
||||
expect(nav?.className).toContain("md:absolute");
|
||||
expect(nav?.className).toContain(
|
||||
"md:left-[calc(50vw-var(--space-400))]",
|
||||
@@ -193,16 +200,17 @@ describe("Top header chrome", () => {
|
||||
expect(nav?.className).not.toContain("ml-auto");
|
||||
});
|
||||
|
||||
it("keeps a single home nav cluster and shows the folder wordmark", () => {
|
||||
it("keeps a single home nav cluster and hides the folder wordmark below md", () => {
|
||||
renderWithProviders(<Top folderTop />);
|
||||
expect(
|
||||
screen.getAllByRole("menuitem", {
|
||||
name: /navigate to use cases page/i,
|
||||
name: /navigate to workshops page/i,
|
||||
hidden: true,
|
||||
}),
|
||||
).toHaveLength(1);
|
||||
const wordmark = screen.getByText("CommunityRule");
|
||||
expect(wordmark.className).not.toMatch(/\bhidden\b/);
|
||||
expect(wordmark.className).toMatch(/\bhidden\b/);
|
||||
expect(wordmark.className).toContain("md:block");
|
||||
expect(
|
||||
screen.getByRole("button", { name: /create a new rule/i }).className,
|
||||
).toContain("md:text-x-small-label");
|
||||
|
||||
Reference in new issue
Block a user