diff --git a/app/javascript/packages/document-capture/components/acuant-capture.tsx b/app/javascript/packages/document-capture/components/acuant-capture.tsx index e40bee7fb58..d23e7da1859 100644 --- a/app/javascript/packages/document-capture/components/acuant-capture.tsx +++ b/app/javascript/packages/document-capture/components/acuant-capture.tsx @@ -327,7 +327,7 @@ function AcuantCapture( } = useContext(AcuantContext); const { isMockClient } = useContext(UploadContext); const { trackEvent } = useContext(AnalyticsContext); - const { isSelfieCaptureEnabled, immediatelyBeginCapture } = useContext(SelfieCaptureContext); + const { isSelfieCaptureEnabled } = useContext(SelfieCaptureContext); const fullScreenRef = useRef(null); const inputRef = useRef(null); const isForceUploading = useRef(false); @@ -349,9 +349,7 @@ function AcuantCapture( // This hook does that. const isBackOfId = name === 'back'; useLogCameraInfo({ isBackOfId, hasStartedCropping }); - const [isCapturingEnvironment, setIsCapturingEnvironment] = useState( - selfieCapture && immediatelyBeginCapture, - ); + const [isCapturingEnvironment, setIsCapturingEnvironment] = useState(selfieCapture); const { failedCaptureAttempts, diff --git a/app/javascript/packages/document-capture/context/selfie-capture.tsx b/app/javascript/packages/document-capture/context/selfie-capture.tsx index 6115ccd7f48..76b30704cf0 100644 --- a/app/javascript/packages/document-capture/context/selfie-capture.tsx +++ b/app/javascript/packages/document-capture/context/selfie-capture.tsx @@ -14,17 +14,12 @@ interface SelfieCaptureProps { * the capture component. */ showHelpInitially: boolean; - /** - * Specify whether we should try to capture using Acuant immediately - */ - immediatelyBeginCapture: boolean; } const SelfieCaptureContext = createContext({ isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: false, showHelpInitially: true, - immediatelyBeginCapture: false, }); SelfieCaptureContext.displayName = 'SelfieCaptureContext'; diff --git a/app/javascript/packs/document-capture.tsx b/app/javascript/packs/document-capture.tsx index afdf1e31857..f5222ec041d 100644 --- a/app/javascript/packs/document-capture.tsx +++ b/app/javascript/packs/document-capture.tsx @@ -178,7 +178,6 @@ render( isSelfieCaptureEnabled: getSelfieCaptureEnabled(), isSelfieDesktopTestMode: String(docAuthSelfieDesktopTestMode) === 'true', showHelpInitially: true, - immediatelyBeginCapture: false, }} > { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: false, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -49,7 +48,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: true, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -76,7 +74,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: false, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -99,7 +96,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: true, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -126,7 +122,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: true, isSelfieDesktopTestMode: false, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -155,7 +150,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: true, isSelfieDesktopTestMode: true, showHelpInitially: false, - immediatelyBeginCapture: false, }} > @@ -192,7 +186,6 @@ describe('DocumentSideAcuantCapture', () => { isSelfieCaptureEnabled: true, isSelfieDesktopTestMode: true, showHelpInitially: false, - immediatelyBeginCapture: false, }} > diff --git a/spec/javascript/packages/document-capture/components/documents-step-spec.tsx b/spec/javascript/packages/document-capture/components/documents-step-spec.tsx index 80bedd1160f..225f9573800 100644 --- a/spec/javascript/packages/document-capture/components/documents-step-spec.tsx +++ b/spec/javascript/packages/document-capture/components/documents-step-spec.tsx @@ -148,7 +148,6 @@ describe('document-capture/components/documents-step', () => { isSelfieCaptureEnabled: true, isSelfieDesktopTestMode: false, showHelpInitially: true, - immediatelyBeginCapture: true, }} > { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: false, showHelpInitially: false, - immediatelyBeginCapture: false, }} > { isSelfieCaptureEnabled: false, isSelfieDesktopTestMode: false, showHelpInitially: false, - immediatelyBeginCapture: false, }} > { 'isSelfieCaptureEnabled', 'isSelfieDesktopTestMode', 'showHelpInitially', - 'immediatelyBeginCapture', ]); expect(result.current.isSelfieCaptureEnabled).to.be.a('boolean'); });