[PATCH v2 1/6] Toaster: Write UI TestCase -> Test if 'no build' message is shown
Alassane Yattara <[email protected]> Tue, 14 Nov 2023 15:28:42 +0100
| Newsgroups | org.yoctoproject.lists.toaster |
|---|---|
| Message-ID | <[email protected]> |
In all builds page, check if 'no build' message is shown when there are no build. Signed-off-by: Alassane Yattara <[email protected]> --- lib/toaster/tests/browser/test_sample.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/toaster/tests/browser/test_sample.py b/lib/toaster/tests/browser/test_sample.py index b0067c21..73973778 100644 --- a/lib/toaster/tests/browser/test_sample.py +++ b/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) -- 2.34.1