Guide to Monocle tests
Monocle has three kinds of tests:
-
Examples show you how to implement a Monocle
Reader.
-
Feature tests exercise the various aspects of
Monocle, including the way book content is loaded, the way content is
paginated, the way pages are animated, etc.
-
Bug tests typically highlight rendering or logic
problems in browsers, and in some cases test Monocle's workarounds.
Examples
Feature tests
-
Compatibility diagnostics
— A chart of supported features and detected bugs in the
current browser environment that affect Monocle performance.
-
Book data
— Loading different kinds of HTML content.
-
Componentry
— Various strategies for loading content into components.
-
Controls
— Simple tests for Monocle's stock controls.
Plus the (less common) case of an
external control.
-
Events
— Displays the events that are dispatched during initialisation
and page turning.
-
Flippers
— Ways that Monocle can animate page-turns.
-
Formatting
— Set a default stylesheet for all components when creating
the Reader.
-
Locus search
— Jumping to elements within a component via XPath or CSS selectors.
-
Panels
— Ways that you can interact with Monocle pages.
-
Selection
— Fire events whenever the text selection changes in a Monocle
component.
-
Stencil
— A Monocle feature that makes links clickable through panels.
Bug tests
-
The How It Works series.
1: How do we force iframe body content into
columns? —
2: How do we clip the content without
scrollbars? —
3: How do we
measure the width
of a columned iframe body? —
4: In
which column
is a given element?
-
Rich content
— Shows the problems browsers have paginating rich content
like tables, and suggests solutions.
-
Embedded Reader
— Some old mobile browsers struggle with iframes inside iframes.
-
Base URIs
— Loading relative-URL images/stylesheets etc in components.
-
Client-specific bug index
— A repository of other bugs that afflict only specific clients.
-
Experiments
— Ideas and proofs-of-concept that might eventually show up
in core.