refactor(frontend): clean up code by consolidating multi-line JSX into single lines where feasible

- Refactored JSX elements to improve readability by collapsing multi-line props and attributes into single lines if their length permits.
- Improved consistency in component imports by grouping and consolidating them.
- No functional changes, purely restructuring for clarity and maintainability.
This commit is contained in:
2026-01-01 11:46:57 +01:00
parent a7ba0f9bd8
commit a4c91cb8c3
77 changed files with 600 additions and 907 deletions

View File

@@ -14,9 +14,7 @@ describe('StatusWorkflow', () => {
});
it('renders all status options', () => {
render(
<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />
);
render(<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />);
expect(screen.getByText('Open')).toBeInTheDocument();
expect(screen.getByText('In Progress')).toBeInTheDocument();
@@ -26,9 +24,7 @@ describe('StatusWorkflow', () => {
});
it('highlights current status', () => {
render(
<StatusWorkflow currentStatus="in_progress" onStatusChange={mockOnStatusChange} />
);
render(<StatusWorkflow currentStatus="in_progress" onStatusChange={mockOnStatusChange} />);
const inProgressButton = screen.getByRole('radio', { name: /in progress/i });
expect(inProgressButton).toHaveAttribute('aria-checked', 'true');
@@ -36,9 +32,7 @@ describe('StatusWorkflow', () => {
it('calls onStatusChange when status is clicked', async () => {
const user = userEvent.setup();
render(
<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />
);
render(<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />);
const inProgressButton = screen.getByRole('radio', { name: /in progress/i });
await user.click(inProgressButton);
@@ -48,9 +42,7 @@ describe('StatusWorkflow', () => {
it('disables status buttons when disabled prop is true', async () => {
const user = userEvent.setup();
render(
<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} disabled />
);
render(<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} disabled />);
const inProgressButton = screen.getByRole('radio', { name: /in progress/i });
expect(inProgressButton).toBeDisabled();
@@ -72,9 +64,7 @@ describe('StatusWorkflow', () => {
});
it('has proper radiogroup role', () => {
render(
<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />
);
render(<StatusWorkflow currentStatus="open" onStatusChange={mockOnStatusChange} />);
expect(screen.getByRole('radiogroup', { name: /issue status/i })).toBeInTheDocument();
});