-
Notifications
You must be signed in to change notification settings - Fork 34
Add integration tests for collection estimation page #1115
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
Add integration tests for collection estimation page #1115
Conversation
Generated by 🚫 Danger |
I will check. the existing test case failed. |
Don't forget to also remove related TODO comment (see the original issue). |
6b3e5aa
to
ca3ca1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments.
ca3ca1e
to
357233f
Compare
I am done with the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except a couple things that we missed. See my comments.
Also, could you, please, amend the first line of a commit message to be:
test(collection/estimation/logic.robot): add tests for collection estimation page.
5356a51
to
6cf9d6a
Compare
Submit Form id=add-series-form | ||
Go To ${SITE_URL}/collection/paid/estimation | ||
Table Cell Should Contain collection-estimation 2 2 100.00 ${expectedCurrency} | ||
Table Cell Should Contain collection-estimation 3 2 100.00 ${expectedCurrency} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we can't use Table Header Should Contain
here? I mean, for "Total" it makes sense to use Table Header Should Contain
while for the rows we can use Table Cell Should Contain
or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I thought to remove the dependency on the Table Header. As we wanted to use Table Footer.
I can put it back. Yes, it's more communicative and expressive in terms of Table Header.
Select From List By Value id=paid-currency ${expectedCurrency} | ||
Submit Form id=add-series-form | ||
Go To ${SITE_URL}/collection/paid/estimation | ||
Table Cell Should Contain collection-estimation 2 2 100.00 ${expectedCurrency} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below -- first argument is locator and we should use id=collection-estimation
to make it more obvious for a reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to read what 2 and 2 means here. AFAIR we can use named arguments, like this:
Table Cell Should Contain id=collection-estimation row=2 col=2 text=100.00 ${expectedCurrency}
Could you check whether it works, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err.. forget my comments above. We need a better approach instead of using Table Cell Should Contain
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a better approach instead of using Table Cell Should Contain
While it's in a scope of this task, it's out of your budget, so I'm going to think about it later :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To summarise what needs to be done:
- fix "Table Cell Should Contain": add
id=
to locators, explicitly specify names of arguments (col/row/text)- reduce an indentation between keywords and their parameters in the test cases with "Table Cell Should Contain"
That's it.
Thank you for your patience, Mukesh!
To summarise what needs to be done:
- fix "Table Cell Should Contain": add
id=
to locators, explicitly specify names of arguments (col/row/text)- reduce an indentation between keywords and their parameters in the test cases with "Table Cell Should Contain"
That's it.
Thank you for your patience, Mukesh!
Thanks for your patience as well. :). Let's get it right as per your expecations !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below -- first argument is locator and we should use id=collection-estimation to make it more obvious for a reader.
Next time, when I'll say something wrong, you may quote documentation to me:
Table related keywords, such as Table Should Contain, work differently. By default, when a table locator value is provided, it will search for a table with the specified id attribute.
:-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To summarise what needs to be done:
- fix "Table Cell Should Contain": add
id=
to locators, explicitly specify names of arguments (col/row/text) - reduce an indentation between keywords and their parameters in the test cases with "Table Cell Should Contain"
That's it.
Thank you for your patience, Mukesh!
6cf9d6a
to
566a815
Compare
In the screenshot I see that you used comma (instead of 2 spaces) to separate arguments. But you've found it already :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you! 👍
Whoops, couldn't merge because one item is still here:
Let me know when you fix it, so I'll merge. |
566a815
to
2690f20
Compare
Excellent! Thank you! |
Submit Form id=add-series-form | ||
Go To ${SITE_URL}/collection/paid/estimation | ||
Table Cell Should Contain collection-estimation row=2 column=2 text=100.00 ${expectedCurrency} | ||
# TODO: use "Table Footer Should Contain" instead, when it will be fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, I forgot that we shouldn't use TODO as 0pdd is also looking on it:
ERROR: src/test/robotframework/collection/estimation/logic.robot; puzzle at line #23; TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/yegor256/pdd#how-to-format
I'll fix it later.
Fix #893