Skip to content

Conversation

@luannmoreira
Copy link
Member

Summary

This PR updates the admin UI unit tests and snapshots for Device and FirewallRules to align with the updated backend model where tags are now represented as objects instead of simple strings.

It also refreshes mock data to reflect the new schema and updates related snapshots accordingly.

Changes

Tags

Converted tags from strings to objects ({ tenant_id, name, created_at, updated_at }).

Updated snapshots to display test-tag instead of old string values (tag1, xxxx, yyyy).

Device tests

  • Renamed mockDevices → devices.
  • Added a second mock device with corresponding snapshot row.

Updated fields

  • remote_addr → remoteAddr
  • OS info changed from Ubuntu → Linux Mint
  • Updated timestamps (last_seen, created_at) and namespaces.
  • Adjusted status icons (success → error for offline, etc.).

FirewallRules tests

  • Renamed mockFirewallRules → firewallRules.
  • Updated filter tags to use object schema.
  • Adjusted tooltip IDs and chip content in snapshots.

Switch tags from strings to objects in mocks and snapshots
Rename mock lists: mockDevices→devices; mockFirewallRules→firewallRules
Update device fields: remote_addr→remoteAddr, mac/keys sanitized
Adjust OS info, namespace, timestamps, and status icons in snapshots
Add a second device and corresponding snapshot row

Update tooltip ids and chip content to reflect new data
@gustavosbarreto gustavosbarreto merged commit 426dd69 into master Sep 18, 2025
16 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/mock-tags-tests branch September 18, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants