mozilla/marketplace-tests — pull request #106 by sashakruglov (2012-08-07 18:10:30+00:00)
Title: Pivotal 31913855

Pull request for https://www.pivotaltracker.com/story/show/31913855

Description of task is no good, so I've implemented tests on my own vision of it.
First I refactored a little bit categories section on home page and moved it into Regions.
I made it because this section is in use also on category page, so I thought it would be better to keep it separated from pages. Hope this decision was right.

Added category page. There is one thing. Popular section on that page quite similar to this section on home page, so maybe it's another candidate for regions. Also code itself here can be improved for at least click on see all link to return proper page object.

And added three tests. One verifies categories section on home pages by asserting length of categories section title and asserting that categories section contains 15 items (value is hardcoded). If it's required I can change or add some checks here (but I was not sure that checking against names or order of items will make test sustainable). Second one slides category forward and backward. And third one opens some hardcoded category and asserts opened category page. I need to say that because of slider it's not easy to select an arbitrary category (need to slide for some categories, even those that are displayed). I wanted to add check for locations of items using webelement.location property, but it doesn't work )