From 8b9506211a5a8dca63532a1c8b7bdd39e3d025c4 Mon Sep 17 00:00:00 2001 From: Mark Sadecki Date: Thu, 8 Dec 2016 16:12:34 -0500 Subject: [PATCH 1/2] removes redundant alt attribute value --- lms/templates/user_dropdown.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/user_dropdown.html b/lms/templates/user_dropdown.html index eb66f4fc91..73f58eccf4 100644 --- a/lms/templates/user_dropdown.html +++ b/lms/templates/user_dropdown.html @@ -49,7 +49,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_ username = self.real_user.username profile_image_url = get_profile_image_urls_for_user(self.real_user)['medium'] %> - ${_('Profile image for {username}').format(username=username)} +
${username}
From 33949571b7bcf173c5ac6035502661aa1811bfbd Mon Sep 17 00:00:00 2001 From: Mark Sadecki Date: Mon, 12 Dec 2016 08:32:43 -0500 Subject: [PATCH 2/2] adds a test so this doesn't regress again --- common/test/acceptance/pages/lms/dashboard.py | 4 ++++ common/test/acceptance/tests/lms/test_lms_dashboard.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/common/test/acceptance/pages/lms/dashboard.py b/common/test/acceptance/pages/lms/dashboard.py index d859fdfb81..a4ce88f898 100644 --- a/common/test/acceptance/pages/lms/dashboard.py +++ b/common/test/acceptance/pages/lms/dashboard.py @@ -156,6 +156,10 @@ class DashboardPage(PageObject): """ Retrieves the specified social sharing widget by its classification """ return self.q(css='a.action-{}'.format(widget_name)) + def get_profile_img(self): + """ Retrieves the user's profile image """ + return self.q(css='img.user-image-frame') + def get_courses(self): """ Get all courses shown in the dashboard diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py index 7dc32b0ad4..2aa5086e25 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py @@ -305,6 +305,13 @@ class LmsDashboardPageTest(BaseLmsDashboardTest): # and course starts within 5 days self.assertEqual(course_date, expected_course_date) + def test_profile_img_alt_empty(self): + """ + Validate value of profile image alt attribue is null + """ + profile_img = self.dashboard_page.get_profile_img() + self.assertEqual(profile_img.attrs('alt')[0], '') + @attr('a11y') class LmsDashboardA11yTest(BaseLmsDashboardTestMultiple):