-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aws/lambda): Shows function details and actions menu. (backport #…
…9199) (#9516) * fix(aws/lambda): Shows function details and actions menu. * fix(aws/lambda): Shows function details and actions menu. Co-authored-by: Zach Smith <33258732+zachsmith1@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit c39f74d) Co-authored-by: Raúl Vázquez <raul.vazquez@armory.io>
- Loading branch information
1 parent
2c728d0
commit 3aa3efc
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
app/scripts/modules/amazon/src/function/details/FunctionActions.spec.tsx
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,29 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { Application } from '@spinnaker/core'; | ||
import { IAmazonFunction, FunctionActions } from 'amazon'; | ||
|
||
describe('FunctionActions', () => { | ||
it('should render correct state when all attributes exist', () => { | ||
let app = { name: 'app' } as Application; | ||
|
||
let functionDef = { functionName: 'app-function' } as IAmazonFunction; | ||
|
||
const wrapper = shallow( | ||
<FunctionActions | ||
app={app} | ||
functionDef={functionDef} | ||
functionFromParams={{ | ||
account: 'test-account', | ||
region: 'us-east-1', | ||
functionName: 'function-name', | ||
}} | ||
/>, | ||
); | ||
|
||
let dropDown = wrapper.find('DropdownToggle'); | ||
|
||
expect(dropDown.childAt(0).text()).toEqual('Function Actions'); | ||
}); | ||
}); |
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