forked from cardosofelipe/fast-next-template
fix: Update frontend tests for Gitea repository URL
- Update tests expecting github.com to use gitea.pragmazest.com - Syndarix uses Gitea for version control 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,8 @@ describe('HomePage', () => {
|
||||
render(<Home />);
|
||||
const githubLinks = screen.getAllByRole('link', { name: /GitHub/i });
|
||||
expect(githubLinks.length).toBeGreaterThan(0);
|
||||
expect(githubLinks[0]).toHaveAttribute('href', expect.stringContaining('github.com'));
|
||||
// Syndarix uses Gitea for version control
|
||||
expect(githubLinks[0]).toHaveAttribute('href', expect.stringContaining('gitea.pragmazest.com'));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -309,8 +310,9 @@ describe('HomePage', () => {
|
||||
it('has external links with proper attributes', () => {
|
||||
render(<Home />);
|
||||
const githubLinks = screen.getAllByRole('link', { name: /GitHub/i });
|
||||
// Syndarix uses Gitea for version control
|
||||
const externalLink = githubLinks.find((link) =>
|
||||
link.getAttribute('href')?.includes('github.com')
|
||||
link.getAttribute('href')?.includes('gitea.pragmazest.com')
|
||||
);
|
||||
expect(externalLink).toHaveAttribute('target', '_blank');
|
||||
expect(externalLink).toHaveAttribute('rel', 'noopener noreferrer');
|
||||
|
||||
@@ -220,7 +220,8 @@ describe('Header', () => {
|
||||
if (githubLinks.length > 1) {
|
||||
const mobileGithubLink = githubLinks[1];
|
||||
fireEvent.click(mobileGithubLink);
|
||||
expect(mobileGithubLink).toHaveAttribute('href', expect.stringContaining('github.com'));
|
||||
// Syndarix uses Gitea for version control
|
||||
expect(mobileGithubLink).toHaveAttribute('href', expect.stringContaining('gitea.pragmazest.com'));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -278,8 +279,9 @@ describe('Header', () => {
|
||||
);
|
||||
|
||||
const githubLinks = screen.getAllByRole('link', { name: /github/i });
|
||||
// Syndarix uses Gitea for version control
|
||||
const externalLink = githubLinks.find((link) =>
|
||||
link.getAttribute('href')?.includes('github.com')
|
||||
link.getAttribute('href')?.includes('gitea.pragmazest.com')
|
||||
);
|
||||
|
||||
expect(externalLink).toHaveAttribute('target', '_blank');
|
||||
|
||||
Reference in New Issue
Block a user