From: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Subject: [PATCH 1/3] Toaster: Check info_sign is visible and clickable in landing page
Date: Mon, 30 Oct 2023 23:25:11 +0100 [thread overview]
Message-ID: <20231030222513.403014-1-alassane.yattara@savoirfairelinux.com> (raw)
Check the information icon is visible and clickable
Also if popup appearing when clicked and contain "Toaster version information"
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
lib/toaster/tests/browser/test_landing_page.py | 17 +++++++++++++++++
lib/toaster/toastergui/templates/base.html | 2 +-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/lib/toaster/tests/browser/test_landing_page.py b/lib/toaster/tests/browser/test_landing_page.py
index 8bb64b9f..2f092400 100644
--- a/lib/toaster/tests/browser/test_landing_page.py
+++ b/lib/toaster/tests/browser/test_landing_page.py
@@ -7,6 +7,7 @@
# Copyright (C) 2013-2016 Intel Corporation
#
+from time import sleep
from django.urls import reverse
from django.utils import timezone
from tests.browser.selenium_helpers import SeleniumTestCase
@@ -29,6 +30,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/lib/toaster/toastergui/templates/base.html b/lib/toaster/toastergui/templates/base.html
index e8600f3e..041448d1 100644
--- a/lib/toaster/toastergui/templates/base.html
+++ b/lib/toaster/toastergui/templates/base.html
@@ -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>
--
2.34.1
next reply other threads:[~2023-10-30 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 22:25 Alassane Yattara [this message]
2023-10-30 22:25 ` [PATCH 2/3] Toaster: Test documentation link in landing header is displayed Alassane Yattara
2023-10-31 15:30 ` [Toaster] " Tim Orling
2023-10-30 22:25 ` [PATCH 3/3] Toaster: Test jumbotron links visible and clickable Alassane Yattara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231030222513.403014-1-alassane.yattara@savoirfairelinux.com \
--to=alassane.yattara@savoirfairelinux.com \
--cc=toaster@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).