Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
77178e9f
Commit
77178e9f
authored
Sep 25, 2014
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5378 from edx/zoldak/look-into-languagetest
Add explanation and small optimizations to LanguageTest
parents
c5ae921d
6d5e65c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
common/test/acceptance/pages/lms/dashboard.py
+5
-0
common/test/acceptance/tests/test_lms.py
+5
-4
No files found.
common/test/acceptance/pages/lms/dashboard.py
View file @
77178e9f
...
...
@@ -21,6 +21,11 @@ class DashboardPage(PageObject):
@property
def
courses_text
(
self
):
"""
This is the title label for the section of the student dashboard that
shows all the courses that the student is enrolled in.
The string displayed is defined in lms/templates/dashboard.html.
"""
text_items
=
self
.
q
(
css
=
'section#my-courses span.my-courses-title-label'
)
.
text
if
len
(
text_items
)
>
0
:
return
text_items
[
0
]
...
...
common/test/acceptance/tests/test_lms.py
View file @
77178e9f
...
...
@@ -6,6 +6,7 @@ E2E tests for the LMS.
from
textwrap
import
dedent
from
unittest
import
skip
from
bok_choy.web_app_test
import
WebAppTest
from
.helpers
import
UniqueCourseTest
,
load_data_str
from
..pages.lms.auto_auth
import
AutoAuthPage
from
..pages.lms.find_courses
import
FindCoursesPage
...
...
@@ -37,7 +38,7 @@ class RegistrationTest(UniqueCourseTest):
self
.
course_about_page
=
CourseAboutPage
(
self
.
browser
,
self
.
course_id
)
# Create a course to register for
course_fix
=
CourseFixture
(
CourseFixture
(
self
.
course_info
[
'org'
],
self
.
course_info
[
'number'
],
self
.
course_info
[
'run'
],
self
.
course_info
[
'display_name'
]
)
.
install
()
...
...
@@ -64,7 +65,7 @@ class RegistrationTest(UniqueCourseTest):
self
.
assertIn
(
self
.
course_info
[
'display_name'
],
course_names
)
class
LanguageTest
(
UniqueCourse
Test
):
class
LanguageTest
(
WebApp
Test
):
"""
Tests that the change language functionality on the dashboard works
"""
...
...
@@ -87,7 +88,7 @@ class LanguageTest(UniqueCourseTest):
self
.
email
=
"test@example.com"
def
test_change_lang
(
self
):
AutoAuthPage
(
self
.
browser
,
course_id
=
self
.
course_id
)
.
visit
()
AutoAuthPage
(
self
.
browser
)
.
visit
()
self
.
dashboard_page
.
visit
()
# Change language to Dummy Esperanto
self
.
dashboard_page
.
change_language
(
self
.
test_new_lang
)
...
...
@@ -98,7 +99,7 @@ class LanguageTest(UniqueCourseTest):
self
.
assertIn
(
self
.
courses_text
,
changed_text
)
def
test_language_persists
(
self
):
auto_auth_page
=
AutoAuthPage
(
self
.
browser
,
username
=
self
.
username
,
password
=
self
.
password
,
email
=
self
.
email
,
course_id
=
self
.
course_id
)
auto_auth_page
=
AutoAuthPage
(
self
.
browser
,
username
=
self
.
username
,
password
=
self
.
password
,
email
=
self
.
email
)
auto_auth_page
.
visit
()
self
.
dashboard_page
.
visit
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment