Closed Bug 1136237 Opened 5 years ago Closed 4 months ago

Find and use a better way to verify buttons' appearance in test_unknown_issuer.py

Categories

(Testing :: Firefox UI Tests, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: galgeek, Assigned: vaibhavbhosale15)

References

()

Details

(Whiteboard: [lang=py])

It may be better in test_unknown_issuer.py to verify the presence of the "Get Me Out of Here!" and "Add Exception" buttons using is_displayed.
Mentor: galgeek
Depends on: 1132709
Whiteboard: [good first bug][lang=py]
Hey,
Can I work on this bug?
Thanks!
(In reply to Vaibhav Bhosale from comment #1)
> Hey,
> Can I work on this bug?
> Thanks!

Hi Vaibhav, certainly! The bug this depended on has landed, so you can get started working on it right away. A good first step would be to check out the code at https://github.com/mozilla/firefox-ui-tests and follow the readme instructions to get up and running. The is_displayed method is documented in the marionette api reference: http://marionette-client.readthedocs.org/en/latest/reference.html?highlight=is_displayed#marionette.HTMLElement.is_displayed

Let us know if you have any questions by requesting needinfo here or asking on irc in #automation. Thanks!
Assignee: nobody → vaibhavbhosale15
Status: NEW → ASSIGNED
Hey,
I have pulled the repository. And followed the steps for installation.
Can you please guide me through the further steps?
Also, how do I see what the current scenario is?

Thanks
Hi, Vaibhav!

Have you been able to find the file that needs the update? I've updated this bug's URL to point directly at the file in the github repo.

I wonder if you've tried running the tests. There are Usage instructions just below the Installation instructions in the repo's README.  The best practice for updating a test is to run the updated test on your computer first and make sure your updates pass there.
Flags: needinfo?(vaibhavbhosale15)
Hey Barbara!
Actually, I am stuck up at something else. I am unable to understand what will is_displayed do here? I mean what are the objects for which we need to check this property?
Also, can you please give me some pointers or/and references so that I can comprehend the code that is already present.
Thank You!

Regards,
Vaibhav
Flags: needinfo?(vaibhavbhosale15)
Hi, Vaibhav!

The Firefox UI Tests are in very active development right now. The is_displayed property is pretty new and looks like a better way to handle the checks for the "Get Me Out of Here!" and "Add Exception" buttons whose presence we want to verify on the error page that's displayed in this particular test.

Here's documentation for the UI test libraries that are part of the same repo you downloaded: http://firefox-puppeteer.readthedocs.org/en/latest/index.html  Like the tests themselves, this documentation is in pretty active development. 

And here's some documentation for new contributors to automation projects: http://ateam-bootcamp.readthedocs.org/en/latest/

Let us know if you have more questions. Checking the need more information box below and specifying one of our e-mail addresses will often help get a quicker response, or join us in Mozilla's #automation IRC channel.
Per discussion with David Burns today in IRC, beginning at 12:26, we should avoid using is_displayed in firefox-ui-tests, preferring instead to check css or attributes or properties of elements.

There's also more information here: https://bugzilla.mozilla.org/show_bug.cgi?id=865232

I'm removing "good first bug" from this for now. 

Henrik, maybe you could follow up and suggest another bug for Vaibhav?
Mentor: galgeek
Flags: needinfo?(hskupin)
Whiteboard: [good first bug][lang=py] → [lang=py]
Summary: Use is_displayed to verify buttons' appearance in test_unknown_issuer.py → Find and use a better way to verify buttons' appearance in test_unknown_issuer.py
I don't see why we can't use the Mozmill version for the is_displayed() method needed here:
http://hg.mozilla.org/qa/mozmill-tests/file/default/lib/utils.js#l452

We never had issues with it so far. The only thing I feel is missing here is the `hidden` property of the DOM element's JS object. We might wanna add it here.
Flags: needinfo?(hskupin)
Product: Mozilla QA → Testing

Both should be covered well via browser chrome tests nowadays, and firefox ui tests will be removed soon via bug 1573410.

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.