feat(FN-1978): rename schedule actions to Automation and polish mobile layout
- Rename Schedules/Scheduled Tasks labels to Automation in header and mobile navigation actions - Update desktop, tablet, and mobile header tests to assert the new Automation wording and behavior - Improve mobile schedule and routine modal spacing with token-based padding/margin updates for cards, forms, and empty states - Refresh the UX audit report to reference the Automation label in the header control inventory
This commit is contained in:
@@ -799,21 +799,21 @@ describe("Header", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("schedules button", () => {
|
||||
it("renders schedules button on desktop", () => {
|
||||
describe("automation button", () => {
|
||||
it("renders automation button on desktop", () => {
|
||||
renderHeader({ onOpenSchedules: vi.fn() }, "desktop");
|
||||
expect(screen.getByTitle("Scheduled tasks")).toBeDefined();
|
||||
expect(screen.getByTitle("Automation")).toBeDefined();
|
||||
});
|
||||
|
||||
it("does not render schedules button inline on mobile", () => {
|
||||
it("does not render automation button inline on mobile", () => {
|
||||
renderHeader({ onOpenSchedules: vi.fn() }, "mobile");
|
||||
expect(screen.queryByTitle("Scheduled tasks")).toBeNull();
|
||||
expect(screen.queryByTitle("Automation")).toBeNull();
|
||||
});
|
||||
|
||||
it("calls onOpenSchedules when schedules button is clicked", () => {
|
||||
it("calls onOpenSchedules when automation button is clicked", () => {
|
||||
const onOpenSchedules = vi.fn();
|
||||
renderHeader({ onOpenSchedules }, "desktop");
|
||||
fireEvent.click(screen.getByTitle("Scheduled tasks"));
|
||||
fireEvent.click(screen.getByTitle("Automation"));
|
||||
expect(onOpenSchedules).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -822,10 +822,10 @@ describe("Header", () => {
|
||||
expect(screen.getByTestId("schedules-btn")).toBeDefined();
|
||||
});
|
||||
|
||||
it("includes scheduled tasks in overflow menu on mobile", () => {
|
||||
it("includes automation in overflow menu on mobile", () => {
|
||||
renderHeader({ onOpenSchedules: vi.fn() }, "mobile");
|
||||
fireEvent.click(screen.getByTitle("More header actions"));
|
||||
expect(screen.getByText("Scheduled Tasks")).toBeDefined();
|
||||
expect(screen.getByText("Automation")).toBeDefined();
|
||||
});
|
||||
|
||||
it("calls onOpenSchedules from mobile overflow menu", () => {
|
||||
|
||||
@@ -829,7 +829,7 @@ export function Header({
|
||||
<button
|
||||
className="btn-icon"
|
||||
onClick={onOpenSchedules}
|
||||
title="Scheduled tasks"
|
||||
title="Automation"
|
||||
data-testid="schedules-btn"
|
||||
>
|
||||
<Clock size={16} />
|
||||
@@ -1120,7 +1120,7 @@ export function Header({
|
||||
data-testid="overflow-schedules-btn"
|
||||
>
|
||||
<Clock size={16} />
|
||||
<span>Scheduled Tasks</span>
|
||||
<span>Automation</span>
|
||||
</button>
|
||||
{/* Activity Log - in overflow on mobile */}
|
||||
{onOpenActivityLog && (
|
||||
|
||||
@@ -447,7 +447,7 @@ export function MobileNavBar({
|
||||
onClick={() => handleMoreAction(onOpenSchedules)}
|
||||
>
|
||||
<Clock />
|
||||
<span>Schedules</span>
|
||||
<span>Automation</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user