Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-dashboard
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-analytics-dashboard
Commits
812a172c
Commit
812a172c
authored
Jul 28, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine DashboardPage and CoursePage for a11y tests
parent
71699eb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
a11y_tests/pages.py
+9
-15
No files found.
a11y_tests/pages.py
View file @
812a172c
...
@@ -6,34 +6,28 @@ from bok_choy.page_object import PageObject
...
@@ -6,34 +6,28 @@ from bok_choy.page_object import PageObject
from
acceptance_tests
import
TEST_COURSE_ID
,
DASHBOARD_SERVER_URL
from
acceptance_tests
import
TEST_COURSE_ID
,
DASHBOARD_SERVER_URL
class
DashboardPage
(
PageObject
):
# pylint: disable=abstract-method
class
CoursePage
(
PageObject
):
path
=
None
basic_auth_username
=
None
basic_auth_username
=
None
basic_auth_password
=
None
basic_auth_password
=
None
@property
def
url
(
self
):
return
self
.
page_url
def
__init__
(
self
,
browser
,
path
=
None
):
super
(
DashboardPage
,
self
)
.
__init__
(
browser
)
path
=
path
or
self
.
path
self
.
server_url
=
DASHBOARD_SERVER_URL
self
.
page_url
=
'{0}/{1}'
.
format
(
self
.
server_url
,
path
)
class
CoursePage
(
DashboardPage
):
def
__init__
(
self
,
browser
,
course_id
=
None
):
def
__init__
(
self
,
browser
,
course_id
=
None
):
# Create the path
# Create the path
self
.
course_id
=
course_id
or
TEST_COURSE_ID
self
.
course_id
=
course_id
or
TEST_COURSE_ID
path
=
'courses/{}'
.
format
(
self
.
course_id
)
path
=
'courses/{}'
.
format
(
self
.
course_id
)
self
.
server_url
=
DASHBOARD_SERVER_URL
self
.
page_url
=
'{0}/{1}'
.
format
(
self
.
server_url
,
path
)
# Call the constructor and setup the URL
# Call the constructor and setup the URL
super
(
CoursePage
,
self
)
.
__init__
(
browser
,
path
)
super
(
CoursePage
,
self
)
.
__init__
(
browser
)
def
is_browser_on_page
(
self
):
def
is_browser_on_page
(
self
):
return
self
.
browser
.
current_url
==
self
.
page_url
return
self
.
browser
.
current_url
==
self
.
page_url
@property
def
url
(
self
):
return
self
.
page_url
class
CourseEnrollmentDemographicsPage
(
CoursePage
):
class
CourseEnrollmentDemographicsPage
(
CoursePage
):
demographic
=
None
demographic
=
None
...
...
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