summaryrefslogtreecommitdiff
path: root/tests/unit/__snapshots__
AgeCommit message (Collapse)AuthorFilesLines
2024-04-24Inline the header svgEd Tanous1-0/+1
Ideally we wouldn't have to pull down this file on every load, and we could just inline it. This commit implements inlining. Note, that this requires a minor modification to the unit test, as the inline header remains when unit tests are run. It's not clear at this time how to make inlining plugin operate on unit tests, but it doesn't seem terribly important. Tested: Loading the webui no longer shows a download of logo-header Change-Id: Iaa5be5b5a84e0ad6e1f430113f929032835c9f1c Signed-off-by: Ed Tanous <ed@tanous.net>
2024-02-29Correct AppNavigation snapshot to pass unit testsKonstantin Aladyshev1-0/+18
The commit "Add SNMP alerts page and test hooks" (7c1cfe7e25957fc915fc9790bdf78887295b1fee) has added a new page to the navigation, but didn't change the shanpshot. As a result this broke the unit tests. Perform "npx jest --updateSnapshot" to automatically correct the AppNavigation snapshot. Tested: Did npm run test:unit and it passed. Change-Id: I9f9dbf235013d8736d958d5c8d19eb3d75c575ba Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2022-02-04Add Key clear page under Operations sectionSandeepa Singh1-0/+18
This page will allow privileged user to clear encrypted keys. - Only admin and CE login user will be able to see the page - The UI will be different for both, admin and CE login user(service) - This page is IBM only Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ic6fe3454de815629a6b2250daa99ab21f2b316c3
2021-09-03Update login page layoutDerick Montague1-1/+1
This update will: - Change the positioning of the form to be on the left - Add the built on OpenBMC logo to the bottom right corner of the screen - Add the ability to include a GUI custom name using a .env variable. If the variable is not present, the login page will not include the <h1> section heading element. - Remove the word "logo" from the alt attribute for the company logo image used in the application header and on the login page. Github story: https://github.com/openbmc/webui-vue/issues/63 Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I83ac5aecff0b3858c3ab5f38ab1aaa603d59acf1
2021-08-10IA update: Add resource management sectionSandeepa Singh1-18/+156
This is the sixth commit for information architecture changes and has the following changes: - Resource management section has been added - Carbon icon used for resource management section is data--base--alt - Manage power usage page from operations has been moved to resource management - Manage power usage page has been updated to power page Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: If3feb994dbad19dd6cfb1507d976d09643c8e4d6
2021-08-10IA update: Update access and control sectionSandeepa Singh1-56/+52
This is the fifth commit of the information architecture changes and has the following changes: - The icon for access and control has been updated - Access and control section has been updated to security and access section - Security settings page has been updated to policies page and moved to security and access section - Client sessions page has been updated to sessions page - Local user management page has been updated to user management page - SSL certificates page has been updated to certificates page Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ie93cee9002742ecf7d33615636f4f159f4395fc4
2021-08-10IA update: Update configuration to settingsSandeepa Singh1-50/+32
This is the fourth update to information architecture changes and has the following changes: - The configuration section is updated to settings - The date and time settings page is updated to date and time - The network settings page is updated to network - The power restore policy page in operations section is moved to settings section Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: I6f5ab25f5227530be430bd39a4d9629b3bf09d8b
2021-08-10IA update: Update control section to operationsSandeepa Singh2-61/+43
This is the third update to the information architecture changes and has the following changes: - The control section has been updated to operations - The server led page has been removed - The firmware page is moved to operations section Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: I2e23da447890d7bee51892e1f782d5f2db6dded4
2021-08-10IA update: Update health sectionSandeepa Singh1-34/+34
This is the second update to information architecture changes and has the following changes: - Health section is updated to hardware status section - Hardware status page is updated to inventory and LEDs page - Route for sensors page has been updated Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com> Change-Id: Ia1ba3a15a243a00f59a2ec646132436eb355a999
2021-08-10IA update: Add logs and update overview iconDerick Montague2-23/+161
This is the first patchset of the information architecture changes. These changes are the result of several months of design research with users to improve the existing information architecture (IA). More information can we found in the Github story. This patchset will add a Logs section and move event logs and dumps from the Health section to the new Logs section. It will also update the icon used for the Overview page. Github story: https://github.com/openbmc/webui-vue/issues/56 Testing: 1. IBM build: - Logs contained Event logs and dumps - Both pages rendered when clicking link 2. Intel build - Logs contained Event logs only - Logs page rendered when clicking link 3. Tested default build - Logs contained Event logs only - Logs page rendered when clicking link Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I4621837202cf5ad3469d6ea460d9a5bdc79c8816
2021-07-22Update app nav test spec with post codesDixsie Wolmers1-0/+18
Ran NPM run test:update to update app nav test spec after post codes were merged. Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I4d168c80844a32732282a6f42d9cc9288463cf66
2021-03-30Update all minor and patch releasesDixsie1-4/+4
Updated NPM packages with minor and patch releases only. Tested the UI locally and by building copying to the BMC and running in an overlay and did not observe breaking changes. Major releases are not updated in this commit as they require additional testing and code updates to address breaking changes and will be updated separately once those updates are stable. Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: I73c952a75a1148c5852a18d73b9065083fd8e94c
2021-03-09Add factory reset pageDerick Montague1-0/+18
This new page will be included in the Control section of the primary navigation. The user will be able to choose between two different reset actions. The user can make the following calls: - /redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios - /redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I32a10dbce27a03fb84e24d7eae7c44eef9cffea5
2021-02-17Fix skip link 404 error on refresh bugDerick Montague1-1/+0
Problem: When a user uses the skip link anchor to skip the navigation, the route was being changed to /#main-content. This route does not exist. If a user were to manually refresh the page, it would return a 404. This link is critical to meet accessibility guidelines and is needed by users that navigate with a keyboard. The challenge is that we need to mirror a full page refresh on all route changes, so we set focus on the app-header element on each route change. When we click the skip to navigation link, there should not be a route change. All we need is to set focus on the <main> element so that the user can tab to the first tabbable element in the main content section. Solution: - Use a native <a> element with an attached click event handler - Prevent the default action of adding the hash to the URL - Create a global mixin to reuse for route changes and skip link activation - Emit an event that can be listened for to call the global mixin Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I4c2301b02f608eeb376ed2d1bd809f3d5c1bf545
2021-02-02Add power restore policy pageSukanya Pandey1-0/+18
- This page will show how the system boots once power is restored after a power disturbance. - API used to fetch the JSON: /redfish/v1/JsonSchemas/ComputerSystem/ComputerSystem.json - API used to fetch the current policy and to save updated policy: /redfish/v1/Systems/system/ Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I203bd3c5d26071b882cce6b9950cdb3fb1deb212
2021-01-08Resolve issue of page not found when opening new tabSukanya Pandey1-312/+156
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Id46f9f663c456a7d09b55d6d322b00785df4cbe7
2021-01-05Add updated spec file for AppNavigation and AppHeader componentSukanya Pandey2-0/+59
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I529fab5463692e70dea23536b7b0ca1ce52c67a7
2020-12-02Update application navigation component snapshotDerick Montague1-2/+2
- Ran npm test:update to update snapshot test to fix a broken test caused by the change to the snmp route update in https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/38207 Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I3777026f9c61ed2009b7c36493c7ff7df8ecd629
2020-11-10Update failing unit testsDerick Montague2-476/+581
- 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-09-30Resolve broken unit testsDerick Montague2-170/+319
- 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 Montague2-0/+1089
- 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