Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -1255,9 +1255,11 @@ exports[`Header Component > renders correctly 1`] = `
<a
class="items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90 hover:bg-purple-700 hidden md:block p-1"
data-slot="badge"
href="https://github.com/maplibre/martin/releases/tag/v0.0.0-test"
href="https://github.com/maplibre/martin/releases/tag/martin-v1.0.0"
rel="noopener noreferrer"
target="_blank"
>
v0.0.0-test
1.0.0
</a>
</div>
<div
Expand Down
4 changes: 2 additions & 2 deletions martin/martin-ui/__tests__/components/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { render } from '../test-utils';
// Mock import.meta.env for tests
const mockImportMeta = {
env: {
VITE_MARTIN_VERSION: 'v0.0.0-test',
VITE_MARTIN_VERSION: '1.0.0',
},
};

Expand All @@ -25,7 +25,7 @@ describe('Header Component', () => {

it('displays the Martin version', () => {
const { getByText } = render(<Header />);
expect(getByText('v0.0.0-test')).toBeTruthy();
expect(getByText('1.0.0')).toBeTruthy();
});

it('contains navigation links', () => {
Expand Down
4 changes: 3 additions & 1 deletion martin/martin-ui/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function Header() {
{import.meta.env.VITE_MARTIN_VERSION ? (
<a
className="p-1"
href={`https://github.com/maplibre/martin/releases/tag/${import.meta.env.VITE_MARTIN_VERSION}`}
href={`https://github.com/maplibre/martin/releases/tag/martin-v${import.meta.env.VITE_MARTIN_VERSION}`}
rel="noopener noreferrer"
target="_blank"
>
{import.meta.env.VITE_MARTIN_VERSION}
</a>
Expand Down
2 changes: 1 addition & 1 deletion martin/martin-ui/vitest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ vi.mock('react', async () => {
});

// Mock import.meta.env globally - Vitest handles this natively, but we set defaults
vi.stubEnv('VITE_MARTIN_VERSION', 'v0.0.0-test');
vi.stubEnv('VITE_MARTIN_VERSION', '1.0.0');
vi.stubEnv('VITE_MARTIN_BASE', 'http://localhost:3000');

// Suppress console errors during tests
Expand Down
Loading