]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add basic visual tests for Reveal
authorGeoff Kimball <geoff@zurb.com>
Wed, 17 Feb 2016 19:16:54 +0000 (11:16 -0800)
committerGeoff Kimball <geoff@zurb.com>
Wed, 17 Feb 2016 19:16:54 +0000 (11:16 -0800)
test/visual/index.html
test/visual/reveal.html [new file with mode: 0644]

index 454ef35aff3afc4f54d499dcf0e21ffd6c73db58..83d37e31e0c8349453e2f66222220cb49a4c887a 100644 (file)
@@ -11,7 +11,7 @@
     <div class="row column">
       <h1>Foundation for Sites Component Testing</h1>
       <ul>
-        <li><a href="#">Page Link</a></li>
+        <li><a href="reveal.html">Reveal</a></li>
       </ul>
     </div>
 
diff --git a/test/visual/reveal.html b/test/visual/reveal.html
new file mode 100644 (file)
index 0000000..3f5ca21
--- /dev/null
@@ -0,0 +1,52 @@
+<!doctype html>
+<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
+<html class="no-js" lang="en" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Foundation for Sites Testing</title>
+    <link href="assets/css/foundation.css" rel="stylesheet" />
+  </head>
+  <body>
+    <div class="row column">
+      <h1>Reveal</h1>
+
+      <section>
+        <h2>Basics</h2>
+        <p>A modal should open in the center of the page when either of these links are clicked.</p>
+        <p><a data-open="exampleModal1">Open Trigger</a></p>
+        <p><a data-toggle="exampleModal1">Toggle Trigger</a></p>
+
+        <div class="reveal" id="exampleModal1" data-reveal>
+          <p>Clicking any of these triggers should close the modal.</p>
+          <p>Clicking on the overlay should close the modal.</p>
+          <p><a data-toggle="exampleModal1">Toggle Trigger</a></p>
+          <p><a data-close>Implicit Close Trigger</a></p>
+          <p><a data-close="exampleModal1">Explicit Close Trigger</a></p>
+        </div>
+      </section>
+
+      <section>
+        <h2>Nested</h2>
+        <p>Clicking this link should open the initial modal.</p>
+        <p><a data-open="exampleModal2">Open first modal</a></p>
+
+        <div class="reveal" id="exampleModal2" data-reveal>
+          <p>Clicking this link should replace this modal with a new one.</p>
+          <p><a data-open="exampleModal3">Open second modal</a></p>
+        </div>
+
+        <div class="reveal" id="exampleModal3" data-reveal>
+          <p>Clicking this link should close this modal, but not go back to the first one.</p>
+          <p><a data-close>Close modal</a></p>
+        </div>
+      </section>
+    </div>
+
+    <script src="assets/js/vendor.js"></script>
+    <script src="assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>