summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2023-11-09 16:16:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 17:03:24 +0000
commitb1156a1a1ba5d865a993db741098e700801e1cb5 (patch)
tree7740472436a997b91210fc4c8f59d6a4c31efec1
parent0f12b4f389365dcde04823f9bb5aaf8a2ed34811 (diff)
downloadpoky-b1156a1a1ba5d865a993db741098e700801e1cb5.tar.gz
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 <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/tests/browser/test_landing_page.py16
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html2
2 files changed, 17 insertions, 1 deletions
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):
29 self.project.is_default = True 29 self.project.is_default = True
30 self.project.save() 30 self.project.save()
31 31
32 def test_icon_info_visible_and_clickable(self):
33 """ Test that the information icon is visible and clickable """
34 self.get(reverse('landing'))
35 info_sign = self.find('#toaster-version-info-sign')
36
37 # check that the info sign is visible
38 self.assertTrue(info_sign.is_displayed())
39
40 # check that the info sign is clickable
41 # and info modal is appearing when clicking on the info sign
42 info_sign.click() # click on the info sign make attribute 'aria-describedby' visible
43 info_model_id = info_sign.get_attribute('aria-describedby')
44 info_modal = self.find(f'#{info_model_id}')
45 self.assertTrue(info_modal.is_displayed())
46 self.assertTrue("Toaster version information" in info_modal.text)
47
32 def test_only_default_project(self): 48 def test_only_default_project(self):
33 """ 49 """
34 No projects except default 50 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 @@
94 </a> 94 </a>
95 <a class="brand" href="/">Toaster</a> 95 <a class="brand" href="/">Toaster</a>
96 {% if DEBUG %} 96 {% if DEBUG %}
97 <span class="glyphicon glyphicon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Git branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Git revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i> 97 <span id="toaster-version-info-sign" class="glyphicon glyphicon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Git branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Git revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
98 {% endif %} 98 {% endif %}
99 </div> 99 </div>
100 </div> 100 </div>