mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type**
Tests
___
### **Description**
- Add comprehensive unit tests for zincutils utilities
- Mock localStorage, sessionStorage, btoa/atob, console
- Cover encoding, validation, formatting utility groups
- Test auth, config, websocket, local storage, timezone
___
<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>zincutils.spec.ts</strong><dd><code>Add zincutils unit
tests</code>
</dd></summary>
<hr>
web/src/utils/zincutils.spec.ts
<ul><li>Created test suite for all <code>zincutils</code> functions<br>
<li> Added mocks for storage, <code>btoa</code>/<code>atob</code>, and
console<br> <li> Wrote tests for encoding, validation, formatting
groups<br> <li> Covered utilities: auth, websocket, config, timezone,
etc.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7679/files#diff-225d7ad1afe0a7e6f522c267bfd9ac4928cb5c23047fc6c02a287519a34aacb7">+843/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
zinc-observe-ui-automation
#Install cypress in project directory npm install cypress --save-dev
To run Tests from local
npx cypress open
To run Tests from local and push result in cypress cloud
./node_modules/.bin/cypress run --record --key cef585a4-1439-4580-bfce-d62230663b22