diff --git a/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts b/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts index 01fcd7a4ef..bb64524af4 100644 --- a/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts +++ b/apps/metadata-editor-e2e/src/e2e/dashboard.cy.ts @@ -61,4 +61,38 @@ describe('dashboard', () => { }) }) }) + + describe('checkboxes', () => { + it('should show the correct amount of selected records when they are selected', () => { + cy.visit('/records/all') + cy.get('gn-ui-record-table') + .find('.record-table-col') + .get('[type="checkbox"]') + .eq(2) + .click() + cy.get('.selected-records').contains('1 selected') + }) + + it('should show nothing when none are selected', () => { + cy.visit('/records/all') + cy.get('gn-ui-record-table') + .find('.record-table-col') + .get('mat-checkbox.mat-primary') + .each(($checkbox) => cy.wrap($checkbox).click()) + cy.get('.records-information').should( + 'not.have.descendants', + '.selected-records' + ) + }) + + it('should select all records when the "select all" checkbox is checked', () => { + cy.visit('/records/all') + cy.get('gn-ui-record-table') + .find('.record-table-col') + .get('mat-checkbox.mat-primary') + .first() + .click() + cy.get('.selected-records').contains('12 selected') + }) + }) }) diff --git a/apps/metadata-editor/src/app/records/records-list.component.html b/apps/metadata-editor/src/app/records/records-list.component.html index ef2f49181f..8bdb00e3c6 100644 --- a/apps/metadata-editor/src/app/records/records-list.component.html +++ b/apps/metadata-editor/src/app/records/records-list.component.html @@ -14,7 +14,6 @@

{{ title }}

- np

dashboard.records.users

diff --git a/libs/ui/search/src/lib/record-table/record-table.component.html b/libs/ui/search/src/lib/record-table/record-table.component.html index 1b5b225d6e..6db4a69c18 100644 --- a/libs/ui/search/src/lib/record-table/record-table.component.html +++ b/libs/ui/search/src/lib/record-table/record-table.component.html @@ -1,14 +1,24 @@
-
- results.records.hits.displayedOn +
+
+ results.records.hits.displayedOn +
+
+ results.records.hits.selected +
  • Versuchen Sie andere Wörter
  • Geben Sie weniger Wörter ein
  • ", "results.records.hits.found": "{hits, plural, =0{Keine Dokumente entsprechen der angegebenen Suche.} one{1 Datensatz gefunden.} other{{hits} Datensätze gefunden.}}", + "results.records.hits.selected": "", "results.showMore": "Mehr Ergebnisse anzeigen...", "results.sortBy.dateStamp": "Letzte Aktualisierungen", "results.sortBy.popularity": "Beliebtheit", diff --git a/translations/en.json b/translations/en.json index a8f6d85feb..06f25a10d8 100644 --- a/translations/en.json +++ b/translations/en.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "{displayed, plural, =0{No record.} one{1 record} other{{displayed} records }} {hits, plural, other{displayed on {hits} total.}}", "results.records.hits.empty.help.html": "Suggestions:
    • Try other words
    • Specify fewer words
    ", "results.records.hits.found": "{hits, plural, =0{No documents match the specified search.} one{1 record found.} other{{hits} records found.}}", + "results.records.hits.selected": "{ amount } selected", "results.showMore": "Show more results...", "results.sortBy.dateStamp": "Most recent", "results.sortBy.popularity": "Popularity", diff --git a/translations/es.json b/translations/es.json index deb48dee7a..fb343b2f7b 100644 --- a/translations/es.json +++ b/translations/es.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "", "results.records.hits.empty.help.html": "", "results.records.hits.found": "", + "results.records.hits.selected": "", "results.showMore": "", "results.sortBy.dateStamp": "", "results.sortBy.popularity": "", diff --git a/translations/fr.json b/translations/fr.json index b433aaa0f9..55a5b0b9d8 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "", "results.records.hits.empty.help.html": "Suggestions :
    • Essayez d'autres mots clés
    • Cherchez moins de mots
    ", "results.records.hits.found": "{hits, plural, =0{Aucune correspondance.} one{1 enregistrement trouvé.} other{{hits} résultats.}}", + "results.records.hits.selected": "", "results.showMore": "Plus de résultats...", "results.sortBy.dateStamp": "Plus récent", "results.sortBy.popularity": "Popularité", diff --git a/translations/it.json b/translations/it.json index db14efc962..bbb065b142 100644 --- a/translations/it.json +++ b/translations/it.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "", "results.records.hits.empty.help.html": "", "results.records.hits.found": "", + "results.records.hits.selected": "", "results.showMore": "", "results.sortBy.dateStamp": "", "results.sortBy.popularity": "", diff --git a/translations/nl.json b/translations/nl.json index 4af1cd9267..11d0f0ab3e 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "", "results.records.hits.empty.help.html": "", "results.records.hits.found": "", + "results.records.hits.selected": "", "results.showMore": "", "results.sortBy.dateStamp": "", "results.sortBy.popularity": "", diff --git a/translations/pt.json b/translations/pt.json index d4a4d66612..22c858950f 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -224,6 +224,7 @@ "results.records.hits.displayedOn": "", "results.records.hits.empty.help.html": "", "results.records.hits.found": "", + "results.records.hits.selected": "", "results.showMore": "", "results.sortBy.dateStamp": "", "results.sortBy.popularity": "",