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
ae8e525b
Unverified
Commit
ae8e525b
authored
6 years ago
by
Feanil Patel
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #18080 from edx/feanil/remove_flaky_handout_tests
Remove these tests because they are flaky.
parents
965c4624
2c7dd7b9
No related branches found
Branches containing commit
Tags
release-2018-05-22-13.11
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/djangoapps/contentstore/features/course-updates.feature
+0
-37
0 additions, 37 deletions
cms/djangoapps/contentstore/features/course-updates.feature
cms/djangoapps/contentstore/features/course-updates.py
+0
-89
0 additions, 89 deletions
cms/djangoapps/contentstore/features/course-updates.py
with
0 additions
and
126 deletions
cms/djangoapps/contentstore/features/course-updates.feature
deleted
100644 → 0
+
0
−
37
View file @
965c4624
@shard_2
Feature
:
CMS.Course updates
As a course author, I want to be able to provide updates to my students
# Internet explorer can't select all so the update appears weirdly
@skip_internetexplorer
Scenario
:
Users can change handouts
Given
I have opened a new course in Studio
And
I go to the course updates page
When
I modify the handout to
"<ol>Test</ol>"
Then
I see the handout
"Test"
And
I see a
"saving"
notification
Scenario
:
Static links are rewritten when previewing handouts
Given
I have opened a new course in Studio
And
I go to the course updates page
When
I modify the handout to
"<ol><img src='/static/my_img.jpg'/></ol>"
# Can only do partial text matches because of the quotes with in quotes (and regexp step matching).
Then
I see the handout image link
"my_img.jpg"
And
I change the handout from
"/static/my_img.jpg"
to
"<img src='/static/modified.jpg'/>"
Then
I see the handout image link
"modified.jpg"
And
when I reload the page
Then
I see the handout image link
"modified.jpg"
Scenario
:
Users cannot save handouts with bad html until edit or update it properly
Given
I have opened a new course in Studio
And
I go to the course updates page
When
I modify the handout to
"<p><a href=>[LINK TEXT]</a></p>"
Then
I see the handout error text
And
I see handout save button disabled
When I edit the handout to "<p><a href='https
:
//www.google.com.pk/'>home</a></p>"
Then
I see handout save button re-enabled
When
I save handout edit
# Can only do partial text matches because of the quotes with in quotes (and regexp step matching).
Then I see the handout "https
:
//www.google.com.pk/"
And
when I reload the page
Then I see the handout "https
:
//www.google.com.pk/"
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/course-updates.py
deleted
100644 → 0
+
0
−
89
View file @
965c4624
# pylint: disable=missing-docstring
from
lettuce
import
step
,
world
from
nose.tools
import
assert_in
from
cms.djangoapps.contentstore.features.common
import
get_codemirror_value
,
type_in_codemirror
@step
(
u
'
I go to the course updates page
'
)
def
go_to_updates
(
_step
):
menu_css
=
'
li.nav-course-courseware
'
updates_css
=
'
li.nav-course-courseware-updates a
'
world
.
css_click
(
menu_css
)
world
.
css_click
(
updates_css
)
world
.
wait_for_visible
(
'
#course-handouts-view
'
)
@step
(
u
'
I change the handout from
"
([^
"
]*)
"
to
"
([^
"
]*)
"
$
'
)
def
change_existing_handout
(
_step
,
before
,
after
):
verify_text_in_editor_and_update
(
'
div.course-handouts .edit-button
'
,
before
,
after
)
@step
(
u
'
I modify the handout to
"
([^
"
]*)
"
$
'
)
def
edit_handouts
(
_step
,
text
):
edit_css
=
'
div.course-handouts > .edit-button
'
world
.
css_click
(
edit_css
)
change_text
(
text
)
@step
(
u
'
I see the handout
"
([^
"
]*)
"
$
'
)
def
check_handout
(
_step
,
handout
):
handout_css
=
'
div.handouts-content
'
assert_in
(
handout
,
world
.
css_html
(
handout_css
))
@step
(
u
'
I see the handout image link
"
([^
"
]*)
"
$
'
)
def
check_handout_image_link
(
_step
,
image_file
):
handout_css
=
'
div.handouts-content
'
handout_html
=
world
.
css_html
(
handout_css
)
asset_key
=
world
.
scenario_dict
[
'
COURSE
'
].
id
.
make_asset_key
(
asset_type
=
'
asset
'
,
path
=
image_file
)
assert_in
(
unicode
(
asset_key
),
handout_html
)
@step
(
u
'
I see the handout error text
'
)
def
check_handout_error
(
_step
):
handout_error_css
=
'
div#handout_error
'
assert
world
.
css_has_class
(
handout_error_css
,
'
is-shown
'
)
@step
(
u
'
I see handout save button disabled
'
)
def
check_handout_error
(
_step
):
handout_save_button
=
'
form.edit-handouts-form .save-button
'
assert
world
.
css_has_class
(
handout_save_button
,
'
is-disabled
'
)
@step
(
u
'
I edit the handout to
"
([^
"
]*)
"
$
'
)
def
edit_handouts
(
_step
,
text
):
type_in_codemirror
(
0
,
text
)
@step
(
u
'
I see handout save button re-enabled
'
)
def
check_handout_error
(
_step
):
handout_save_button
=
'
form.edit-handouts-form .save-button
'
assert
not
world
.
css_has_class
(
handout_save_button
,
'
is-disabled
'
)
@step
(
u
'
I save handout edit
'
)
def
check_handout_error
(
_step
):
save_css
=
'
.save-button
'
world
.
css_click
(
save_css
)
def
change_text
(
text
):
type_in_codemirror
(
0
,
text
)
save_css
=
'
.save-button
'
world
.
css_click
(
save_css
)
def
verify_text_in_editor_and_update
(
button_css
,
before
,
after
):
world
.
css_click
(
button_css
)
text
=
get_codemirror_value
()
assert_in
(
before
,
text
)
change_text
(
after
)
@step
(
'
I see a
"
(saving|deleting)
"
notification
'
)
def
i_see_a_mini_notification
(
_step
,
_type
):
saving_css
=
'
.wrapper-notification-mini
'
assert
world
.
is_css_present
(
saving_css
)
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