When looking at modular tests, it's looking like the best way to utilize GEB is to improve the at function.
In the beginning we would test a page and through an assertion of at page. like at HomePage. The at closure, by default, would check the title. But we're now putting in all the main modules of the page into the at closure.
This way, when we check at Page, we will get a verification that all appropriate div's are loaded.
This way, the main page spec will verify the page modules.
The actual content itself should be verified in separate classes/tests.
This makes the test more clean and easily readable.
In the beginning we would test a page and through an assertion of at page. like at HomePage. The at closure, by default, would check the title. But we're now putting in all the main modules of the page into the at closure.
This way, when we check at Page, we will get a verification that all appropriate div's are loaded.
This way, the main page spec will verify the page modules.
The actual content itself should be verified in separate classes/tests.
This makes the test more clean and easily readable.
No comments:
Post a Comment