From b1156a1a1ba5d865a993db741098e700801e1cb5 Mon Sep 17 00:00:00 2001 From: Alassane Yattara Date: Thu, 9 Nov 2023 16:16:55 +0100 Subject: bitbake: toaster: Check info_sign is visible and clickable in landing page Check the information icon is visible and clickable Also if popup appearing when clicked and contain "Toaster version information" (Bitbake rev: 0508fd74ebd43359473a9718edf0d146002041ad) Signed-off-by: Alassane Yattara Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/browser/test_landing_page.py | 16 ++++++++++++++++ bitbake/lib/toaster/toastergui/templates/base.html | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/tests/browser/test_landing_page.py b/bitbake/lib/toaster/tests/browser/test_landing_page.py index 8bb64b9f3e..a3aa2f9346 100644 --- a/bitbake/lib/toaster/tests/browser/test_landing_page.py +++ b/bitbake/lib/toaster/tests/browser/test_landing_page.py @@ -29,6 +29,22 @@ class TestLandingPage(SeleniumTestCase): self.project.is_default = True self.project.save() + def test_icon_info_visible_and_clickable(self): + """ Test that the information icon is visible and clickable """ + self.get(reverse('landing')) + info_sign = self.find('#toaster-version-info-sign') + + # check that the info sign is visible + self.assertTrue(info_sign.is_displayed()) + + # check that the info sign is clickable + # and info modal is appearing when clicking on the info sign + info_sign.click() # click on the info sign make attribute 'aria-describedby' visible + info_model_id = info_sign.get_attribute('aria-describedby') + info_modal = self.find(f'#{info_model_id}') + self.assertTrue(info_modal.is_displayed()) + self.assertTrue("Toaster version information" in info_modal.text) + def test_only_default_project(self): """ No projects except default diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index e8600f3e92..041448d180 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html @@ -94,7 +94,7 @@ Toaster {% if DEBUG %} - + {% endif %} -- cgit v1.2.3-54-g00ecf