diff --git a/krill/krill/tests/test_dashboard.py b/krill/krill/tests/test_dashboard.py index 828f60d..fe508ac 100644 --- a/krill/krill/tests/test_dashboard.py +++ b/krill/krill/tests/test_dashboard.py @@ -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 settings') - self.assertContains(page, reverse('reports:generate_audit_report')) + html = page.content.decode() + actions = html[html.index('class="action-grid"'):html.index('')] + 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] diff --git a/krill/templates/krill/home.html b/krill/templates/krill/home.html index 2264d4a..b75bc1d 100644 --- a/krill/templates/krill/home.html +++ b/krill/templates/krill/home.html @@ -23,10 +23,6 @@

Dashboard

search Find Aliquot - - fact_check - Start Audit -