Skip to content

Add integration tests for finding series by catalog number #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
php-coder opened this issue Feb 1, 2016 · 9 comments
Closed

Add integration tests for finding series by catalog number #340

php-coder opened this issue Feb 1, 2016 · 9 comments
Assignees
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Feb 1, 2016

Tech debt for: cc61e01 (#315) and 0172e38 (#341)


Create 4 tests (one for each catalog):

  • open a main page
  • fill Search by catalog form:
    • provide an existing catalog number (let's say 99)
    • chose a catalog name (Michel/Scott/Yvert or Gibbons)
    • click on the Search button
  • ensure that the resulted page has a series that points to /series/1

Requirements:

  • the tests should be located in the src/test/robotframework/series/search/logic.robot file

Hint:

  • we can use Link Should Point To keyword from selenium.utils.robot file
@mukeshk
Copy link
Contributor

mukeshk commented Jul 9, 2019

chose a catalogue name (Michel/Scott/Yvert or Gibbons)

  • I understand this catalogue are part of the test data. We need to select catalogName from this 4 fixed items.

Am I correct

@php-coder
Copy link
Owner Author

php-coder commented Jul 9, 2019

Yes, here we test only these 4 catalogs.

By the way, initially, I wrote that "Create 4 tests (one for each catalog)" but it seems that we could use Templates to reduce duplication.

Example:

Catalog numbers should accept valid values
[Tags] unstable
[Template] Valid Catalog Numbers Should Be Accepted
7
7,8
71, 81, 91
1000

and a template:

Valid Catalog Numbers Should Be Accepted
[Arguments] ${catalogNumbers}
Click Element id=add-catalog-numbers-link
Input Text id=michelNumbers ${catalogNumbers}
Input Text id=scottNumbers ${catalogNumbers}
Input Text id=yvertNumbers ${catalogNumbers}
Input Text id=gibbonsNumbers ${catalogNumbers}
Input Text id=solovyovNumbers ${catalogNumbers}
Input Text id=zagorskiNumbers ${catalogNumbers}
Submit Form id=add-series-form
Page Should Not Contain Element id=michelNumbers.errors
Page Should Not Contain Element id=scottNumbers.errors
Page Should Not Contain Element id=yvertNumbers.errors
Page Should Not Contain Element id=gibbonsNumbers.errors
Page Should Not Contain Element id=solovyovNumbers.errors
Page Should Not Contain Element id=zagorskiNumbers.errors

Here is a documentation about that: https://github.com/robotframework/QuickStartGuide/blob/836eaea991140e114fba2d11c6e31f71d787070a/QuickStart.rst#data-driven-tests

@php-coder
Copy link
Owner Author

php-coder commented Jul 9, 2019

@mukeshk just to ensure that we are on the same page: each issue should be addressed is a separate pull request.

@mukeshk
Copy link
Contributor

mukeshk commented Jul 17, 2019

in search_results.html
< a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}" > ....

Need to add an id to the anchor tag.
I think the id will be dynamic in nature, like id="series-${series..id}"

Step : Link Should Point To id="series-1" "series/1"

@mukeshk
Copy link
Contributor

mukeshk commented Jul 17, 2019

Search series by existing catalog name and number
[Template] Verify Series Search By Catalog By Name And Number
michel 99
scott 99
yvert 99
gibbons 99

Before Test
Go To ${SITE_URL}/ ${BROWSER}

Verify Series Search By Catalog By Name And Number
[Arguments] ${catalogName} ${catalogNumber}
Input Text id=catalogNumber ${catalogNumber}
Select From List By Value id=catalogName ${catalogName}
Submit Form id=search-series-form
Link Should Point To id=series-1 ${SITE_URL}/series/1
Go To ${SITE_URL}

@mukeshk
Copy link
Contributor

mukeshk commented Jul 17, 2019

Is this good ?

@php-coder
Copy link
Owner Author

@mukeshk It's hard to read it here -- the code isn't highlighted and there is no indentation. Why not just create a PR where I can see and comment? :)

@php-coder
Copy link
Owner Author

P.S. but it seems like you're going to the right direction :)

@php-coder
Copy link
Owner Author

Need to add an id to the anchor tag.

I'm not sure about this. Let's discuss in PR ;)

mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 17, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 17, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 18, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 18, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 18, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 18, 2019
mukeshk added a commit to mukeshk/mystamps that referenced this issue Jul 19, 2019
annazarubina pushed a commit to annazarubina/mystamps that referenced this issue Jul 20, 2019
@php-coder php-coder added the estimation/30m Estimated time: 30 minutes label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants