-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-130980 / 25.04 / ElectricEel HA Dashboard is missing the Standby …
…System Information card. (#10640)
- Loading branch information
1 parent
4598a0c
commit 4efc5ea
Showing
6 changed files
with
75 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/app/pages/dashboard/services/get-default-widgets.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { getDefaultWidgets } from 'app/pages/dashboard/services/get-default-widgets'; | ||
import { WidgetGroup } from 'app/pages/dashboard/types/widget-group.interface'; | ||
import { WidgetType } from 'app/pages/dashboard/types/widget.interface'; | ||
|
||
describe('getDefaultWidgets', () => { | ||
it('should return all default widgets when isHaLicensed is true', () => { | ||
const result: WidgetGroup[] = getDefaultWidgets(true); | ||
|
||
expect(result).toHaveLength(9); | ||
expect(result[0].slots[0].type).toBe(WidgetType.SystemInfoActive); | ||
expect(result[1].slots[0].type).toBe(WidgetType.SystemInfoPassive); | ||
}); | ||
|
||
it('should return default widgets without the second widget when isHaLicensed is false', () => { | ||
const result: WidgetGroup[] = getDefaultWidgets(false); | ||
|
||
expect(result).toHaveLength(8); | ||
expect(result[0].slots[0].type).toBe(WidgetType.SystemInfoActive); | ||
expect(result[1].slots[0].type).toBe(WidgetType.CpuModelWidget); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters