B2G/QA/Automation/Style Guide: Difference between revisions

Jump to navigation Jump to search
Line 152: Line 152:


= Use of Libraries =
= Use of Libraries =
== Page Objects ==
TBD - jlorenzo
* where to call marionette's APIs
* why a page class shouldn't import data from the test
* All page objects should inherit from <code>Page</code> in page.py.
* Page objects should not do asserts. This should be done within the test.
* Each page should be grouped within one module.
* If using multiple words to describe a module separate them with underscores '_'
* Single quotes (') should be used instead of double (") throughout.
* Methods should have a single purpose.
== Limited use of conditionals ==
== Limited use of conditionals ==
* Methods should not contain logic that depends on properties of the page. The logic and expectations should be within the test, and adding this to the page object could guard your tests against genuine failures.
* Methods should not contain logic that depends on properties of the page. The logic and expectations should be within the test, and adding this to the page object could guard your tests against genuine failures.
352

edits

Navigation menu