Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/pages/__tests__/MarketingPage.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { render, screen } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import MarketingPage from '@/pages/MarketingPage';

describe('MarketingPage community links', () => {
it('GitHub link points to the correct URL and opens in a new tab', () => {
render(<MarketingPage />);

const githubLink = screen.getByRole('link', { name: /github/i });

expect(githubLink).toHaveAttribute('href', 'https://github.com/accesslayerorg');
expect(githubLink).toHaveAttribute('target', '_blank');
expect(githubLink).toHaveAttribute('rel', 'noopener noreferrer');
});

it('Telegram link points to the correct URL and opens in a new tab', () => {
render(<MarketingPage />);

const telegramLink = screen.getByRole('link', { name: /telegram/i });

expect(telegramLink).toHaveAttribute('href', 'https://t.me/c/accesslayerorg/');
expect(telegramLink).toHaveAttribute('target', '_blank');
expect(telegramLink).toHaveAttribute('rel', 'noopener noreferrer');
});
});
Loading