mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
feat: add support for dual frontend (JS and React) in the CCW application
- Updated CLI to include `--frontend` option for selecting frontend type (js, react, both). - Modified serve command to start React frontend when specified. - Implemented React frontend startup and shutdown logic. - Enhanced server routing to handle requests for both JS and React frontends. - Added workspace selector component with i18n support. - Updated tests to reflect changes in header and A2UI components. - Introduced new Radix UI components for improved UI consistency. - Refactored A2UIButton and A2UIDateTimeInput components for better code clarity. - Created migration plan for gradual transition from JS to React frontend.
This commit is contained in:
@@ -162,12 +162,20 @@ describe('Header Component - i18n Tests', () => {
|
||||
expect(brandLink).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should display project path when provided', () => {
|
||||
it('should render workspace selector when project path is provided', () => {
|
||||
render(<Header projectPath="/test/path" />);
|
||||
|
||||
// Should show the path indicator
|
||||
const pathDisplay = screen.getByTitle('/test/path');
|
||||
expect(pathDisplay).toBeInTheDocument();
|
||||
// Should render the workspace selector button with aria-label
|
||||
const workspaceButton = screen.getByRole('button', { name: /workspace selector/i });
|
||||
expect(workspaceButton).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should not render workspace selector when project path is empty', () => {
|
||||
render(<Header projectPath="" />);
|
||||
|
||||
// Should NOT render the workspace selector button
|
||||
const workspaceButton = screen.queryByRole('button', { name: /workspace selector/i });
|
||||
expect(workspaceButton).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user