diff --git a/app/assets/javascripts/app/models/user.js b/app/assets/javascripts/app/models/user.js index dd2ddd434..5eaa87dab 100644 --- a/app/assets/javascripts/app/models/user.js +++ b/app/assets/javascripts/app/models/user.js @@ -7,5 +7,9 @@ app.models.User = Backbone.Model.extend({ authenticated : function() { return !!this.id; + }, + + expProfileUrl : function(){ + return "/people/" + app.currentUser.get("guid") + "?ex=true" } }); diff --git a/app/assets/javascripts/app/pages/framer.js b/app/assets/javascripts/app/pages/framer.js index c36551e42..66ce01fa2 100644 --- a/app/assets/javascripts/app/pages/framer.js +++ b/app/assets/javascripts/app/pages/framer.js @@ -23,7 +23,7 @@ app.pages.Framer = app.views.Base.extend({ }, navigateToShow : function(){ - app.router.navigate(this.model.url(), {trigger: true, replace: true}) + app.router.navigate(app.currentUser.expProfileUrl(), {trigger: true, replace: true}) } }) diff --git a/features/step_definitions/trumpeter_steps.rb b/features/step_definitions/trumpeter_steps.rb index 37e07b7b4..5e9862d45 100644 --- a/features/step_definitions/trumpeter_steps.rb +++ b/features/step_definitions/trumpeter_steps.rb @@ -148,3 +148,11 @@ end Then /^the post should mention "([^"]*)"$/ do |user_name| within('#post-content') { find("a:contains('#{user_name}')").should be_present } end + +When /^I click the "([^"]*)" post$/ do |post_text| + find(".content:contains('#{post_text}')").click +end + +Then /^"([^"]*)" should be the first canvas frame$/ do |post_text| + find(".canvas-frame:first").should have_content(post_text) +end \ No newline at end of file diff --git a/features/trumpeter.feature b/features/trumpeter.feature index 3eb8645ab..634171b9c 100644 --- a/features/trumpeter.feature +++ b/features/trumpeter.feature @@ -51,16 +51,16 @@ Feature: Creating a new post Then the post's default mood should be "Wallpaper" Then it should be a wallpaper frame with the background "button.gif" Then I should see "This is hella customized" in the framer preview - #changing the mood changes the presentation When I select the mood "Day" Then the post's mood should be "Day" And "button.gif" should be in the post's picture viewer And I should see "This is hella customized" in the framer preview When I finalize my frame - And I go to "/stream" - Then "This is hella customized" should be post 1 - And I click the show page link for "This is hella customized" + #on stream + Then "This is hella customized" should be the first canvas frame + When I click the "This is hella customized" post + #on show page And the post's mood should still be "Day" Scenario: The Wallpaper mood