]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add visual test
authorKevin Ball <kmball11@gmail.com>
Fri, 19 May 2017 23:44:03 +0000 (16:44 -0700)
committerKevin Ball <kmball11@gmail.com>
Fri, 19 May 2017 23:44:03 +0000 (16:44 -0700)
test/visual/dropdown/offsets.html [new file with mode: 0644]

diff --git a/test/visual/dropdown/offsets.html b/test/visual/dropdown/offsets.html
new file mode 100644 (file)
index 0000000..5f84701
--- /dev/null
@@ -0,0 +1,49 @@
+<!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>Dropdown: Positioning Content</h1>
+
+      <p>These dropdowns test various positioning and position offsets</p>
+
+      <p>This dropdown should be offset by 10 down and 30 to the right</p>
+      <button class="button" type="button" data-toggle="example-dropdown">Toggle Dropdown</button>
+      <div class="dropdown-pane" id="example-dropdown" data-dropdown data-v-offset="10" data-h-offset="30" data-auto-focus="true">
+        <p>This dropdown should be offset by 10 down and 30 to the right</p>
+      </div>
+      <p>This dropdown has position left and alignment center, and should go off the screen left because it has allow-overlap true</p>
+      <button class="button" type="button" data-toggle="example-dropdown2">Toggle Dropdown</button>
+      <div class="dropdown-pane" data-position="left" data-alignment="center" data-allow-overlap="true" data-id="example-dropdown2" data-dropdown data-auto-focus="true">
+        <p>This dropdown should go off the screen left because it is 100% explicitly positioned.</p>
+      </div>
+      <p>This dropdown has position left and should go left if there is room and otherwise below</p>
+      <button class="button" type="button" data-toggle="example-dropdown3">Toggle Dropdown</button>
+      <div class="dropdown-pane" data-position="left" id="example-dropdown3" data-dropdown data-auto-focus="true">
+        <p>This dropdown should go left if there is room and otherwise below</p>
+      </div>
+      <p>This dropdown has position bottom and alignment left should align with its top right corner at the bottom right of the button</p>
+      <button class="button" type="button" data-toggle="example-dropdown4">Toggle Dropdown</button>
+      <div class="dropdown-pane" data-position="bottom" data-alignment="left" id="example-dropdown4" data-dropdown data-auto-focus="true">
+        <p>This dropdown has position bottom and alignment left should align with its top right corner at the bottom right of the button</p>
+      </div>
+      <p>This dropdown has position left and alignment top should align with its bottom right corner at the bottom left corner of the butotn</p>
+      <button class="button" type="button" data-toggle="example-dropdown5">Toggle Dropdown</button>
+      <div class="dropdown-pane" data-position="left" data-alignment="top" id="example-dropdown5" data-dropdown data-auto-focus="true">
+        <p>This dropdown has position left and alignment top should align with its bottom right corner at the bottom left corner of the butotn</p>
+      </div>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>