diff --git a/app/institutions/dashboard/-components/institutional-users-list/component.ts b/app/institutions/dashboard/-components/institutional-users-list/component.ts index 62c32591dc..1cbb8dbde8 100644 --- a/app/institutions/dashboard/-components/institutional-users-list/component.ts +++ b/app/institutions/dashboard/-components/institutional-users-list/component.ts @@ -9,6 +9,7 @@ import Intl from 'ember-intl/services/intl'; import InstitutionModel from 'ember-osf-web/models/institution'; import InstitutionDepartmentsModel from 'ember-osf-web/models/institution-department'; import Analytics from 'ember-osf-web/services/analytics'; +import { RelationshipWithLinks } from 'osf-api'; interface Column { key: string; @@ -184,6 +185,27 @@ export default class InstitutionalUsersList extends Component - - - - + + + {{t 'institutions.dashboard.format_labels.json'}} + diff --git a/tests/integration/routes/institutions/dashboard/-components/institutional-users-list/component-test.ts b/tests/integration/routes/institutions/dashboard/-components/institutional-users-list/component-test.ts index 7ea72714ed..6faf08a688 100644 --- a/tests/integration/routes/institutions/dashboard/-components/institutional-users-list/component-test.ts +++ b/tests/integration/routes/institutions/dashboard/-components/institutional-users-list/component-test.ts @@ -35,10 +35,10 @@ module('Integration | routes | institutions | dashboard | -components | institut this.set('model', model); await render(hbs` - + `); assert.dom('[data-test-header]') .exists({ count: 9 }, '9 default headers'); @@ -70,6 +70,12 @@ module('Integration | routes | institutions | dashboard | -components | institut .exists({ count: 5 }, '5 in the list with public project'); assert.dom('[data-test-item="privateProjects"]') .exists({ count: 5 }, '5 in the list with private projects'); + + // Test download buttons + await click('[data-test-download-dropdown]'); + assert.dom('[data-test-csv-download-button]').exists('CSV download button'); + assert.dom('[data-test-tsv-download-button]').exists('TSV download button'); + assert.dom('[data-test-json-download-button]').exists('JSON download button'); }); test('it sorts', async function(assert) { @@ -105,10 +111,10 @@ module('Integration | routes | institutions | dashboard | -components | institut this.set('model', model); await render(hbs` - + `); assert.dom('[data-test-item="user_name"]') .exists({ count: 3 }, '3 users'); diff --git a/translations/en-us.yml b/translations/en-us.yml index 0416c52097..7c52167096 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -818,8 +818,7 @@ institutions: format_labels: csv: '.csv' tsv: '.tsv' - json_table: 'JSON (table)' - json_direct: 'JSON (direct)' + json: 'JSON' download: 'Download' select_default: 'All Departments' users_list: