mockup/contextual-menu: Added test for the contextual menu.

Oshane Bailey <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: mockup
Branch: refs/heads/contextual-menu
Date: 2017-07-23T18:33:16Z
Author: Oshane Bailey (b4oshany) <[email protected]>
Commit: https://github.com/plone/mockup/commit/83c7e24bfab0fc457e426e49c3f5cb225d43af2d

Added test for the contextual menu.

Files changed:
M CHANGES.rst
M mockup/patterns/filemanager/templates/app.xml
M mockup/tests/pattern-filemanager-test.js

diff --git a/CHANGES.rst b/CHANGES.rst
index 1f449af1..174807db 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -32,21 +32,7 @@ New features:
   - Add Anchor (a) tag to the UI views.
   - Upgrade JQTree to 1.4.1
   - Enable Drag and Drop inside of the theme editor file tree.
- - Search for files and text within files and opening the file upon click.
-  [b4oshany]
- - Add contextual menu to theme files in the file tree.
-  [b4oshany]
- - Search for files and text within files and opening the file upon click.
-  [b4oshany]
- - Added Bootstrap Dropdown menu to the UI views.
-  [b4oshany]
- - Enable Drag and Drop inside of the theme editor file tree.
-  [b4oshany]
- - Added Anchor (a) tag to the UI views.
-  [b4oshany]
- - Upgrade JQTree to 1.4.1
-  [b4oshany]
- - Enable Drag and Drop inside of the theme editor file tree.
+  - Add contextual menu to theme files in the file tree.
   [b4oshany]
 
  - Make thumb scale in folder contents listing adjustable/supressable.
diff --git a/mockup/patterns/filemanager/templates/app.xml b/mockup/patterns/filemanager/templates/app.xml
index 6c335b68..280faaad 100644
--- a/mockup/patterns/filemanager/templates/app.xml
+++ b/mockup/patterns/filemanager/templates/app.xml
@@ -17,9 +17,9 @@
             </div>
         </nav>
 </div>
-<div id="contextual-menu" class="dropdown-menu">
+<ul id="contextual-menu" class="dropdown-menu">
     <li data-item="newfile"><a>New File</a></li>
     <li data-item="newfolder"><a>New Folder</a></li>
     <li data-item="rename"><a>Rename</a></li>
     <li data-item="delete"><a>Delete</a></li>
-</div>
+</ul>
diff --git a/mockup/tests/pattern-filemanager-test.js b/mockup/tests/pattern-filemanager-test.js
index 1789b425..8f3577d3 100644
--- a/mockup/tests/pattern-filemanager-test.js
+++ b/mockup/tests/pattern-filemanager-test.js
@@ -40,7 +40,8 @@ define([
       registry.scan(this.$el);
       this.clock.tick(1000);
       expect(this.$el.find('.tree ul').length).to.be.equal(2);
+      expect($('#contextual-menu li').length).to.be.equal(4);
     });
   });
 
-});
\ No newline at end of file
+});



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.