awsLambdaFunctionSelect.spec.jsx 758 B

123456789101112131415161718192021
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import AwsLambdaFunctionSelect from 'sentry/views/integrationPipeline/awsLambdaFunctionSelect';
  3. describe('AwsLambdaFunctionSelect', () => {
  4. it('choose lambdas', () => {
  5. const {container} = render(
  6. <AwsLambdaFunctionSelect
  7. lambdaFunctions={[
  8. {FunctionName: 'lambdaA', Runtime: 'nodejs12.x'},
  9. {FunctionName: 'lambdaB', Runtime: 'nodejs10.x'},
  10. {FunctionName: 'lambdaC', Runtime: 'nodejs10.x'},
  11. ]}
  12. />
  13. );
  14. expect(container).toSnapshot();
  15. expect(screen.getByLabelText('lambdaB')).toBeInTheDocument();
  16. expect(screen.getByLabelText('Finish Setup')).toBeInTheDocument();
  17. // TODO: add assertion for form post
  18. });
  19. });