This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(security-group): assign and remove security groups in VM sidebar (…
- Loading branch information
Showing
22 changed files
with
636 additions
and
44 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/app/reducers/security-groups/redux/sg.reducers.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,41 @@ | ||
import * as securityGroupSelectors from './sg.reducers'; | ||
import { SecurityGroup } from '../../../security-group/sg.model'; | ||
|
||
describe('Security Group Selectors', () => { | ||
it('should get sorted groups', () => { | ||
const list = [ | ||
{ | ||
id: '1', | ||
name: 'sg1', | ||
}, | ||
{ | ||
id: '2', | ||
name: 'sg2', | ||
}, | ||
] as SecurityGroup[]; | ||
|
||
const preselected = [ | ||
{ | ||
id: '2', | ||
name: 'sg2', | ||
}, | ||
] as SecurityGroup[]; | ||
|
||
const sortedList = [ | ||
{ | ||
id: '2', | ||
name: 'sg2', | ||
isPreselected: true, | ||
}, | ||
{ | ||
id: '1', | ||
name: 'sg1', | ||
isPreselected: false, | ||
}, | ||
] as SecurityGroup[]; | ||
|
||
expect( | ||
securityGroupSelectors.getSortedSecurityGroupForVmDetails.projector(list, preselected), | ||
).toEqual(sortedList); | ||
}); | ||
}); |
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
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
Oops, something went wrong.