summaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2020-09-30Resolve broken unit testsDerick Montague3-171/+320
- Refactor broke snapshots and the logout functionality test Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I31932b0553a8ca9e6e2a38235b7769fab2061ba6
2020-05-05Use Jest as the test frameworkDerick Montague4-51/+1153
- Remove mocha, chai, sinon and setup.js - Add snapshot test to ApplicationHeader spec and remove skip nav link test - Add an update snapshot test that can be run if a page changes and the snapshot needs to be updated - Remove tight coupling of application structure and test in ApplicationHeader spec We are changing to Jest for a few reasons: 1. Jest is the testing framework used by most Vue applications and has robust documentation 2. It requires less configuration and works out of the box 3. It includes the ability to perform snapshot testing of rendered UI, which is much easier to maintain than trying to test specific UI elements. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I7bca3613991ebae1fd464fa3a60f079d044ed7b4
2020-04-09Resolve header and nav accessibility violationsDerick Montague1-37/+47
- Add aria-label to nav sections in app-header and app-nav to meet accessibility guidelines. When application has multiple nav elements an aria-label is required to help screen readers identify the elements - Remove b-nav child of b-nav-bar in app-header to fix invalid markup generated by Bootstrap-vue components. Components were not used as expected by the component library - Replace b-nav-item with HTML <li> elements using nav-item css classes in order to use button elements. Bootstrap-vue generates <a> elements which is not the semantic HTML element to use for items that are not links to other sections of the application. - Removed aria-expanded and nav-open class from nav-trigger button - Update appHeader unit test Used a TDD approach to write all tests to fail and then updated the methods and actions to make the tests suceed. Each test resulting in a dispatched action should be called once only and with the expected action. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I18af3727708526f814b7ceb77a0c28fda9f3d9bd
2020-04-07Add spec files for the componentsSukanya Pandey2-0/+99
- AppHeader.js - AppNavigation.js Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I55bbd16349dcf134b68fe33ba7cc26f29a98cfc7
2020-03-26Add mocha and chai test frameworkSukanya Pandey1-12/+0
- Mocha/Chai/Sinon test frameowrk because it has 100% feature parity with vue-loader. - Code for making 'expect' function accessible globally. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: Idf809cb08d8c1ef177ff92f0ee1be04ac74059a3
2020-01-27Add singlequote override and fix filesDerick Montague1-5/+5
Based on phosphor-webui and JavaScript common practices we are setting ESLint to required single quote for JS files and double quote for SCSS files. This commit adds the ESLint override to the prettier rules and runs the npm lint script that fixes the files that violate the rule. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I50cba77b2d0797595ce94258029608efa8665005
2020-01-21Create basic application using vueDerick Montague1-0/+12
- Create vue app - Add AppHeader and AppNavigation - Set up routes for server overview and local user management - Add themes and set to gray-10 theme - Add active class for current navigation - Add a prototype method named $http to vue prototype - The UI uses console logs in production to communicate to users - Add boostrap vue component library Change-Id: Ib6618e6357ca01bdac6de4ed031a15c8552226f3 Signed-off-by: Derick Montague <derick.montague@ibm.com>