]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add visual test for sliders with a nonzero start value
authorGeoff Kimball <geoff@zurb.com>
Fri, 11 Mar 2016 19:27:26 +0000 (11:27 -0800)
committerGeoff Kimball <geoff@zurb.com>
Wed, 16 Mar 2016 16:42:37 +0000 (09:42 -0700)
test/visual/slider/nonzero-start.html [new file with mode: 0644]

diff --git a/test/visual/slider/nonzero-start.html b/test/visual/slider/nonzero-start.html
new file mode 100644 (file)
index 0000000..73c1c22
--- /dev/null
@@ -0,0 +1,45 @@
+<!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>Slider: Non-zero Start Value</h1>
+
+      <p>Slider should be at left, since the initialStart is 50 and the scale is 50-100. (top: broken, bottom: expected)</p>
+
+      <div class="slider" id="slider1" data-slider
+           data-initial-start="50"
+           data-start="50" data-end="100">
+        <span class="slider-handle" data-slider-handle role="slider" tabindex="1"></span>
+        <span class="slider-fill" data-slider-fill></span>
+        <input type="hidden">
+      </div>
+
+      <hr>
+
+      <p>Slider should cover 100%, since the initialStart is 50 and the scale is 50-100 (top: broken, bottom: expected)</p>
+      <div class="slider" id="slider2" data-slider
+           data-double-sided
+           data-initial-start="50" data-initial-end="100"
+           data-start="50" data-end="100">
+        <span class="slider-handle" data-slider-handle role="slider" tabindex="1"></span>
+        <span class="slider-fill" data-slider-fill></span>
+        <span class="slider-handle" data-slider-handle role="slider" tabindex="1"></span>
+        <input type="hidden">
+        <input type="hidden">
+      </div>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>