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
7dac728e
Commit
7dac728e
authored
Nov 03, 2015
by
Adnan Ghaffar
Committed by
adnanghaffar07
Nov 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding fixed tests for chrome
parent
4cba4007
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
common/test/acceptance/pages/lms/problem.py
+8
-0
common/test/acceptance/pages/studio/library.py
+3
-1
common/test/acceptance/tests/lms/test_library.py
+4
-2
common/test/acceptance/tests/lms/test_lms_problems.py
+2
-0
No files found.
common/test/acceptance/pages/lms/problem.py
View file @
7dac728e
...
...
@@ -10,6 +10,7 @@ class ProblemPage(PageObject):
"""
url
=
None
CSS_PROBLEM_HEADER
=
'.problem-header'
def
is_browser_on_page
(
self
):
return
self
.
q
(
css
=
'.xblock-student_view'
)
.
present
...
...
@@ -81,6 +82,7 @@ class ProblemPage(PageObject):
Fill in the answer to a numerical problem.
"""
self
.
q
(
css
=
'div.problem section.inputtype input'
)
.
fill
(
text
)
self
.
wait_for_ajax
()
def
click_check
(
self
):
"""
...
...
@@ -89,6 +91,12 @@ class ProblemPage(PageObject):
self
.
q
(
css
=
'div.problem button.check'
)
.
click
()
self
.
wait_for_ajax
()
def
wait_for_status_icon
(
self
):
"""
wait for status icon
"""
self
.
wait_for_element_visibility
(
'div.problem section.inputtype div .status'
,
'wait for status icon'
)
def
click_hint
(
self
):
"""
Click the Hint button.
...
...
common/test/acceptance/pages/studio/library.py
View file @
7dac728e
...
...
@@ -9,6 +9,7 @@ from .component_editor import ComponentEditorView
from
.container
import
XBlockWrapper
from
...pages.studio.users
import
UsersPageMixin
from
...pages.studio.pagination
import
PaginatedMixin
from
selenium.webdriver.common.keys
import
Keys
from
..common.utils
import
confirm_prompt
,
wait_for_notification
...
...
@@ -168,7 +169,8 @@ class StudioLibraryContentEditor(ComponentEditorView):
Sets value of children count input
"""
count_text
=
self
.
get_setting_element
(
self
.
COUNT_LABEL
)
count_text
.
clear
()
count_text
.
send_keys
(
Keys
.
CONTROL
,
"a"
)
count_text
.
send_keys
(
Keys
.
BACK_SPACE
)
count_text
.
send_keys
(
count
)
EmptyPromise
(
lambda
:
self
.
count
==
count
,
"count is updated in modal."
)
.
fulfill
()
...
...
common/test/acceptance/tests/lms/test_library.py
View file @
7dac728e
...
...
@@ -118,6 +118,7 @@ class LibraryContentTestBase(UniqueCourseTest):
LogoutPage
(
self
.
browser
)
.
visit
()
self
.
_auto_auth
(
self
.
STAFF_USERNAME
,
self
.
STAFF_EMAIL
,
True
)
self
.
course_outline
.
visit
()
subsection
=
self
.
course_outline
.
section
(
SECTION_NAME
)
.
subsection
(
SUBSECTION_NAME
)
return
subsection
.
expand_subsection
()
.
unit
(
UNIT_NAME
)
.
go_to
()
...
...
@@ -156,9 +157,10 @@ class LibraryContentTest(LibraryContentTestBase):
XBlockFixtureDesc
(
"html"
,
"Html1"
,
data
=
'html1'
),
XBlockFixtureDesc
(
"html"
,
"Html2"
,
data
=
'html2'
),
XBlockFixtureDesc
(
"html"
,
"Html3"
,
data
=
'html3'
),
XBlockFixtureDesc
(
"html"
,
"Html4"
,
data
=
'html4'
),
)
@ddt.data
(
1
,
2
,
3
)
@ddt.data
(
2
,
3
,
4
)
def
test_shows_random_xblocks_from_configured
(
self
,
count
):
"""
Scenario: Ensures that library content shows {count} random xblocks from library in LMS
...
...
@@ -190,7 +192,7 @@ class LibraryContentTest(LibraryContentTestBase):
self
.
_auto_auth
(
self
.
USERNAME
,
self
.
EMAIL
,
False
)
self
.
_goto_library_block_page
()
children_contents
=
self
.
library_content_page
.
children_contents
self
.
assertEqual
(
len
(
children_contents
),
3
)
self
.
assertEqual
(
len
(
children_contents
),
4
)
self
.
assertEqual
(
children_contents
,
self
.
library_xblocks_texts
)
...
...
common/test/acceptance/tests/lms/test_lms_problems.py
View file @
7dac728e
...
...
@@ -315,7 +315,9 @@ class ProblemPartialCredit(ProblemsTest):
"""
self
.
courseware_page
.
visit
()
problem_page
=
ProblemPage
(
self
.
browser
)
problem_page
.
wait_for_element_visibility
(
problem_page
.
CSS_PROBLEM_HEADER
,
'wait for problem header'
)
self
.
assertEqual
(
problem_page
.
problem_name
,
'PARTIAL CREDIT TEST PROBLEM'
)
problem_page
.
fill_answer_numerical
(
'-1'
)
problem_page
.
click_check
()
problem_page
.
wait_for_status_icon
()
self
.
assertTrue
(
problem_page
.
simpleprob_is_partially_correct
())
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