wiring for language selector
This commit is contained in:
committed by
thedeadparrot
parent
895bb5e029
commit
cb6b52f890
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Student dashboard page.
|
||||
"""
|
||||
@@ -59,3 +60,8 @@ class DashboardPage(PageObject):
|
||||
return "a.enter-course:nth-of-type({0})".format(link_index + 1)
|
||||
else:
|
||||
return None
|
||||
|
||||
def change_language(self):
|
||||
self.css_click(".edit-language")
|
||||
self.select_option("language", "eo")
|
||||
self.css_click("#submit-lang")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
E2E tests for the LMS.
|
||||
"""
|
||||
@@ -17,6 +18,7 @@ from ..pages.lms.course_info import CourseInfoPage
|
||||
from ..pages.lms.tab_nav import TabNavPage
|
||||
from ..pages.lms.course_nav import CourseNavPage
|
||||
from ..pages.lms.progress import ProgressPage
|
||||
from ..pages.lms.dashboard import DashboardPage
|
||||
from ..pages.lms.video import VideoPage
|
||||
from ..pages.xblock.acid import AcidView
|
||||
from ..fixtures.course import CourseFixture, XBlockFixtureDesc, CourseUpdateDesc
|
||||
@@ -68,6 +70,30 @@ class RegistrationTest(UniqueCourseTest):
|
||||
self.assertIn(self.course_info['display_name'], course_names)
|
||||
|
||||
|
||||
class LanguageTest(UniqueCourseTest):
|
||||
"""
|
||||
Tests that the change language functionality on the dashboard works
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
Initiailize dashboard page
|
||||
"""
|
||||
super(LanguageTest, self).setUp()
|
||||
self.dashboard_page = DashboardPage(self.browser)
|
||||
|
||||
def test_change_lang(self):
|
||||
AutoAuthPage(self.browser, course_id=self.course_id).visit()
|
||||
self.dashboard_page.visit()
|
||||
# Change language to Esperanto
|
||||
self.dashboard_page.change_language()
|
||||
self.fail()
|
||||
self.dashboard_page.visit()
|
||||
body = self.browser.body
|
||||
matches = re.match(u'^FÏND ÇØÜRSÉS.+$', body)
|
||||
self.assertTrue(matches is not None)
|
||||
|
||||
|
||||
class HighLevelTabTest(UniqueCourseTest):
|
||||
"""
|
||||
Tests that verify each of the high-level tabs available within a course.
|
||||
|
||||
Reference in New Issue
Block a user