Merge pull request #302 from edx/peter-fogg/fix-upload-confirmation
Show a confirmation on asset delete. Fixes STUD-375.
This commit is contained in:
@@ -21,6 +21,7 @@ Feature: Upload Files
|
||||
When I upload the file "test"
|
||||
And I delete the file "test"
|
||||
Then I should not see the file "test" was uploaded
|
||||
And I see a confirmation that the file was deleted
|
||||
|
||||
Scenario: Users can download files
|
||||
Given I have opened a new course in studio
|
||||
|
||||
@@ -90,6 +90,12 @@ def modify_upload(_step, file_name):
|
||||
cur_file.write(new_text)
|
||||
|
||||
|
||||
@step('I see a confirmation that the file was deleted')
|
||||
def i_see_a_delete_confirmation(_step):
|
||||
alert_css = '#notification-confirmation'
|
||||
assert world.is_css_present(alert_css)
|
||||
|
||||
|
||||
def get_index(file_name):
|
||||
names_css = 'td.name-col > a.filename'
|
||||
all_names = world.css_find(names_css)
|
||||
|
||||
@@ -23,7 +23,12 @@ function removeAsset(e){
|
||||
{ 'location': row.data('id') },
|
||||
function() {
|
||||
// show the post-commit confirmation
|
||||
$(".wrapper-alert-confirmation").addClass("is-shown").attr('aria-hidden','false');
|
||||
var deleted = new CMS.Views.Notification.Confirmation({
|
||||
title: gettext("Your file has been deleted."),
|
||||
closeIcon: false,
|
||||
maxShown: 2000
|
||||
});
|
||||
deleted.show();
|
||||
row.remove();
|
||||
analytics.track('Deleted Asset', {
|
||||
'course': course_location_analytics,
|
||||
|
||||
Reference in New Issue
Block a user