Skip to content

Commit

Permalink
feat: translations and e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Jul 12, 2024
1 parent dacdb4a commit 4745f7c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 34 deletions.
26 changes: 1 addition & 25 deletions apps/datahub-e2e/src/e2e/search.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('search', () => {
' Aucune correspondance. '
)
})
describe('expanded search panel', () => {
describe.only('expanded search panel', () => {
beforeEach(() => {
cy.get('[data-cy="filterExpandBtn"]').as('expandBtn')
})
Expand All @@ -238,30 +238,6 @@ describe('search', () => {
cy.get('[data-cy=filterResetBtn]').click()
cy.get('@result-cards').should('have.length', 14)
})
describe('sort by date', () => {
beforeEach(() => {
// first sort by popularity
cy.get('@expandBtn').click()
cy.get('gn-ui-sort-by').selectDropdownOption('desc,_score')
cy.get('@result-cards')
.find('[data-cy="recordTitle"]')
.then(($titles) =>
$titles.toArray().map((title) => title.innerText.trim())
)
.as('initialResultTitles')
cy.get('gn-ui-sort-by').selectDropdownOption('desc,createDate')
})
it('changes the results order', function () {
cy.get('@result-cards')
.find('[data-cy="recordTitle"]')
.then(($titles) => {
const titles = $titles
.toArray()
.map((title) => title.innerText.trim())
assert.notEqual(titles, this['initialResultTitles']) // @initialResultTitles
})
})
})
it('should show close button and show less filters on click', () => {
cy.get('@expandBtn').click()
cy.get('mel-datahub-filter-dropdown').should('have.length', 6)
Expand Down
9 changes: 6 additions & 3 deletions resources/translations/en_MEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@
"mel.datahub.multiselect.filter.placeholder": "",
"mel.datahub.search.clear": "",
"mel.datahub.search.filters.categoryKeyword": "",
"mel.datahub.search.filters.keyword": "",
"mel.datahub.search.filters.license": "",
"mel.datahub.search.filters.maxValue": "",
"mel.datahub.search.filters.minValue": "",
"mel.datahub.search.filters.more": "",
"mel.datahub.search.filters.publicationYear": "",
"mel.datahub.search.filters.publisher": "",
"mel.datahub.search.filters.revisionYear": "",
"mel.datahub.search.filters.qualityScore": "",
"mel.datahub.search.filters.range.from": "",
"mel.datahub.search.filters.range.to": "",
"mel.datahub.search.filters.reduce": "",
"mel.datahub.search.filters.refine": "",
"mel.datahub.search.filters.reset": "",
"mel.datahub.search.filters.territories": "",
"mel.datahub.search.filters.topic": "",
"mel.datahub.search.filters.validate": "",
"mel.datahub.search.form.description": "",
"mel.datahub.search.form.title": "",
"mel.datahub.search.hits.found": "",
Expand Down
16 changes: 10 additions & 6 deletions resources/translations/fr_MEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@
"mel.datahub.multiselect.filter.placeholder": "Rechercher",
"mel.datahub.search.clear": "Effacer",
"mel.datahub.search.filters.categoryKeyword": "Thématique",
"mel.datahub.search.filters.keyword": "Territoires",
"mel.datahub.search.filters.license": "Licence",
"mel.datahub.search.filters.maxValue": "Valeur maximale",
"mel.datahub.search.filters.minValue": "Valeur minimale",
"mel.datahub.search.filters.more": "Plus de filtres",
"mel.datahub.search.filters.publicationYear": "Date",
"mel.datahub.search.filters.publisher": "Producteur",
"mel.datahub.search.filters.qualityScore": "Score de qualité",
"mel.datahub.search.filters.reduce": "Réduire",
"mel.datahub.search.filters.refine": "Affiner votre recherche",
"mel.datahub.search.filters.range.from": "De :",
"mel.datahub.search.filters.range.to": "Jusqu'à :",
"mel.datahub.search.filters.reduce": "Moins de filtres",
"mel.datahub.search.filters.reset": "Réinitialiser",
"mel.datahub.search.filters.territories": "Territoires",
"mel.datahub.search.filters.topic": "Catégorie",
"mel.datahub.search.filters.topic": "Catégories",
"mel.datahub.search.filters.validate": "Valider",
"mel.datahub.search.form.description": "Vous pouvez utiliser la barre de recherche ou les différents filtres situés ci-dessous pour trouver un jeu de données plus rapidement.",
"mel.datahub.search.form.title": "Trouver un jeu de données",
"mel.datahub.search.hits.found": "{hits, plural, =0{Aucune correspondance.} one{1 enregistrement trouvé.} other{Ensemble des données: {hits}}}",
Expand Down Expand Up @@ -83,6 +87,6 @@
"mel.searchpage.subtitle.favorites": "Jeux de données suivis",
"mel.tooltip.url.copy": "Copier l'URL racine",
"search.filters.categoryKeyword": "Mot clé",
"search.filters.qualityScore": "",
"search.filters.territories": ""
"search.filters.qualityScore": "Score de qualité",
"search.filters.territories": "Territoires"
}

0 comments on commit 4745f7c

Please sign in to comment.