diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b938a624..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build - -on: [pull_request, push] - -concurrency: - cancel-in-progress: true - group: build-${{ github.ref }} - -jobs: - build: - name: Build and export - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "yarn" - - name: Install dependencies - run: | - yarn --immutable - - name: Build and export - run: | - yarn build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 357be6ac..0371210b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,13 +9,12 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: 🔎 CodeQL on: push: branches: ["main"] pull_request: - # The branches below must be a subset of the branches above branches: ["main"] schedule: - cron: "16 1 * * 5" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 717bb1b7..16f33fd7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,8 +1,10 @@ -name: Deploy demo +name: 🌍 Deploy demo on: push: - branches: [main, next] + branches: ["main"] + pull_request: + branches: ["main"] concurrency: cancel-in-progress: true diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 251f59fa..00000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Testing e2e - -on: pull_request - -concurrency: - cancel-in-progress: true - group: e2e-${{ github.ref }} - -jobs: - e2e: - name: Testing e2e - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Cypress run - uses: cypress-io/github-action@v5 - with: - build: yarn build - start: npx serve@latest out - component: false - install-command: yarn --immutable diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4c70ac2b..7c061975 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,10 @@ -name: Lint +name: ⛑️ Lint -on: [pull_request, push] +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] concurrency: cancel-in-progress: true @@ -32,6 +36,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Lint Dockerfile - uses: hadolint/hadolint-action@v2.1.0 + uses: hadolint/hadolint-action@v3.1.0 with: - recursive: true + dockerfile: Dockerfile + verbose: true diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 00000000..3894ae8f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,34 @@ +name: 🤖 Playwright Tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + timeout-minutes: 20 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Install dependencies + run: npm install -g yarn && yarn + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Build app + run: yarn build + env: + NEXT_PUBLIC_BASE_PATH: "" + NODE_ENV: production + - name: Run Playwright tests + run: yarn playwright test + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5abd7e3f..4398ea17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: 📦 Release on: workflow_dispatch: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 68238887..aae28a10 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,6 +1,10 @@ -name: Testing +name: 💪 Testing -on: [pull_request, push] +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] concurrency: cancel-in-progress: true @@ -16,11 +20,14 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "18" cache: "yarn" - name: Install dependencies run: | yarn --immutable + - name: Build code + run: | + yarn build - name: Test code run: | yarn test diff --git a/.gitignore b/.gitignore index 8ebf21a0..22fd7d6e 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,8 @@ robots.txt !.yarn/versions # storybook -/.out \ No newline at end of file +/.out +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/.node-version b/.node-version index 2edeafb0..25bf17fc 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20 \ No newline at end of file +18 \ No newline at end of file diff --git a/.talismanrc b/.talismanrc index 08f0b6aa..3a4e9cb1 100644 --- a/.talismanrc +++ b/.talismanrc @@ -20,7 +20,7 @@ fileignoreconfig: - filename: .yarn/** checksum: any - filename: Dockerfile - checksum: 9605a14ae835a4263de3badf041bfbde2823f2d9f2342e09c369ec9c7ae8615f + checksum: 31aa8689fb079f89949f8c4e5a917b040176f8a5b8492ba0a5252ad5e1bba049 - filename: README.md checksum: 7c55475ff28dbfa46c9c5715918add6a0202eafddca3cf9d35ebcdd443d76ffd - filename: pages/mui.tsx diff --git a/Dockerfile b/Dockerfile index ce85f946..ef12b769 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -ARG NODE_VERSION=20-alpine3.18@sha256:5ff63217ec2757b29a4414e0f787bfc13c1f9cb6f053e46ff05c1a51bbd2e8e6 +ARG NODE_VERSION=20-alpine3.19@sha256:ef3f47741e161900ddd07addcaca7e76534a9205e4cd73b2ed091ba339004a75 # Install dependencies only when needed FROM node:$NODE_VERSION AS builder -RUN apk add --no-cache libc6-compat=1.2.4-r2 +# hadolint ignore=DL3018 +RUN apk add --no-cache libc6-compat WORKDIR /app COPY yarn.lock package.json ./ @@ -17,6 +18,8 @@ ARG NEXT_PUBLIC_SITE_URL ENV NEXT_PUBLIC_SITE_URL $NEXT_PUBLIC_SITE_URL ENV NODE_ENV production +ENV NEXT_PUBLIC_BASE_PATH "" + WORKDIR /app RUN yarn postinstall # if you have postinstall script in your package.json @@ -24,7 +27,7 @@ RUN if [ -z "$PRODUCTION" ]; then \ echo "Overriding .env for staging"; \ cp .env.staging .env.production; \ fi && \ - yarn build:export + yarn build # Production image, copy all the files and run nginx FROM ghcr.io/socialgouv/docker/nginx:sha-1d70757 AS runner diff --git a/README.md b/README.md index 041e1c68..d3ca38e3 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,21 @@ yarn # to install dependencies yarn dev # to run in dev mode ``` +Point your browser to [http://127.0.0.1:3000/template](http://127.0.0.1:3000/template) and start playing. + +### Tests + +``` +# run unit tests with vitest +yarn test + +# build, serve and launch playwright interactive end-to-end tests +yarn e2e --ui + +# run storybook +yarn storybook +``` + ### Gestion des environnements Les variables issues des docker build-args, sont à utiliser dans `next.config.js`, pour les autres, il faut les définir dans les différents [`.env.*`](https://nextjs.org/docs/basic-features/environment-variables#environment-variable-load-order). @@ -41,3 +56,7 @@ Le fichier `.env.development` est utilisé pour l'environnement de développemen | [codegouvfr/docsify-dsfr-template](https://github.com/codegouvfr/docsify-dsfr-template) | Template DSFR pour [docsify](https://docsify.js.org/#/) | | [sneko/dsfr-connect](https://github.com/sneko/dsfr-connect) | Themes DSFR pour bootstrap, vuetify, mui, infima, emails... | | [socialgouv/template](https://github.com/socialgouv/template) | Version initiale de ce template | + +``` + +``` diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 968e628c..00000000 --- a/cypress.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "baseUrl": "http://localhost:3000", - "defaultCommandTimeout": 10000, - "requestTimeout": 10000 -} diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e42543..00000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/integration/accessibilite.spec.ts b/cypress/integration/accessibilite.spec.ts deleted file mode 100644 index c54a4d91..00000000 --- a/cypress/integration/accessibilite.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe("Accessibilité page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/accessibilite"); - cy.get("h1").should("contain", "Déclaration d’accessibilité"); - cy.get("h2").should("contain", "Amélioration et contact"); - }); -}); diff --git a/cypress/integration/cgu.spec.ts b/cypress/integration/cgu.spec.ts deleted file mode 100644 index 7f95d4fc..00000000 --- a/cypress/integration/cgu.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe("CGU page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/cgu"); - cy.get("h1").should("contain", "Conditions générales d'utilisation"); - cy.get("h2").should("contain", "Absence de garantie"); - }); -}); diff --git a/cypress/integration/healthz.spec.ts b/cypress/integration/healthz.spec.ts deleted file mode 100644 index 3a23a7b4..00000000 --- a/cypress/integration/healthz.spec.ts +++ /dev/null @@ -1,6 +0,0 @@ -describe("Healthz page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/healthz"); - cy.get("h1").should("contain", "App is up and running"); - }); -}); diff --git a/cypress/integration/home.spec.ts b/cypress/integration/home.spec.ts deleted file mode 100644 index f96fae72..00000000 --- a/cypress/integration/home.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe("Home page", () => { - it("should render the main page", () => { - cy.visit("http://localhost:3000/"); - cy.title().should("equal", "Template | beta.gouv.fr"); - cy.get("h1").should("contain", "Template"); - }); -}); diff --git a/cypress/integration/mentions-legales.spec.ts b/cypress/integration/mentions-legales.spec.ts deleted file mode 100644 index b822ecf8..00000000 --- a/cypress/integration/mentions-legales.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe("Mentions légales page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/mentions-legales"); - cy.get("h1").should("contain", "Mentions légales"); - cy.get("h2").should("contain", "Hébergement du site"); - }); -}); diff --git a/cypress/integration/politique-confidentialite.spec.ts b/cypress/integration/politique-confidentialite.spec.ts deleted file mode 100644 index 3264017e..00000000 --- a/cypress/integration/politique-confidentialite.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -describe("Politique de confidentialité page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/politique-confidentialite"); - cy.get("h1").should("contain", "Politique de confidentialité"); - cy.get("h2").should( - "contain", - "Traitement des données à caractère personnel" - ); - cy.get("h2").should("contain", "Cookies"); - }); -}); diff --git a/cypress/integration/stats.spec.ts b/cypress/integration/stats.spec.ts deleted file mode 100644 index 2333ae92..00000000 --- a/cypress/integration/stats.spec.ts +++ /dev/null @@ -1,6 +0,0 @@ -describe("Stats page", () => { - it("should render the page", () => { - cy.visit("http://localhost:3000/stats"); - cy.get("h1").should("contain", "Statistiques d'utilisation"); - }); -}); diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts deleted file mode 100644 index 6684b018..00000000 --- a/cypress/plugins/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -export default (on: any, config: any) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -}; diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts deleted file mode 100644 index 119ab03f..00000000 --- a/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) diff --git a/cypress/support/index.ts b/cypress/support/index.ts deleted file mode 100644 index d076cec9..00000000 --- a/cypress/support/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import "./commands"; - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json deleted file mode 100644 index 5642ab1b..00000000 --- a/cypress/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "noEmit": true, - "isolatedModules": false, - "types": ["cypress"] - }, - "include": ["../node_modules/cypress", "./**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 27a19daf..00000000 --- a/jest.config.js +++ /dev/null @@ -1,24 +0,0 @@ -// jest.config.js -const nextJest = require("next/jest"); - -const createJestConfig = nextJest({ - // Provide the path to your Next.js app to load next.config.js and .env files in your test environment - dir: "./", -}); - -// Add any custom config to be passed to Jest -const customJestConfig = { - // Add more setup options before each test is run - // setupFilesAfterEnv: ['/jest.setup.js'], - // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work - // moduleDirectories: ["node_modules", "/"], - testEnvironment: "jest-environment-jsdom", - testPathIgnorePatterns: [ - // "/node_modules/", - // "/.next/", - "/cypress/", - ], -}; - -// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async -module.exports = createJestConfig(customJestConfig); diff --git a/package.json b/package.json index f6a5483d..20322f67 100644 --- a/package.json +++ b/package.json @@ -14,21 +14,13 @@ "build": "next build", "start": "next start", "lint": "next lint", - "prepare": "husky install", "lint-staged": "lint-staged", - "export": "next export", - "build:export": "npm run build && npm run export", - "e2e": "cypress open", - "e2e:headless": "cypress run", - "test": "jest", - "test:watch": "jest --watch", - "test:e2e": "start-server-and-test dev http://localhost:3000 e2e", - "test:e2e:headless": "start-server-and-test dev http://localhost:3000 e2e:headless", - "storybook:start": "storybook dev --docs -p 6006", + "e2e": "NEXT_PUBLIC_BASE_PATH='' NODE_ENV=production yarn build && yarn playwright test", + "test": "vitest", + "test:watch": "vitest --watch", "storybook:build": "yarn build-storybook -c .storybook -o .out", "type-check": "tsc --noEmit", "type-check:watch": "npm run type-check -- --watch", - "postinstall": "is-ci || husky install", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" }, @@ -36,7 +28,7 @@ "@codegouvfr/react-dsfr": "^1.9.5", "@emotion/react": "^11.11.4", "@emotion/server": "^11.11.0", - "@emotion/styled": "^11.11.0", + "@emotion/styled": "^11.11.5", "@gouvfr/dsfr-chart": "^1.0.0", "@mdx-js/loader": "^3.0.1", "@mdx-js/react": "^3.0.1", @@ -47,6 +39,7 @@ "@next/mdx": "^14.1.4", "@sentry/nextjs": "^7.109.0", "@socialgouv/matomo-next": "^1.8.1", + "dayjs": "^1.11.10", "is-ci": "^3.0.1", "next": "14.1.4", "react": "18.2.0", @@ -56,6 +49,7 @@ }, "devDependencies": { "@babel/core": "^7.24.3", + "@playwright/test": "^1.42.1", "@storybook/addon-actions": "^7.6.17", "@storybook/addon-docs": "^7.6.17", "@storybook/addon-essentials": "^7.6.17", @@ -68,26 +62,24 @@ "@storybook/testing-library": "^0.2.2", "@swc-node/register": "^1.9.0", "@swc/core": "^1.4.11", - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/react": "^12.1.2", + "@testing-library/react": "^14.2.2", "@types/mdx": "^2.0.12", - "@types/node": "20.11.30", + "@types/node": "^18", "@types/react": "18.2.73", "@types/react-dom": "18.2.23", - "cypress": "^9.4.1", + "@vitejs/plugin-react": "^4.2.1", "eslint": "8.57.0", "eslint-config-next": "14.1.4", "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-storybook": "^0.8.0", "husky": "^9.0.11", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", + "jsdom": "^24.0.0", "lint-staged": "^15.2.2", "node-talisman": "^1.29.11", "start-server-and-test": "^2.0.3", "storybook": "^7.6.17", "storybook-dark-mode": "^3.0.3", - "typescript": "4.9.5" - }, - "packageManager": "yarn@4.0.2" + "typescript": "5.4.3", + "vitest": "^1.4.0" + } } diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 00000000..a0f02452 --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,78 @@ +import { defineConfig, devices } from "@playwright/test"; + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +// require('dotenv').config(); + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: "./tests-playwright", + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: "html", + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + baseURL: "http://127.0.0.1:3000", + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: "on-first-retry", + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, + + // { + // name: "firefox", + // use: { ...devices["Desktop Firefox"] }, + // }, + + // { + // name: "webkit", + // use: { ...devices["Desktop Safari"] }, + // }, + + /* Test against mobile viewports. */ + // { + // name: 'Mobile Chrome', + // use: { ...devices['Pixel 5'] }, + // }, + // { + // name: 'Mobile Safari', + // use: { ...devices['iPhone 12'] }, + // }, + + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], + + /* Run your local dev server before starting the tests */ + webServer: { + command: "npx serve@latest out", + url: "http://127.0.0.1:3000", + reuseExistingServer: !process.env.CI, + timeout: 180 * 1000, + }, +}); diff --git a/scripts/__tests__/prebuild.test.ts b/scripts/__tests__/prebuild.test.ts index 60800f9b..d92d02ec 100644 --- a/scripts/__tests__/prebuild.test.ts +++ b/scripts/__tests__/prebuild.test.ts @@ -1,22 +1,24 @@ +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; + import { filePath, generateRobotsTxt } from "../prebuild"; import fs from "fs"; -jest.mock("fs"); +vi.spyOn(fs, "writeFileSync"); describe("robots.txt", () => { beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it("should generate production robots.txt", () => { const host = "localhost"; const robotsProd = ["User-agent: *", "Allow: /"].join("\n"); generateRobotsTxt(true, host); - expect(fs.writeFileSync).toHaveBeenCalledWith(filePath, robotsProd); + expect(fs.writeFileSync).toBeCalledWith(filePath, robotsProd); }); it("should generate development robots.txt", () => { const host = "localhost"; const robotsDev = ["User-agent: *", "Disallow: /"].join("\n"); generateRobotsTxt(false, host); - expect(fs.writeFileSync).toHaveBeenCalledWith(filePath, robotsDev); + expect(fs.writeFileSync).toBeCalledWith(filePath, robotsDev); }); }); diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts new file mode 100644 index 00000000..590522e6 --- /dev/null +++ b/sentry.edge.config.ts @@ -0,0 +1,19 @@ +// This file configures the initialization of Sentry on the browser. +// The config you add here will be used whenever a page is visited. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from "@sentry/nextjs"; + +const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN; +const SENTRY_ENV = process.env.SENTRY_ENV || process.env.NEXT_PUBLIC_SENTRY_ENV; + +Sentry.init({ + dsn: SENTRY_DSN ?? "", + environment: SENTRY_ENV ?? "development", + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 0.1, + // ... + // Note: if you want to override the automatic release value, do not set a + // `release` value here - use the environment variable `SENTRY_RELEASE`, so + // that it will also get attached to your source maps +}); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f96ebe98..5ecba3d8 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -127,13 +127,23 @@ const Home: NextPage = () => {
  • - Testing unitaire et de bout-en-bout intĂ©grĂ© avec{" "} + Testing de bout-en-bout avec{" "} - Cypress.io + Playwright + +
  • +
  • + Tests unitaires avec + + vitest
  • diff --git a/src/pages/politique-confidentialite.mdx b/src/pages/politique-confidentialite.mdx index b6732615..4e5ca348 100644 --- a/src/pages/politique-confidentialite.mdx +++ b/src/pages/politique-confidentialite.mdx @@ -14,7 +14,7 @@ import Alert from "@codegouvfr/react-dsfr/Alert"; # Politique de confidentialitĂ© -## Traitement des donnĂ©es Ă  caractère personnelle +## Traitement des donnĂ©es Ă  caractère personnel Template ne vous demande ni ne stocke d’information nominative. diff --git a/src/pages/stats.tsx b/src/pages/stats.tsx index d4c7e185..f49b3af4 100644 --- a/src/pages/stats.tsx +++ b/src/pages/stats.tsx @@ -28,7 +28,7 @@ const Stats: NextPage = () => { <>