Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
187d4880
Unverified
Commit
187d4880
authored
6 years ago
by
Agha Awais
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18753 from edx/awais/fix_grading_flaky_test
fixed flaky test from grading
parents
bf5aac7a
556a88e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/test/acceptance/pages/studio/settings_graders.py
+6
-1
6 additions, 1 deletion
common/test/acceptance/pages/studio/settings_graders.py
common/test/acceptance/tests/studio/test_studio_grading.py
+18
-0
18 additions, 0 deletions
common/test/acceptance/tests/studio/test_studio_grading.py
with
24 additions
and
1 deletion
common/test/acceptance/pages/studio/settings_graders.py
+
6
−
1
View file @
187d4880
...
...
@@ -73,9 +73,14 @@ class GradingPage(SettingsPage):
Drag and drop grade range.
"""
self
.
wait_for_element_visibility
(
self
.
grade_ranges
,
"
Grades ranges are visible
"
)
# We have used jquery here to adjust the width of slider to
# desired range because drag and drop has behaved very inconsistently.
# This does not updates the text of range on the slider.
# So as a work around, we have used drag_and_drop without any offset
self
.
browser
.
execute_script
(
'
$(
"
.ui-resizable
"
).css(
"
width
"
,
"
10
"
)
'
)
action
=
ActionChains
(
self
.
browser
)
moveable_css
=
self
.
q
(
css
=
'
.ui-resizable-e
'
).
results
[
0
]
action
.
drag_and_drop_by_offset
(
moveable_css
,
10
0
,
0
).
perform
()
action
.
drag_and_drop_by_offset
(
moveable_css
,
0
,
0
).
perform
()
@property
def
grade_letters
(
self
):
...
...
This diff is collapsed.
Click to expand it.
common/test/acceptance/tests/studio/test_studio_grading.py
+
18
−
0
View file @
187d4880
...
...
@@ -112,3 +112,21 @@ class GradingPageTest(StudioCourseTest):
self
.
grading_page
.
remove_grades
(
1
)
total_number_of_grades
=
self
.
grading_page
.
total_number_of_grades
self
.
assertEqual
(
total_number_of_grades
,
2
)
def
test_staff_can_move_grading_ranges
(
self
):
"""
Scenario: Users can move grading ranges
Given I have opened a new course in Studio
And I am viewing the grading settings
When I move a grading section
Then I see that the grade range has changed
"""
grade_ranges
=
self
.
grading_page
.
grades_range
self
.
assertIn
(
'
0-50
'
,
grade_ranges
)
self
.
grading_page
.
drag_and_drop_grade
()
grade_ranges
=
self
.
grading_page
.
grades_range
self
.
assertIn
(
'
0-3
'
,
grade_ranges
,
'
expected range: 0-3, not found in grade ranges:{}
'
.
format
(
grade_ranges
)
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment