summaryrefslogtreecommitdiff
path: root/tests/unit/AppHeader.spec.js
AgeCommit message (Collapse)AuthorFilesLines
2024-03-01Add empty authentication moduleEd Tanous1-1/+9
New versions of vuex warn if there are modules that are used in an element that haven't had their namespace defined. This module isn't actually used in the test, so add an empty Vuex module that matches the name of AuthenticationStore, so the test can pass. Change-Id: I5bceb3e1e0bad603028cfb17fa95b020d68ceb4d Signed-off-by: Ed Tanous <ed@tanous.net>
2022-10-12Fix an undefined issue in UTwangqi021-0/+1
Change-Id: Id9bbacb752c142f712e4e5e752b74c5bac848d81 Signed-off-by: wangqi02 <wangqi02@inspur.com>
2021-08-27Add system information on Appheader pageSukanya Pandey1-2/+2
- Model type and serial number are newly added system info data on Appheader. - On small screens and below system information(model type, serial number and asset tag) will be hidden. - On large screen and below model type and serial number will be visible but asset tag will be hidden. - For all other screens all the system info will be visible. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: Ia844a26f658083cbd5fa9c8f3f6bea8b65ddcd11
2021-05-18Replace use of the term host with serverDerick Montague1-3/+3
This patchset focuses on the global store use for server power operations and impacts several pages in the interface. For consistency, both in the UI and the code base, we are replacing the term host with server. This change impacts both the user and the developer experience. Maintaining consistency in naming allows both developers and users to form a mental model of the overall system and will help remove confusion when interacting with the UI and editing the interface. Testing: 1. Tested shutdown, power on, and reboot and verified the icons and page sections in the site header and the server power operations page update as expected during power operations. 2. Verified the one-time boot operations alert is displayed to the user when changing the boot settings on the server power operations page 3 Tested factory reset and validated the correct information message is displayed to the user with the server power off and on when performing the factory reset functions. 4. Verified the SOL Console status icon updates correctly during power operations. 5. Verified the alert message is displayed on the firmware update page when the server is powered on. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I88499a746364ab80f16a8b350d550407d094e95d
2020-11-12Resolve custom-event-name-casing lint warningsSukanya Pandey1-3/+3
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I9eea4eac3b8cacc216fc9ad1011e51622622e75f
2020-11-10Update failing unit testsDerick Montague1-0/+1
- Add babel plugin to handle Jest import of SVG. Without plugin the test fails with a require.context() is undefined - Update snapshot tests that have changed - Removed globals from .eslintrc.js that were needed prior to migrating from Mocha and Chai to Jest Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ibd01d2e629b5ecb47d072e277e4e9b5ae5c5f001
2020-11-03Update linting packages to use latestDerick Montague1-3/+3
- 99% of changes were small syntax changes that were changed by the lint command. There were a couple of small manual changes to meet the property order patterns established as part of the vue:recommended guidelines. There are rules that were set from errors to warnings and new stories are being opened to address those issues. Testing: - Successfully ran npm run serve - Successfully ran npm run lint - Verified functionality works as expected, e.g. success and failure use cases - Resolved any JavaScript errors thrown to the console Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
2020-09-30Resolve broken unit testsDerick Montague1-1/+1
- 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 Montague1-33/+38
- 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 Pandey1-0/+62
- AppHeader.js - AppNavigation.js Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I55bbd16349dcf134b68fe33ba7cc26f29a98cfc7