SOURCE CODE: Widget Visual Tests

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
  <title>Widget Visual Tests | JavaScript Examples | UIZE JavaScript Framework</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="keywords" content="widget Uize.Widgets.VisualTests.Widget Uize.Widgets.VisualTests.TestCase.Widget"/>
  <meta name="description" content="See the visual tests for any widget that implements visual tests. Use this page to test a widget while you're developing it."/>
  <link rel="alternate" type="application/rss+xml" title="UIZE JavaScript Framework - Latest News" href=""/>
  <link rel="stylesheet" href="../css/page.css"/>
  <link rel="stylesheet" href="../css/page.example.css"/>


<script type="text/javascript" src="../js/Uize.js"></script>

<h1 class="header">
  <a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a>
  <a href="../index.html" class="homeLinkText" title="UIZE JavaScript Framework home">UIZE JavaScript Framework</a>

<div class="main">
  <h1 class="document-title">
    <a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a>
    Widget Visual Tests
    <div class="pageActionsShell">
      <div id="page-actions" class="pageActions"><a href="source-code/widget-visual-tests.html" class="buttonLink">SOURCE</a></div>

  <!-- explanation copy -->

  <div class="explanation">
    <p>This example lets you select and run any of the visual tests for UIZE widgets that implement visual tests. Simply select a widget from the dropdown menu (only widgets that implement visual tests will be listed in this menu).</p>

  <div id="page-widgetViewer"></div>

<script type="text/javascript">

Uize.require (
  function () {
    'use strict';

    /*** create the example page widget ***/
      var _page = = UizeSite.Page.Example ();

    /*** add the visual tests viewer ***/
      var _modulesTree = Uize.copy (UizeSite.ModulesTree ());
      delete _modulesTree.Uize.Build;

      _page.addChild (
          modules:Uize.Data.PathsTree.toList (_modulesTree),
          value:Uize.Url.fromParams (location.href).widgetClass,

    /*** wire up the page widget ***/
      _page.wireUi ();