Page MenuHomePhabricator

Create tests for pagination
Closed, ResolvedPublic

Description

This has broken twice now. Let's get it some test coverage.

Event Timeline

Jdlrobson assigned this task to Jhernandez.
Jdlrobson raised the priority of this task from to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Forrestbot, gerritbot, bmansurov and 4 others.
Jdlrobson moved this task from Needs Analysis to Doing on the Reading-Web-Sprint-50-The-X-Files board.

Change 220328 had a related patch set uploaded (by Jdlrobson):
WIP: Introduce tests for recent collections

https://gerrit.wikimedia.org/r/220328

^^ @dduvall could you give me a hand with this?
I'm not sure how to scroll to the footer element nor how to only run the api request the first time the browser tests run.

dduvall added a subscriber: zeljkofilipin.EditedJun 23 2015, 10:44 PM

I just left you some feedback on the PS. Let me know if any of it doesn't make sense or if you want to pair on it.

As far as scrolling goes, I'm not actually sure what the best way would be. (Perhaps @zeljkofilipin knows.) I would maybe try:

10.times { browser.send_keys(:page_down) } # most end-to-end way

# or

browser.execute_script("window.scrollTo(0, window.outerHeight)") # not very BDD but it gets the job done

Or sorry, maybe that should be document.scrollHeight, not window.outerHeight.

See also comment https://phabricator.wikimedia.org/T103496#1399670 since it is broken for anonymous users right now so when we test it let's test it for both anon and logged in please.

Thanks for adding these tests!!

phuedx lowered the priority of this task from High to Normal.Jun 25 2015, 1:39 PM
phuedx set Security to None.

Change 220328 merged by jenkins-bot:
Introduce tests for pagination

https://gerrit.wikimedia.org/r/220328

phuedx closed this task as Resolved.Jun 30 2015, 7:16 PM
phuedx moved this task from Code Review to Done on the Reading-Web-Sprint-50-The-X-Files board.
phuedx added a subscriber: phuedx.

Verified locally.