Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions krill/krill/tests/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,18 @@ def test_site_name_only_appears_on_freezer_cards_when_there_are_several_sites(se
Device.objects.create(name='Other', site=Site.objects.create(name='Annex'))
self.assertTrue(self.page().context['show_sites'])

def test_quick_actions_drop_settings_and_offer_an_audit(self):
def test_quick_actions_are_new_aliquot_and_find_aliquot_only(self):
page = self.page()
self.assertNotContains(page, 'class="action-btn">\n <span class="material-icons-round">settings')
self.assertContains(page, reverse('reports:generate_audit_report'))
html = page.content.decode()
actions = html[html.index('class="action-grid"'):html.index('<!-- Samples -->')]
self.assertIn('New Aliquot', actions)
self.assertIn('Find Aliquot', actions)
self.assertNotIn('Start Audit', actions)
self.assertEqual(actions.count('class="action-btn"'), 2)
# Starting an audit is still one click away from the Audits tile and the sidebar
self.assertNotContains(page, f'href="{reverse("reports:generate_audit_report")}"')
self.assertContains(page, f'href="{reverse("reports:audit_list")}"')

def test_recent_activity_reads_as_a_sentence_with_where_it_is_stored(self):
aliquot = self.store(1)[0]
Expand Down
4 changes: 0 additions & 4 deletions krill/templates/krill/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ <h1>Dashboard</h1>
<span class="material-icons-round">search</span>
Find Aliquot
</a>
<a href="{% url 'reports:generate_audit_report' %}" class="action-btn">
<span class="material-icons-round">fact_check</span>
Start Audit
</a>
</div>
</div>

Expand Down
Loading