awsLambdaFunctionSelect.spec.tsx 816 B

12345678910111213141516171819202122
  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. initialStepNumber={0}
  8. lambdaFunctions={[
  9. {FunctionName: 'lambdaA', Runtime: 'nodejs12.x'},
  10. {FunctionName: 'lambdaB', Runtime: 'nodejs10.x'},
  11. {FunctionName: 'lambdaC', Runtime: 'nodejs10.x'},
  12. ]}
  13. />
  14. );
  15. expect(container).toSnapshot();
  16. expect(screen.getByRole('checkbox', {name: 'lambdaB'})).toBeInTheDocument();
  17. expect(screen.getByRole('button', {name: 'Finish Setup'})).toBeInTheDocument();
  18. // TODO: add assertion for form post
  19. });
  20. });