Asserting the Layout

In order for our CSS testing code to check the layout of our elements, we need to know the width of the page. This turns out to be surprisingly difficult, but we figure it out. Next, we validate that our element is centered on the page and deal with cross-browser rounding differences. With that, we’ve done it! An actual assertion about our page layout.

comments powered by Disqus