forked from cardosofelipe/fast-next-template
fix(frontend): Fix lint and type errors in test files
- Remove unused imports (fireEvent, IssueStatus) in issue component tests - Add E2E global type declarations for __TEST_AUTH_STORE__ - Fix toHaveAccessibleName assertion with regex pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
frontend/e2e/global.d.ts
vendored
Normal file
18
frontend/e2e/global.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Global type declarations for E2E tests
|
||||
*/
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__TEST_AUTH_STORE__?: {
|
||||
getState: () => {
|
||||
isAuthenticated: boolean;
|
||||
user: { id: string; email: string; is_superuser: boolean } | null;
|
||||
accessToken: string | null;
|
||||
refreshToken: string | null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
@@ -238,7 +238,7 @@ test.describe('Issue Management', () => {
|
||||
expect(count).toBeGreaterThan(0);
|
||||
|
||||
// First checkbox should have accessible label
|
||||
await expect(checkboxes.first()).toHaveAccessibleName();
|
||||
await expect(checkboxes.first()).toHaveAccessibleName(/.+/);
|
||||
});
|
||||
|
||||
test('issue detail has proper radiogroup for status', async ({ page }) => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* IssueFilters Component Tests
|
||||
*/
|
||||
|
||||
import { render, screen, fireEvent } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { IssueFilters } from '@/features/issues/components/IssueFilters';
|
||||
import type { IssueFilters as IssueFiltersType } from '@/features/issues/types';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* IssueTable Component Tests
|
||||
*/
|
||||
|
||||
import { render, screen, fireEvent } from '@testing-library/react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { IssueTable } from '@/features/issues/components/IssueTable';
|
||||
import type { IssueSummary, IssueSort } from '@/features/issues/types';
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { StatusWorkflow } from '@/features/issues/components/StatusWorkflow';
|
||||
import type { IssueStatus } from '@/features/issues/types';
|
||||
|
||||
describe('StatusWorkflow', () => {
|
||||
const mockOnStatusChange = jest.fn();
|
||||
|
||||
Reference in New Issue
Block a user