Update server config, builder APK logic, frontend fleet/activity metrics, and ignore test APKs
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -37,4 +37,21 @@ describe('fleetGroups', () => {
|
||||
saveFleetGroups(groups);
|
||||
expect(loadFleetGroups()).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('generates unique fallback IDs for loaded groups missing an ID', () => {
|
||||
// Manually saving raw JSON objects without IDs to simulate legacy state
|
||||
const rawGroups = [
|
||||
{ name: 'Legacy Group 1', color: '#ff0000', agentIds: [] },
|
||||
{ name: 'Legacy Group 2', color: '#00ff00', agentIds: [] },
|
||||
];
|
||||
localStorage.setItem('aetherforge_fleet_groups', JSON.stringify(rawGroups));
|
||||
|
||||
const loaded = loadFleetGroups();
|
||||
expect(loaded).toHaveLength(2);
|
||||
expect(loaded[0].id).toBeDefined();
|
||||
expect(loaded[1].id).toBeDefined();
|
||||
expect(loaded[0].id).not.toBe(loaded[1].id);
|
||||
expect(loaded[0].id.startsWith('fg-')).toBe(true);
|
||||
expect(loaded[1].id.startsWith('fg-')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user