In there, I removed the initial check because it has nothing to do with the name of the test. It should be tested elsewhere that when you open the app, no contacts are shown.
Also, I moved the selection to the page helper object. Every time you have a select single in the test body, there's something wrong. If we move them to the page object it will be easier to read and easier to maintain.
After the cleanup, it seems to me that this is a good candidate to be turned into a QML test. Here we are only checking that a button is not shown if certain conditions are not met. That's purely UI, it has nothing to do with a user story so autopilot seems like a tool too big and slow for it. Do you agree?
Finally, the name of the test still sounds wrong: test_import_item_disabled_without_sim_card
We are not checking that the item is disabled. We are checking that it is not visible.
Every failed test is an opportunity to clean up the test and make it more readable. /code.launchpad .net/~canonical -platform- qa/address- book-app/ fix-test_ import_ from_sim- cleanup/ +merge/ 257931
Take a look at:
https:/
In there, I removed the initial check because it has nothing to do with the name of the test. It should be tested elsewhere that when you open the app, no contacts are shown.
Also, I moved the selection to the page helper object. Every time you have a select single in the test body, there's something wrong. If we move them to the page object it will be easier to read and easier to maintain.
After the cleanup, it seems to me that this is a good candidate to be turned into a QML test. Here we are only checking that a button is not shown if certain conditions are not met. That's purely UI, it has nothing to do with a user story so autopilot seems like a tool too big and slow for it. Do you agree?
Finally, the name of the test still sounds wrong: test_import_ item_disabled_ without_ sim_card
We are not checking that the item is disabled. We are checking that it is not visible.