### **PR Type**
Tests
___
### **Description**
Add comprehensive unit tests for cipher keys
Cover Akeyless provider form behaviors
Test encryption mechanism selection logic
Validate OpenObserve local secret workflows
___
### Diagram Walkthrough
```mermaid
flowchart LR
AddCipherKeySpec["AddCipherKey.spec.ts"] -- "mount, navigation, submit" --> AddCipherKeyVue["AddCipherKey.vue"]
AddCipherKeySpec -- "stubs, mocks" --> ServicesMocks["cipher_keys service"]
AkeylessSpec["AddAkeylessType.spec.ts"] -- "fields, validation, update mode" --> AddAkeylessTypeVue["AddAkeylessType.vue"]
OpenobserveSpec["AddOpenobserveType.spec.ts"] -- "local secret, update mode" --> AddOpenobserveTypeVue["AddOpenobserveType.vue"]
MechanismSpec["AddEncryptionMechanism.spec.ts"] -- "provider, algorithm" --> AddEncryptionMechanismVue["AddEncryptionMechanism.vue"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>AddAkeylessType.spec.ts</strong><dd><code>Tests for
Akeyless provider form behavior</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddAkeylessType.spec.ts
<ul><li>Add unit tests for Akeyless form fields<br> <li> Validate URL,
access ID, and HTML sanitization<br> <li> Test auth types (access_key,
ldap) conditional UI<br> <li> Test secret types (static_secret, dfc)
conditional UI and update mode</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-394b98b49b31d82146024ad8d9ad900a69afd49cb33d913514bb61058c7a2649">+324/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddCipherKey.spec.ts</strong><dd><code>Comprehensive
tests for AddCipherKey flow</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddCipherKey.spec.ts
<ul><li>Add end-to-end component tests with mocks/stubs<br> <li> Cover
create/update workflows and validations<br> <li> Test dynamic child
rendering and step navigation<br> <li> Verify helpers, state management,
and error handling</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-1ae71f00dfb6f9424d2443856ca3a419aaf2ee0c08900f7ef2ca44e41c1982e9">+616/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddEncryptionMechanism.spec.ts</strong><dd><code>Tests
for encryption mechanism selection</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddEncryptionMechanism.spec.ts
<ul><li>Add tests for provider type and algorithm options<br> <li>
Validate conditional rendering for simple provider<br> <li> Verify
bindings, validation, and accessibility props<br> <li> Include robust
stubs for Quasar selects</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-041335605ede2ba506406e550ba3c7663f4a8155f8c548f9e18b95ddfea4a51e">+402/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>AddOpenobserveType.spec.ts</strong><dd><code>Tests for
OpenObserve local secret form</code>
</dd></summary>
<hr>
web/src/components/cipherkeys/AddOpenobserveType.spec.ts
<ul><li>Add tests for local secret input behavior<br> <li> Validate
required rules and data binding<br> <li> Cover update mode toggle and
buttons<br> <li> Verify field properties and structure</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8101/files#diff-d4c9e84859e41b57861e8ec93d08f28111c13c5ca1143c0613f9e3f55051a2f2">+675/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
web
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
For stand-alone UI development environment, create .env file and which contains below environment variable
VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev
Type-Check, Compile and Minify for Production
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint