Skip to content

Commit

Permalink
move around tests to reflect new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Nov 12, 2024
1 parent 4c26c7b commit bd40d53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ module('Integration | institutions | dashboard | -components | object-list', hoo
`);

// Elements from InstitutionDashboarWrapper are present
assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');
assert.dom('[data-test-page-tab="summary"]').exists('Summary tab exists');

// Elements in the top bar are present
Expand Down
10 changes: 8 additions & 2 deletions tests/acceptance/institutions/dashboard-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ module(moduleName, hooks => {
"Still at '/institutions/has-users/dashboard'.",
);

assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');

assert.dom('[data-test-page-tab="summary"]').exists('Summary tab exists');
assert.dom('[data-test-page-tab="users"]').exists('Users tab exists');
assert.dom('[data-test-page-tab="projects"]').exists('Projects tab exists');
Expand All @@ -38,21 +36,29 @@ module(moduleName, hooks => {
await click('[data-test-page-tab="users"]');
await percySnapshot(`${moduleName} - users`);
assert.dom('[data-test-page-tab="users"]').hasClass('active', 'Users tab is active');
assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');
assert.dom('[data-test-download-dropdown]').exists('Link to download file formats');

// Projects tab
await click('[data-test-page-tab="projects"]');
await percySnapshot(`${moduleName} - projects`);
assert.dom('[data-test-page-tab="projects"]').hasClass('active', 'Projects tab is active');
assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');
assert.dom('[data-test-download-dropdown]').exists('Link to download file formats');

// Registrations tab
await click('[data-test-page-tab="registrations"]');
await percySnapshot(`${moduleName} - registrations`);
assert.dom('[data-test-page-tab="registrations"]').hasClass('active', 'Registrations tab is active');
assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');
assert.dom('[data-test-download-dropdown]').exists('Link to download file formats');

// Preprints tab
await click('[data-test-page-tab="preprints"]');
await percySnapshot(`${moduleName} - preprints`);
assert.dom('[data-test-page-tab="preprints"]').hasClass('active', 'Preprints tab is active');
assert.dom('[data-test-link-to-reports-archive]').exists('Link to download prior reports exists');
assert.dom('[data-test-download-dropdown]').exists('Link to download file formats');
});

test('institutions dashboard: projects, registrations, and preprints tab', async function(assert) {
Expand Down

0 comments on commit bd40d53

Please sign in to comment.