From cde4f061f421acfa591c7fee381aa4734504b1c3 Mon Sep 17 00:00:00 2001 From: Thibaud Dauce Date: Tue, 23 Dec 2025 13:11:51 +0100 Subject: [PATCH 1/7] feat: add test on quality tooltip --- .../DatasetQualityTooltipContent.vue | 2 +- tests/datasets/[did].spec.ts | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/datagouv-components/src/components/DatasetQualityTooltipContent.vue b/datagouv-components/src/components/DatasetQualityTooltipContent.vue index d6271331..b51bab59 100644 --- a/datagouv-components/src/components/DatasetQualityTooltipContent.vue +++ b/datagouv-components/src/components/DatasetQualityTooltipContent.vue @@ -52,7 +52,7 @@ class="pb-0" /> -
+
{ // Verify it's now expanded await expect(firstAccordion).toHaveAttribute('aria-expanded', 'true') }) + +test('quality tooltip displays content and link is clickable', async ({ page, context }) => { + await page.goto( + '/datasets/base-sirene-des-entreprises-et-de-leurs-etablissements-siren-siret/', + ) + + const qualityButton = page.getByRole('button', { name: 'Qualité des métadonnées' }).first() + await expect(qualityButton).toBeVisible() + + await qualityButton.click() + + // Target the tooltip panel specifically + const tooltip = page.locator('#tooltips') + + // Verify tooltip content (actual data from seed) + await expect(tooltip.getByText('Qualité des métadonnées :')).toBeVisible() + await expect(tooltip.getByText('Description des données renseignée')).toBeVisible() + await expect(tooltip.getByText('Fichiers documentés')).toBeVisible() + await expect(tooltip.getByText('Licence non renseignée')).toBeVisible() + await expect(tooltip.getByText('Fréquence de mise à jour non respectée')).toBeVisible() + await expect(tooltip.getByText('Formats de fichiers standards')).toBeVisible() + await expect(tooltip.getByText('Couverture temporelle renseignée')).toBeVisible() + await expect(tooltip.getByText('Couverture spatiale non renseignée')).toBeVisible() + await expect(tooltip.getByText('Tous les fichiers sont disponibles')).toBeVisible() + + // Verify link is clickable + const learnMoreLink = tooltip.getByRole('link', { name: /En savoir plus sur cet indicateur/i }) + await expect(learnMoreLink).toBeVisible() + + const [newPage] = await Promise.all([ + context.waitForEvent('page'), + learnMoreLink.click(), + ]) + + await expect(newPage).toHaveURL(/guides/) +}) From 17e20d7aca3ed06a3287b6c2f434ff122b368d8a Mon Sep 17 00:00:00 2001 From: Nicolas Kempf Le Stanc Date: Mon, 29 Dec 2025 11:24:58 +0100 Subject: [PATCH 2/7] feat: allow custom tag for org name --- components/OrganizationOwner.vue | 2 ++ .../components/OrganizationNameWithCertificate.vue | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/OrganizationOwner.vue b/components/OrganizationOwner.vue index 5fa8aa90..ae0833c8 100644 --- a/components/OrganizationOwner.vue +++ b/components/OrganizationOwner.vue @@ -12,6 +12,7 @@ > @@ -25,6 +26,7 @@ withDefaults(defineProps<{ organization: Organization | OrganizationReference logoSizeClass?: string logoNoBorder?: boolean + as?: string }>(), { logoSizeClass: 'size-8', logoNoBorder: false, diff --git a/datagouv-components/src/components/OrganizationNameWithCertificate.vue b/datagouv-components/src/components/OrganizationNameWithCertificate.vue index 499eb319..51320066 100644 --- a/datagouv-components/src/components/OrganizationNameWithCertificate.vue +++ b/datagouv-components/src/components/OrganizationNameWithCertificate.vue @@ -4,9 +4,10 @@ v-if="showType" :type="getOrganizationType(organization)" /> -
{{ organization.name }} {{ organization.acronym }} -
+ (), { showAcronym: false, showType: true, size: 'base', + as: 'div', }) From 16c5e3eb5765c588448506bda6c8b0f462dd4594 Mon Sep 17 00:00:00 2001 From: Nicolas Kempf Le Stanc Date: Mon, 29 Dec 2025 11:25:27 +0100 Subject: [PATCH 3/7] feat(seo): improve meta and h2 for dataset page --- pages/datasets/[did].vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/datasets/[did].vue b/pages/datasets/[did].vue index fd75b8a9..0ed76c85 100644 --- a/pages/datasets/[did].vue +++ b/pages/datasets/[did].vue @@ -122,6 +122,7 @@ (url, { redirectOnSlug: 'did', }) -const title = computed(() => dataset.value?.title) +const title = computed(() => t('Jeu de données {title} | {site}', { title: dataset.value?.title ?? '', site: config.public.title })) const robots = computed(() => dataset.value && dataset.value.archived ? 'noindex' : 'all') +const description = computed(() => dataset.value?.description_short) useSeoMeta({ title, robots, + description, }) const hideWarnings = computed(() => { From c7323cf4bafdf0057539d8fff299f7427024fa1e Mon Sep 17 00:00:00 2001 From: Nicolas Kempf Le Stanc Date: Tue, 30 Dec 2025 09:54:03 +0100 Subject: [PATCH 4/7] feat: update SEO tags --- components/FullPageTabs/FullPageTabs.vue | 14 ++++++++++---- pages/dataservices/[did].vue | 9 ++++++--- pages/dataservices/[did]/index.vue | 2 +- pages/reuses/[rid].vue | 6 +++++- pages/reuses/[rid]/index.vue | 4 ++-- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/components/FullPageTabs/FullPageTabs.vue b/components/FullPageTabs/FullPageTabs.vue index 100bc6c7..c029b48a 100644 --- a/components/FullPageTabs/FullPageTabs.vue +++ b/components/FullPageTabs/FullPageTabs.vue @@ -1,7 +1,10 @@ diff --git a/pages/dataservices/[did].vue b/pages/dataservices/[did].vue index 9f893283..e35b34b2 100644 --- a/pages/dataservices/[did].vue +++ b/pages/dataservices/[did].vue @@ -96,6 +96,7 @@ -
+

{{ $t(`Accéder à l'API`) }} -

+ `/api/1/dataservices/${route.params.did}/`) const { data: dataservice, status } = await useAPI(url, { redirectOn404: true, redirectOnSlug: 'did' }) -const title = computed(() => dataservice.value?.title) +const title = computed(() => `${dataservice.value?.title} | ${config.public.title}`) +const description = computed(() => dataservice.value?.description) const robots = computed(() => dataservice.value && dataservice.value.archived_at ? 'noindex' : 'all') useSeoMeta({ title, robots, + description, }) await useJsonLd('dataservice', route.params.did as string) diff --git a/pages/dataservices/[did]/index.vue b/pages/dataservices/[did]/index.vue index c915ef2d..d6777d8a 100644 --- a/pages/dataservices/[did]/index.vue +++ b/pages/dataservices/[did]/index.vue @@ -5,7 +5,7 @@ class="mb-5" >

- {{ $t('{n} jeu de données | {n} jeux de données', pageData.total) }} + {{ $t('{n} jeu de données associé | {n} jeux de données associés', pageData.total) }}

`/api/1/reuses/${route.params.rid}/`) const { data: reuse, status } = await useAPI(url, { redirectOn404: true, redirectOnSlug: 'rid' }) -const title = computed(() => reuse.value?.title) +const title = computed(() => `${reuse.value?.title} | ${config.public.title}`) +const description = computed(() => reuse.value?.description ?? '') const robots = computed(() => reuse.value && !reuse.value.metrics.datasets && !reuse.value.metrics.datasets ? 'noindex, nofollow' : 'all') useSeoMeta({ title, + description, robots, }) diff --git a/pages/reuses/[rid]/index.vue b/pages/reuses/[rid]/index.vue index 948d8f90..41f6ac29 100644 --- a/pages/reuses/[rid]/index.vue +++ b/pages/reuses/[rid]/index.vue @@ -1,9 +1,9 @@