diff --git a/common/test/acceptance/pages/lms/dashboard.py b/common/test/acceptance/pages/lms/dashboard.py
index ccad73d953..29d5ab928a 100644
--- a/common/test/acceptance/pages/lms/dashboard.py
+++ b/common/test/acceptance/pages/lms/dashboard.py
@@ -174,12 +174,6 @@ class DashboardPage(PageObject):
"""
self.q(css='.dropdown').first.click()
- def click_username(self):
- """
- Click username.
- """
- self.q(css='.label-username').first.click()
-
@property
def username_dropdown_link_text(self):
"""
diff --git a/common/test/acceptance/tests/lms/test_learner_profile.py b/common/test/acceptance/tests/lms/test_learner_profile.py
index 3881c06478..72ec3c6431 100644
--- a/common/test/acceptance/tests/lms/test_learner_profile.py
+++ b/common/test/acceptance/tests/lms/test_learner_profile.py
@@ -266,17 +266,21 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
def test_dashboard_learner_profile_link(self):
"""
- Scenario: Verify that when user click on username it will leads to profile page.
+ Scenario: Verify that my profile link is present on dashboard page and we can navigate to correct page.
Given that I am a registered user.
When I go to Dashboard page.
- And I click on username.
+ And I click on username dropdown.
+ Then I see Profile link in the dropdown menu.
+ When I click on Profile link.
Then I will be navigated to Profile page.
"""
username, user_id = self.log_in_as_unique_user()
dashboard_page = DashboardPage(self.browser)
dashboard_page.visit()
- dashboard_page.click_username()
+ dashboard_page.click_username_dropdown()
+ self.assertIn('Profile', dashboard_page.username_dropdown_link_text)
+ dashboard_page.click_my_profile_link()
my_profile_page = LearnerProfilePage(self.browser, username)
my_profile_page.wait_for_page()
diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py
index 3b810796bc..4482d54341 100644
--- a/lms/djangoapps/student_account/test/test_views.py
+++ b/lms/djangoapps/student_account/test/test_views.py
@@ -19,7 +19,6 @@ from django.test.utils import override_settings
from django.http import HttpRequest
from course_modes.models import CourseMode
-from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
from openedx.core.djangoapps.user_api.accounts.api import activate_account, create_account
from openedx.core.djangoapps.user_api.accounts import EMAIL_MAX_LENGTH
from openedx.core.djangolib.js_utils import dump_js_escaped_json
@@ -443,7 +442,7 @@ class StudentAccountLoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMi
})
-class AccountSettingsViewTest(ThirdPartyAuthTestMixin, TestCase, ProgramsApiConfigMixin):
+class AccountSettingsViewTest(ThirdPartyAuthTestMixin, TestCase):
""" Tests for the account settings view. """
USERNAME = 'student'
@@ -457,7 +456,6 @@ class AccountSettingsViewTest(ThirdPartyAuthTestMixin, TestCase, ProgramsApiConf
'year_of_birth',
'preferred_language',
]
- view_path = reverse('account_settings')
@mock.patch("django.conf.settings.MESSAGE_STORAGE", 'django.contrib.messages.storage.cookie.CookieStorage')
def setUp(self):
@@ -504,29 +502,12 @@ class AccountSettingsViewTest(ThirdPartyAuthTestMixin, TestCase, ProgramsApiConf
def test_view(self):
- response = self.client.get(path=self.view_path)
+ view_path = reverse('account_settings')
+ response = self.client.get(path=view_path)
for attribute in self.FIELDS:
self.assertIn(attribute, response.content)
- def test_header_with_programs_listing_enabled(self):
- """
- Verify that tabs header will be shown while program listing is enabled.
- """
- self.create_programs_config(program_listing_enabled=True)
- response = self.client.get(path=self.view_path)
-
- self.assertContains(response, '
')
-
- def test_header_with_programs_listing_disabled(self):
- """
- Verify that nav header will be shown while program listing is disabled.
- """
- self.create_programs_config(program_listing_enabled=False)
- response = self.client.get(path=self.view_path)
-
- self.assertContains(response, '')
-
@override_settings(SITE_NAME=settings.MICROSITE_LOGISTRATION_HOSTNAME)
class MicrositeLogistrationTests(TestCase):
diff --git a/lms/djangoapps/student_account/views.py b/lms/djangoapps/student_account/views.py
index 7b2f43c0e4..6be8e300cb 100644
--- a/lms/djangoapps/student_account/views.py
+++ b/lms/djangoapps/student_account/views.py
@@ -36,7 +36,6 @@ from third_party_auth import pipeline
from third_party_auth.decorators import xframe_allow_whitelisted
from util.bad_request_rate_limiter import BadRequestRateLimiter
-from openedx.core.djangoapps.programs.models import ProgramsApiConfig
from openedx.core.djangoapps.theming.helpers import is_request_in_themed_site, get_value as get_themed_value
from openedx.core.djangoapps.user_api.accounts.api import request_password_change
from openedx.core.djangoapps.user_api.errors import UserNotFound
@@ -395,7 +394,6 @@ def account_settings_context(request):
'user_accounts_api_url': reverse("accounts_api", kwargs={'username': user.username}),
'user_preferences_api_url': reverse('preferences_api', kwargs={'username': user.username}),
'disable_courseware_js': True,
- 'show_program_listing': ProgramsApiConfig.current().show_program_listing,
}
if third_party_auth.is_enabled():
diff --git a/lms/djangoapps/student_profile/test/test_views.py b/lms/djangoapps/student_profile/test/test_views.py
index 22c19387e4..5299b51308 100644
--- a/lms/djangoapps/student_profile/test/test_views.py
+++ b/lms/djangoapps/student_profile/test/test_views.py
@@ -6,13 +6,13 @@ from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import RequestFactory
-from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
-from student.tests.factories import UserFactory
-from student_profile.views import learner_profile_context
from util.testing import UrlResetMixin
+from student.tests.factories import UserFactory
+
+from student_profile.views import learner_profile_context
-class LearnerProfileViewTest(UrlResetMixin, TestCase, ProgramsApiConfigMixin):
+class LearnerProfileViewTest(UrlResetMixin, TestCase):
""" Tests for the student profile view. """
USERNAME = "username"
@@ -101,23 +101,3 @@ class LearnerProfileViewTest(UrlResetMixin, TestCase, ProgramsApiConfigMixin):
profile_path = reverse('learner_profile', kwargs={'username': "no_such_user"})
response = self.client.get(path=profile_path)
self.assertEqual(404, response.status_code)
-
- def test_header_with_programs_listing_enabled(self):
- """
- Verify that tabs header will be shown while program listing is enabled.
- """
- self.create_programs_config(program_listing_enabled=True)
- profile_path = reverse('learner_profile', kwargs={'username': self.USERNAME})
- response = self.client.get(path=profile_path)
-
- self.assertContains(response, '')
-
- def test_header_with_programs_listing_disabled(self):
- """
- Verify that nav header will be shown while program listing is disabled.
- """
- self.create_programs_config(program_listing_enabled=False)
- profile_path = reverse('learner_profile', kwargs={'username': self.USERNAME})
- response = self.client.get(path=profile_path)
-
- self.assertContains(response, '')
diff --git a/lms/djangoapps/student_profile/views.py b/lms/djangoapps/student_profile/views.py
index c98ee2d816..5cd0ad95f4 100644
--- a/lms/djangoapps/student_profile/views.py
+++ b/lms/djangoapps/student_profile/views.py
@@ -12,7 +12,6 @@ from django.contrib.staticfiles.storage import staticfiles_storage
from badges.utils import badges_enabled
from edxmako.shortcuts import render_to_response, marketing_link
from microsite_configuration import microsite
-from openedx.core.djangoapps.programs.models import ProgramsApiConfig
from openedx.core.djangoapps.user_api.accounts.api import get_account_settings
from openedx.core.djangoapps.user_api.errors import UserNotFound, UserNotAuthorized
from openedx.core.djangoapps.user_api.preferences.api import get_user_preferences
@@ -96,7 +95,6 @@ def learner_profile_context(request, profile_username, user_is_staff):
'platform_name': microsite.get_value('platform_name', settings.PLATFORM_NAME),
},
'disable_courseware_js': True,
- 'show_program_listing': ProgramsApiConfig.current().show_program_listing,
}
if badges_enabled():
diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html
index ebe92f1c3f..7c24659139 100644
--- a/lms/templates/navigation.html
+++ b/lms/templates/navigation.html
@@ -49,21 +49,13 @@ site_status_msg = get_site_status_msg(course_id)
%block>