Testing with different keyword search values, I noticed that searches can return no values for a subtitle and author and my tests fail in this case. Should we include handling of that type of outcomes in our code?
Example: search for "selenium" and "lisbon".
The test case we got is for Books only, so if search results yield other media like CDs, Video etc the check for Book related page elements would fail as the element attributes could be different. I was wondering the same earlier but then saw that test case is for Books specifically ...
If we cannot specify that we are looking for Books only in our search, we might want to handle scenarios with returns other than Books in out code. I think it would be a lot cleaner, unless Alex doesn't care about us doing this.
Actually, even a basic search returns values for media type for each item. If we look for Books we might want to check, if this parameter true.
It would be good and easy code to add if need so. Gotta wait on Alex's "go for it" or "don't bother for now"
Moreover, not all searches for a Book return subtitles and authors. The very first item with "selenium" as a keyword displays the following:
Selenium
Book - 1987
615.925 S4641i
I agree with Oleg - lets' see what Alex has to say about that. It might be an overkill for a type of an assignment he wants us to do this time around. There are could be quite a few different conditions in the test cases that we might don't need to cover in our code this time.
just write the test for a search keyword that returns values for all fields.
no need of being too sophisticated for now.
if you want to implement cases where the title, subtitle and author are not there, go ahead.
but it may be challenging doing it.
We hear you, Alex. It makes a lot of sense at this stage of our training.