Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(profile-ui): label desktop setup handoff r1-m2
Josué4b0863531432
diff --git a/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx b/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsxnew file mode 100644index 000000000..69c615de1--- /dev/null+++ b/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx@@ -0,0 +1,63 @@+import React from 'react'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import '@testing-library/jest-dom/vitest'+import { cleanup, render, screen } from '@testing-library/react'+import Page from '../../page'++const api = vi.hoisted(() => ({+ getDesktopEnvironment: vi.fn(),+}))++vi.mock('@lib/api', () => ({+ getDesktopEnvironment: api.getDesktopEnvironment,+}))++vi.mock('@components/AuthContext', () => ({+ useAuth: () => ({+ authState: {+ isLoading: false,+ isLoggedIn: true,+ me: {+ email: '[email protected]',+ name: 'Josue',+ profile: { displayName: 'Josue' },+ },+ },+ }),+}))++vi.mock('next/link', () => ({+ default: ({+ children,+ href,+ ...props+ }: React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }) => (+ <a href={href} {...props}>+ {children}+ </a>+ ),+}))++beforeEach(() => {+ api.getDesktopEnvironment.mockReset()+ api.getDesktopEnvironment.mockResolvedValue({+ appName: 'Evenfire Test',+ externalRestApiBaseUrl: 'https://api.example.com',+ rpcProxyBaseUrl: 'https://rpc.example.com',+ })+})++afterEach(cleanup)++describe('Profile Portal home desktop setup link', () => {+ it('labels the environment setup handoff accurately', async () => {+ render(<Page />)++ const setupLink = await screen.findByRole('link', { name: 'Set up Desktop App' })++ expect(setupLink).toHaveAttribute(+ 'href',+ 'evenfire://desktop-environment?externalRestApiBaseUrl=https%3A%2F%2Fapi.example.com&tenantName=Evenfire+Test'+ )+ })+})diff --git a/profile-ui/app/page.tsx b/profile-ui/app/page.tsxindex 54f0df6af..f10ee131f 100644--- a/profile-ui/app/page.tsx+++ b/profile-ui/app/page.tsx@@ -45,14 +45,14 @@ function HomeContent() {<p className="body-copy">{desktopAppHref ? (<a className="cu-home-desktop-link" href={desktopAppHref}>- Open Desktop App <IconExternalLink />+ Set up Desktop App <IconExternalLink /></a>) : (<spanclassName="cu-home-desktop-link cu-home-desktop-link--unavailable"aria-disabled="true">- Open Desktop App <IconExternalLink />+ Set up Desktop App <IconExternalLink /></span>)}{' '}insteaddiff --git a/profile-ui/package-lock.json b/profile-ui/package-lock.jsonindex 153e62e06..fa0166975 100644--- a/profile-ui/package-lock.json+++ b/profile-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-profile-ui",- "version": "0.1.145",+ "version": "0.1.146","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-profile-ui",- "version": "0.1.145",+ "version": "0.1.146","dependencies": {"@clerum/desktop-app-links": "file:../packages/desktop-app-links","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/profile-ui/package.json b/profile-ui/package.jsonindex 46c7353c5..b0d3d18c7 100644--- a/profile-ui/package.json+++ b/profile-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-profile-ui",- "version": "0.1.145",+ "version": "0.1.146","private": true,"scripts": {"dev": "next dev",