mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 21:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0f12b4f389
commit
b1156a1a1b
@@ -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
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</a>
|
||||
<a class="brand" href="/">Toaster</a>
|
||||
{% if DEBUG %}
|
||||
<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>
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user