parent
7e0cbff4fa
commit
3016280ef1
4 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
* Ask for confirmation when leaving a submittable comment field [#7530](https://github.com/diaspora/diaspora/pull/7530)
|
||||||
|
|
||||||
# 0.7.0.0
|
# 0.7.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ app.views.CommentStream = app.views.Base.extend({
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
onFocus: this.openForm.bind(this)
|
onFocus: this.openForm.bind(this)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$("form").areYouSure();
|
||||||
},
|
},
|
||||||
|
|
||||||
presenter: function(){
|
presenter: function(){
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ Feature: commenting
|
||||||
When I focus the comment field
|
When I focus the comment field
|
||||||
And I fill in the following:
|
And I fill in the following:
|
||||||
| text | is that a poodle? |
|
| text | is that a poodle? |
|
||||||
|
And I reject the alert after I follow "My activity"
|
||||||
And I press "Comment"
|
And I press "Comment"
|
||||||
Then I should see "is that a poodle?" within ".comment"
|
Then I should see "is that a poodle?" within ".comment"
|
||||||
And I should see "less than a minute ago" within ".comment time"
|
And I should see "less than a minute ago" within ".comment time"
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,12 @@ describe("app.views.CommentStream", function(){
|
||||||
expect(renderedPreview).toBe("<div class='preview-content'>" + renderedText + "</div>");
|
expect(renderedPreview).toBe("<div class='preview-content'>" + renderedText + "</div>");
|
||||||
expect(renderedPreview).toContain("Alice Awesome");
|
expect(renderedPreview).toContain("Alice Awesome");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("calls jQuery.AreYouSure()", function() {
|
||||||
|
spyOn($.fn, "areYouSure");
|
||||||
|
this.view.postRenderTemplate();
|
||||||
|
expect($.fn.areYouSure).toHaveBeenCalled();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("createComment", function() {
|
describe("createComment", function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue