Skip to content
Open
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
1 change: 1 addition & 0 deletions datagouv-components/src/components/Search/GlobalSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
<p
class="fr-col-auto my-0"
role="status"
data-testid="search-result-count"
>
{{ t("{count} résultats | {count} résultat | {count} résultats", searchResults.total) }}
</p>
Expand Down
5 changes: 4 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ export default defineNuxtConfig({
'/*/admin/**': { ssr: true },
},

sourcemap: { client: 'hidden' },
// Server sourcemaps disabled: Nuxt 4.4 OOMs the Nitro bundle when generating them
// (>4GB heap usage). Our Sentry release workflow only uploads client sourcemaps
// (.output/public/_nuxt) anyway, so this has no impact on observability today.
sourcemap: { client: 'hidden', server: false },

devServer: {
port: 3000,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"gray-matter": "^4.0.3",
"leaflet": "^1.9.4",
"lodash-es": "^4.17.23",
"nuxt": "~4.3.0",
"nuxt": "~4.4.0",
"nuxt-og-image": "^6.0.6",
"ofetch": "^1.5.1",
"papaparse": "^5.5.3",
Expand Down
1,046 changes: 502 additions & 544 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions tests/datasets/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ test('search launch without params', async ({ page }) => {
'Moteur de recherche des jeux de données - data.gouv.fr',
)

// Result count is displayed with role="status"
await expect(page.getByRole('status')).toBeVisible()
await expect(page.getByTestId('search-result-count')).toBeVisible()

// Results are displayed in a list
const results = page.locator('.search-results ul')
Expand Down Expand Up @@ -44,7 +43,7 @@ test('search results update when badge filter is applied', async ({ page }) => {
await page.goto('/datasets/search/')

// Wait for initial results to load
await expect(page.getByRole('status')).toBeVisible()
await expect(page.getByTestId('search-result-count')).toBeVisible()

// Badge filter is now a RadioGroup
const badgeFieldset = page.locator('fieldset').filter({ hasText: 'Label de donnée' })
Expand All @@ -57,7 +56,7 @@ test('search results update when badge filter is applied', async ({ page }) => {
await page.waitForURL(/badge=/)

// Either results are shown with a count, or "no results" message is displayed
const hasResults = await page.getByRole('status').isVisible().catch(() => false)
const hasResults = await page.getByTestId('search-result-count').isVisible().catch(() => false)
const hasNoResultsMessage = await page.getByText('Vous n\'avez pas trouvé ce que vous cherchez').isVisible().catch(() => false)

expect(hasResults || hasNoResultsMessage).toBeTruthy()
Expand Down
2 changes: 1 addition & 1 deletion tests/organizations/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('page loads with results', async ({ page }) => {

await expect(page.getByRole('heading', { name: 'Recherche d\'une organisation', level: 1 })).toBeVisible()

await expect(page.getByRole('status')).toBeVisible()
await expect(page.getByTestId('search-result-count')).toBeVisible()

const results = page.locator('.search-results ul')
await expect(results.locator('li')).not.toHaveCount(0)
Expand Down
3 changes: 1 addition & 2 deletions tests/reuses/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ test('page loads with results', async ({ page }) => {

await expect(page).toHaveTitle(/Moteur de recherche des réutilisations/)

// Result count is displayed with role="status"
await expect(page.getByRole('status')).toBeVisible()
await expect(page.getByTestId('search-result-count')).toBeVisible()

// Verify a known reuse from seed data is displayed
await expect(page.getByRole('link', { name: /itineriz/i })).toBeVisible()
Expand Down
Loading