fixed embedder the hacky way (?) and added cucumber feature for youtube feature so you'll notice if you breakt it again the next time

This commit is contained in:
MrZYX 2011-04-21 15:42:28 +02:00
parent b297648072
commit 45d621a9e6
2 changed files with 22 additions and 2 deletions

19
features/embedder.feature Normal file
View file

@ -0,0 +1,19 @@
@javascript
Feature: embedding
Get sure that embedding stuff actually works
Background:
Given a user with username "bob"
When I sign in as "bob@bob.bob"
And I have no open aspects saved
And I am on the home page
Scenario: Youtube is fully embedded
Given I expand the publisher
When I fill in "status_message_fake_text" with "Look at this awesome video: https://www.youtube.com/watch?v=53tq9g35kwk"
And I press "Share"
And I follow "All Aspects"
Then I should see "Look at this awesome video: Youtube: Leekspin" within ".stream_element"
When I follow "Youtube: Leekspin"
And I wait for the ajax to finish
Then I should see "Watch this video on YouTube" within ".video-container"

View file

@ -31,7 +31,8 @@
this.initialized = true; this.initialized = true;
for(var widgetId in this.collection) { for(var widgetId in this.collection) {
if(this.collection[widgetId].hasOwnProperty("start")) { if(this.collection[widgetId].hasOwnProperty("start")
|| this.collection[widgetId].__proto__.hasOwnProperty("start")) {
this.collection[widgetId].start(); this.collection[widgetId].start();
} }
} }
@ -51,5 +52,5 @@
})(); })();
$(document).ready(Diaspora.widgets.init); $(document).ready(function() { Diaspora.widgets.init(); });