From 0766f6cdc87b7ce6fb2bf95514602d5c29472940 Mon Sep 17 00:00:00 2001 From: Alassane Yattara Date: Tue, 14 Nov 2023 15:28:01 +0100 Subject: bitbake: toaster/tests: Add UI TestCase to test if 'no build' message is shown In all builds page, check if 'no build' message is shown when there are no build. (Bitbake rev: 4aa2a4e464a9bd85e1e22c87d0d7b54a5a899745) Signed-off-by: Alassane Yattara Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/browser/test_sample.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bitbake/lib/toaster') diff --git a/bitbake/lib/toaster/tests/browser/test_sample.py b/bitbake/lib/toaster/tests/browser/test_sample.py index b0067c21cd..73973778e4 100644 --- a/bitbake/lib/toaster/tests/browser/test_sample.py +++ b/bitbake/lib/toaster/tests/browser/test_sample.py @@ -27,3 +27,12 @@ class TestSample(SeleniumTestCase): self.get(url) brand_link = self.find('.toaster-navbar-brand a.brand') self.assertEqual(brand_link.text.strip(), 'Toaster') + + def test_no_builds_message(self): + """ Test that a message is shown when there are no builds """ + url = reverse('all-builds') + self.get(url) + div_msg = self.find('#empty-state-allbuildstable .alert-info') + + msg = 'Sorry - no data found' + self.assertEqual(div_msg.text, msg) -- cgit v1.2.3-54-g00ecf