Break the world-knop alleen nog lokaal zichtbaar
Continuous Integration / config (pull_request) Successful in 11s
Continuous Integration / prepare (pull_request) Successful in 1m18s
Continuous Integration / build-production (pull_request) Skipped
Continuous Integration / build (pull_request) Successful in 2m2s
Continuous Integration / test (pull_request) Successful in 1m52s
Continuous Integration / deploy-production (pull_request) Skipped
Deploy / deploy (pull_request) Successful in 37s
Continuous Integration / deploy-test (pull_request) Successful in 36s

De knop was ook zichtbaar op de testomgeving (VITE_APP_ENV=test).
Nu uitsluitend zichtbaar bij pnpm dev, zodat de testomgeving een
productie-equivalente build draait.
This commit is contained in:
2026-08-15 20:31:06 +02:00
parent a7426b4dd8
commit 99f74a9db9
4 changed files with 11 additions and 9 deletions
+5 -5
View File
@@ -2,12 +2,12 @@ import { useEffect, useState } from 'react';
import * as Sentry from '@sentry/react';
/**
* Alleen zichtbaar tijdens lokale development (`pnpm dev`) en in de testomgeving
* (waar de build met `VITE_APP_ENV=test` wordt gebouwd, zie continuous_integration.yaml).
* In een productiebuild (VITE_APP_ENV ontbreekt of is 'production') is deze knop
* altijd verborgen, ook als iemand vergeet de variabele expliciet te zetten.
* Alleen zichtbaar tijdens lokale development (`pnpm dev`, via Vite's
* `import.meta.env.DEV`). In elke build (test én productie) is deze knop
* altijd verborgen, zodat de testomgeving een productie-equivalente build
* draait die getest kan worden.
*/
const isVisible = import.meta.env.DEV || import.meta.env.VITE_APP_ENV === 'test';
const isVisible = import.meta.env.DEV;
/** Hoe lang de bevestigingsmelding zichtbaar blijft voordat hij vanzelf verdwijnt. */
const TOAST_DURATION_MS = 4000;
@@ -35,7 +35,7 @@ describe('SentryTestButton', () => {
vi.useRealTimers();
});
it('is visible in the current (development/test) build', () => {
it('is visible in local development', () => {
render(<SentryTestButton />);
expect(screen.getByRole('button', { name: 'Break the world' })).toBeInTheDocument();
});