refactor infinite scroll features to take less time
This commit is contained in:
parent
a8a9399060
commit
3c8b26b051
3 changed files with 5 additions and 46 deletions
|
|
@ -11,25 +11,8 @@ Feature: infinite scroll
|
|||
And I follow "Your Aspects"
|
||||
And I wait for the ajax to finish
|
||||
|
||||
Scenario: on the main stream by activity
|
||||
When I follow "commented on"
|
||||
And I wait for the ajax to finish
|
||||
Then I should see 15 posts
|
||||
And I should see "alice - 26 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see 30 posts
|
||||
And I should see "alice - 11 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see 40 posts
|
||||
And I should see "alice - 1 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see "No more"
|
||||
|
||||
Scenario: on the main stream post created time
|
||||
And I go to the home page
|
||||
Scenario: on the main stream
|
||||
When I go to the home page
|
||||
And I wait for the ajax to finish
|
||||
Then I should see 15 posts
|
||||
And I should see "alice - 15 - #seeded"
|
||||
|
|
@ -38,13 +21,6 @@ Feature: infinite scroll
|
|||
Then I should see 30 posts
|
||||
And I should see "alice - 30 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see 40 posts
|
||||
And I should see "alice - 40 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see "No more"
|
||||
|
||||
Scenario: On a tag page
|
||||
When I go to the tag page for "seeded"
|
||||
Then I should see 15 posts
|
||||
|
|
@ -54,13 +30,6 @@ Feature: infinite scroll
|
|||
Then I should see 30 posts
|
||||
And I should see "alice - 30 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see 40 posts
|
||||
And I should see "alice - 40 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see "No more"
|
||||
|
||||
Scenario: On a profile page
|
||||
And I am on "alice@alice.alice"'s page
|
||||
Then I should see 15 posts
|
||||
|
|
@ -69,10 +38,3 @@ Feature: infinite scroll
|
|||
When I scroll down
|
||||
Then I should see 30 posts
|
||||
And I should see "alice - 30 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see 40 posts
|
||||
And I should see "alice - 40 - #seeded"
|
||||
|
||||
When I scroll down
|
||||
Then I should see "No more"
|
||||
|
|
|
|||
|
|
@ -61,15 +61,12 @@ Feature: User manages contacts
|
|||
Scenario: infinite scroll on contacts index
|
||||
Given I am signed in
|
||||
And I resize my window to 800x600
|
||||
And I have 60 contacts
|
||||
And I have 30 contacts
|
||||
And I am on the contacts page
|
||||
Then I should see 25 contacts
|
||||
|
||||
When I scroll down
|
||||
Then I should see 50 contacts
|
||||
|
||||
When I scroll down
|
||||
Then I should see 60 contacts
|
||||
Then I should see 30 contacts
|
||||
|
||||
Scenario: clicking on the contacts link in the header with zero contacts directs a user to the featured users page
|
||||
Given I am signed in
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ Given /^many posts from alice for bob$/ do
|
|||
connect_users_with_aspects(alice, bob)
|
||||
time_fulcrum = Time.now - 40000
|
||||
time_interval = 1000
|
||||
(1..40).each do |n|
|
||||
(1..30).each do |n|
|
||||
post = alice.post :status_message, :text => "#{alice.username} - #{n} - #seeded", :to => alice.aspects.where(:name => "generic").first.id
|
||||
post.created_at = time_fulcrum - time_interval
|
||||
post.updated_at = time_fulcrum + time_interval
|
||||
|
|
|
|||
Loading…
Reference in a new issue