Skip to content
Extraits de code Groupes Projets
Valider 11a59b93 rédigé par Gonzalo Rodriguez's avatar Gonzalo Rodriguez
Parcourir les fichiers

Add cukes scenarios: playing with the aspects-dropdown and posting.

parent 4331e746
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -3,7 +3,7 @@ Feature: posting from the main page ...@@ -3,7 +3,7 @@ Feature: posting from the main page
In order to enlighten humanity for the good of society In order to enlighten humanity for the good of society
As a rock star As a rock star
I want to tell the world I am eating a yogurt I want to tell the world I am eating a yogurt
Background: Background:
Given a user with username "bob" Given a user with username "bob"
And a user with username "alice" And a user with username "alice"
...@@ -149,3 +149,46 @@ Feature: posting from the main page ...@@ -149,3 +149,46 @@ Feature: posting from the main page
When I am on the aspects page When I am on the aspects page
And I select only "NotPostingThingsHere" aspect And I select only "NotPostingThingsHere" aspect
Then I should not see "I am eating a yogurt and also cornflakes" 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
And I toggle the aspect "PostingTo"
And I append "I am eating a yogurt" 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"
When I am on the aspects page
And I select only "NotPostingThingsHere" aspect
Then I should not see "I am eating a yogurt"
Scenario: post 2 in a row using the aspects-dropdown
When I expand the publisher
And I press the aspect dropdown
And I toggle the aspect "PostingTo"
And I append "I am eating a yogurt" to the publisher
And I press "Share"
And I wait for the ajax to finish
And I expand the publisher
And I press the aspect dropdown
And I toggle the aspect "Besties"
And I append "And cornflakes also" 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"
Then I should see "And cornflakes also"
When I am on the aspects page
And I select only "Besties" aspect
Then I should not see "I am eating a yogurt"
Then I should see "And cornflakes also"
When I am on the aspects page
And I select only "NotPostingThingsHere" aspect
Then I should not see "I am eating a yogurt"
Then I should not see "And cornflakes also"
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
And /^I toggle the aspect "([^"]*)"$/ do |aspect_name| And /^I toggle the aspect "([^"]*)"$/ do |aspect_name|
aspect = @me.aspects.where(:name => aspect_name).first aspect = @me.aspects.where(:name => aspect_name).first
find("li[data-aspect_id='#{aspect.id}']").click find(".dropdown li[data-aspect_id='#{aspect.id}']").click
end end
Then /^the publisher should be collapsed$/ do Then /^the publisher should be collapsed$/ do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter