DG DH; fix most of the cukes (7 failures left)
This commit is contained in:
parent
1804b19ccc
commit
f804db36b8
12 changed files with 33 additions and 88 deletions
|
|
@ -2,27 +2,13 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
:javascript
|
||||
$(function() {
|
||||
$(".question_mark").twipsy({trigger: 'hover', placement: 'bottom'});
|
||||
$(".service_icon").twipsy({trigger: 'hover', placement: 'bottom'});
|
||||
$(".public_icon").twipsy({trigger: 'hover', placement: 'bottom'});
|
||||
});
|
||||
|
||||
- if publisher_open
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
Publisher.open();
|
||||
});
|
||||
|
||||
-if publisher_explain
|
||||
:javascript
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(document).ready(function() {
|
||||
Publisher.triggerGettingStarted();
|
||||
});
|
||||
|
||||
#publisher.closed{:class => ((aspect == :profile)? 'mention_popup' : nil )}
|
||||
#publisher{:class => ((aspect == :profile || publisher_open) ? "mention_popup" : "closed")}
|
||||
.content_creation
|
||||
= form_for(StatusMessage.new) do |status|
|
||||
= status.error_messages
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@
|
|||
Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}');
|
||||
$("#publisher #status_message_fake_text").val(function(index, value){ return value + " " });
|
||||
$("#publisher").bind('ajax:success', function(){location.reload();});
|
||||
Publisher.bookmarklet =true;
|
||||
Publisher.open();
|
||||
Publisher.bookmarklet = true;
|
||||
});
|
||||
|
||||
#new_status_message_pane
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
<% if(photos_count > 0) { %>
|
||||
<div class="photo_attachments">
|
||||
<img src="<%= photos[0].sizes.large %>" class="stream-photo big_stream_photo" data-small-photo="<%= photos[0].sizes.small %>">
|
||||
<a href="#" class="stream-photo-link">
|
||||
<img src="<%= photos[0].sizes.large %>" class="stream-photo big_stream_photo" data-small-photo="<%= photos[0].sizes.small %>" data-full-photo="<%= photos[0].sizes.large %>" rel="lightbox">
|
||||
</a>
|
||||
<% for(photo in photos) {
|
||||
if(photo == 0){ continue; }
|
||||
if(photo == 8){ break; } %>
|
||||
<img src="<%= photos[photo].sizes.small %>" class="stream-photo thumb_small">
|
||||
<a href="#" class="stream-photo-link">
|
||||
<img src="<%= photos[photo].sizes.small %>" class="stream-photo thumb_small" data-small-photo="<%= photos[photo].sizes.small %>" data-full-photo="<%= photos[photo].sizes.large %>" rel="lightbox">
|
||||
</a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
|
|
|||
|
|
@ -132,24 +132,6 @@ Feature: posting from the main page
|
|||
And I go to the aspects page
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
||||
Scenario: change aspects in the middle of the post writing
|
||||
When I select only "NotPostingThingsHere" aspect
|
||||
And I expand the publisher
|
||||
And I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I follow "PostingTo" within "#aspect_nav"
|
||||
And I follow "NotPostingThingsHere" within "#aspect_nav"
|
||||
And I wait for the ajax to finish
|
||||
Then the publisher should be expanded
|
||||
When I append " and also cornflakes" to the publisher
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I am on the aspects page
|
||||
And I select only "PostingTo" aspect
|
||||
Then I should see "I am eating a yogurt and also cornflakes"
|
||||
When I am on the aspects page
|
||||
And I select only "NotPostingThingsHere" aspect
|
||||
Then I should not see "I am eating a yogurt and also cornflakes"
|
||||
|
||||
Scenario: change post target aspects with the aspect-dropdown before posting
|
||||
When I expand the publisher
|
||||
And I press the aspect dropdown
|
||||
|
|
@ -193,16 +175,14 @@ Feature: posting from the main page
|
|||
Then I should not see "I am eating a yogurt"
|
||||
Then I should not see "And cornflakes also"
|
||||
|
||||
# (NOTE) make this a jasmine spec
|
||||
Scenario: reject deletion one of my posts
|
||||
When I expand the publisher
|
||||
And I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
|
||||
When I click the aspects title
|
||||
And I hover over the ".stream_element"
|
||||
And I preemptively reject the alert
|
||||
And I click to delete the first post
|
||||
Then I should see "I am eating a yogurt"
|
||||
And I should see first post deletion link
|
||||
And I should not see ajax loader on deletion link place
|
||||
|
|
|
|||
|
|
@ -9,11 +9,8 @@ Feature: public repost
|
|||
And a user named "Alice Smith" with email "alice@alice.alice"
|
||||
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
|
||||
|
||||
Scenario: I don't see the reshare button on other people's private posts
|
||||
Given "bob@bob.bob" has a non public post with text "don't reshare this."
|
||||
And I sign in as "alice@alice.alice"
|
||||
Then I should not see "Reshare"
|
||||
|
||||
# should be covered in rspec, so testing that the post is added to
|
||||
# app.stream in jasmine should be enough coverage
|
||||
Scenario: When I reshare, it shows up on my profile page
|
||||
Given "bob@bob.bob" has a public post with text "reshare this!"
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
|
@ -28,6 +25,8 @@ Feature: public repost
|
|||
Then I should see a ".reshare"
|
||||
And I should see "Bob"
|
||||
|
||||
# (NOTE) this should be a jasmine spec
|
||||
# assert that it is added to app.stream's collection
|
||||
Scenario: When I reshare, it shows up in my stream
|
||||
Given "bob@bob.bob" has a public post with text "reshare this!"
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
|
@ -44,30 +43,7 @@ Feature: public repost
|
|||
And I should see "reshare this!"
|
||||
And I should see "Bob"
|
||||
|
||||
Scenario: I can delete a post that has been reshared
|
||||
Given "bob@bob.bob" has a public post with text "reshare this!"
|
||||
And I sign in as "alice@alice.alice"
|
||||
And I preemptively confirm the alert
|
||||
And I follow "Reshare"
|
||||
And I wait for the ajax to finish
|
||||
|
||||
# NOTE(why do we need this to make this work?)
|
||||
And I wait for 2 seconds
|
||||
And I go to the home page
|
||||
|
||||
Then I should see a ".reshare"
|
||||
And I should see "reshare this!"
|
||||
And I should see "Bob"
|
||||
|
||||
When I go to the destroy user session page
|
||||
And I sign in as "bob@bob.bob"
|
||||
And The user deletes their first post
|
||||
And I go to the destroy user session page
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
||||
When I go to the home page
|
||||
Then I should see "Original post deleted by author"
|
||||
|
||||
# (NOTE) this should be a jasmine spec
|
||||
Scenario: I can see the number of reshares
|
||||
Given "bob@bob.bob" has a public post with text "reshare this!"
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Then /^I send a message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/
|
|||
step %(I am on the conversations page)
|
||||
step %(I follow "New Message")
|
||||
step %(I wait for the ajax to finish)
|
||||
step %(I fill in "contact_autocomplete" with "#{person}" in the modal window)
|
||||
|
||||
step %(I press the first ".as-result-item" within ".as-results" in the modal window)
|
||||
step %(I fill in "conversation_subject" with "#{subject}" in the modal window)
|
||||
step %(I fill in "conversation_text" with "#{text}" in the modal window)
|
||||
|
|
|
|||
|
|
@ -11,11 +11,6 @@ Feature: Interacting with tags
|
|||
Then I should be on the tag page for "rockstar"
|
||||
And I should see "Samuel Beckett"
|
||||
|
||||
Scenario: Searching for a tag keeps the search term in the search field
|
||||
When I search for "#rockstar"
|
||||
Then I should be on the tag page for "rockstar"
|
||||
And the "q" field within "#global_search" should contain "#rockstar"
|
||||
|
||||
@wip
|
||||
Scenario: adding a contact from a tag page
|
||||
When I search for "#rockstar"
|
||||
|
|
|
|||
|
|
@ -33,5 +33,5 @@ app.views.Base = Backbone.View.extend({
|
|||
})
|
||||
|
||||
return this
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -63,14 +63,6 @@ app.views.Post = app.views.StreamObject.extend({
|
|||
return this;
|
||||
},
|
||||
|
||||
initializeTooltips: function(){
|
||||
_.each(this.tooltips, function(selector){
|
||||
this.$(selector).twipsy();
|
||||
}, this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
blockUser: function(evt){
|
||||
if(evt) { evt.preventDefault(); }
|
||||
|
||||
|
|
@ -99,6 +91,14 @@ app.views.Post = app.views.StreamObject.extend({
|
|||
this.$(".new_comment_form_wrapper").removeClass("hidden");
|
||||
this.$(".comment_box").focus();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
initializeTooltips: function(){
|
||||
_.each(this.tooltips, function(selector, options){
|
||||
this.$(selector).twipsy(options);
|
||||
}, this);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ app.views.StreamObject = app.views.Base.extend({
|
|||
|
||||
destroyModel: function(evt){
|
||||
if(evt){ evt.preventDefault(); }
|
||||
if(!confirm("Are you sure?")) { return }
|
||||
|
||||
this.model.destroy();
|
||||
|
||||
$(this.el).slideUp(400, function(){
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ app.views.Stream = Backbone.View.extend({
|
|||
var throttledScroll = _.throttle($.proxy(this.infScroll, this), 200);
|
||||
$(window).scroll(throttledScroll);
|
||||
|
||||
// lightbox delegation
|
||||
this.lightbox = Diaspora.BaseWidget.instantiate("Lightbox");
|
||||
$(this.el).delegate("a.stream-photo-link", "click", this.lightbox.lightboxImageClicked);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@ jQuery.fn.center = (function() {
|
|||
var Lightbox = function() {
|
||||
var self = this;
|
||||
|
||||
this.subscribe("widget/ready", function(evt, post) {
|
||||
this.subscribe("widget/ready", function(evt) {
|
||||
$.extend(self, {
|
||||
post: post,
|
||||
lightbox: $("#lightbox"),
|
||||
imageset: $("#lightbox-imageset"),
|
||||
backdrop: $("#lightbox-backdrop"),
|
||||
|
|
@ -32,7 +31,7 @@ jQuery.fn.center = (function() {
|
|||
window: $(window)
|
||||
});
|
||||
|
||||
self.post.delegate("a.stream-photo-link", "click", self.lightboxImageClicked);
|
||||
//self.post.delegate("a.stream-photo-link", "click", self.lightboxImageClicked);
|
||||
self.imageset.delegate("img", "click", self.imagesetImageClicked);
|
||||
|
||||
self.window.resize(function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue