Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
04692ef
Skeleton specs.
jmax-gsa Oct 9, 2024
de3fefc
Checkin for rebase.
jmax-gsa Oct 16, 2024
5fd9246
Removed whitespace change.
jmax-gsa Oct 16, 2024
ef9b859
Merge
jmax-gsa Oct 16, 2024
91830b2
Appearance correct
jmax-gsa Oct 18, 2024
3c88e75
Lint
jmax-gsa Oct 19, 2024
f834b96
Force selfie capture to the Acuant SDK if possible.
jmax-gsa Oct 19, 2024
035048e
Spec cleanup
jmax-gsa Oct 21, 2024
8f32384
Added I18n strings. Missing two alt text strings.
jmax-gsa Oct 21, 2024
c1bba06
Spec cleanup
jmax-gsa Oct 21, 2024
1f6805c
Tweak layout
jmax-gsa Oct 21, 2024
016a5f1
Updated alt text
jmax-gsa Oct 21, 2024
6995f07
Lint
jmax-gsa Oct 21, 2024
c93f39d
Lint
jmax-gsa Oct 21, 2024
2d0fc35
Feature specs
jmax-gsa Oct 21, 2024
e5c7786
Removed stray binding.pry
jmax-gsa Oct 21, 2024
d3741cc
Very silly lint nit.
jmax-gsa Oct 21, 2024
85f90e7
More lint
jmax-gsa Oct 21, 2024
9676e5e
More feature specs.
jmax-gsa Oct 21, 2024
7319b47
Feature spec fix.
jmax-gsa Oct 21, 2024
0fd914f
Simplified Chinese update.
jmax-gsa Oct 21, 2024
c4c52e5
Lint and more feature specs.
jmax-gsa Oct 21, 2024
d761b0e
Unbelievably minor lint.
jmax-gsa Oct 21, 2024
b6d0a1e
Normalize YAML
jmax-gsa Oct 21, 2024
907e0e5
Optimize assets
jmax-gsa Oct 21, 2024
5f926ec
More feature specs.
jmax-gsa Oct 21, 2024
baac5e4
make optimize_assets. Again.
jmax-gsa Oct 21, 2024
ecd7bd2
Feature specs.
jmax-gsa Oct 21, 2024
a8e7f3c
Feature specs.
jmax-gsa Oct 21, 2024
23926c6
Added selfie-capture-accept-help.svg to non-optimized assets
jmax-gsa Oct 21, 2024
b65b4d3
Feature specs
jmax-gsa Oct 21, 2024
5dd630f
i18n string
jmax-gsa Oct 21, 2024
af956b1
ts cleanup
jmax-gsa Oct 21, 2024
465021b
JS tidying
jmax-gsa Oct 22, 2024
d7447f1
React cleanup.
jmax-gsa Oct 22, 2024
0f2f1b1
lint
jmax-gsa Oct 22, 2024
a11502b
Fixed feature spec helper.
jmax-gsa Oct 22, 2024
6a9d9b9
Feature specs
jmax-gsa Oct 22, 2024
d8eb77d
More feature specs
jmax-gsa Oct 22, 2024
9e1bef5
Use click_button, not click
jmax-gsa Oct 22, 2024
b186eee
Feature specs
jmax-gsa Oct 22, 2024
bdf3d97
Feature specs
jmax-gsa Oct 22, 2024
3bdb598
Pulled in changes from main for ease of merging.
jmax-gsa Oct 22, 2024
cd195f1
Lint
jmax-gsa Oct 22, 2024
4eab254
Lint.
jmax-gsa Oct 22, 2024
97f1c52
Merge branch 'main' into jmax/LG-14323-add-content-about-selfie-sdk
jmax-gsa Oct 22, 2024
2d6dc4f
Lint
jmax-gsa Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ normalize_yaml: ## Normalizes YAML files (alphabetizes keys, fixes line length,
optimize_svg: ## Optimizes SVG images
# Exclusions:
# - `login-icon-bimi.svg` is hand-optimized and includes required metadata that would be stripped by SVGO
find app/assets/images public -name '*.svg' -not -name 'login-icon-bimi.svg' | xargs ./node_modules/.bin/svgo
find app/assets/images public -name '*.svg' -not -name 'login-icon-bimi.svg' -not -name 'selfie-capture-accept-help.svg' | xargs ./node_modules/.bin/svgo

optimize_assets: optimize_svg ## Optimizes all assets

Expand Down
1 change: 1 addition & 0 deletions app/assets/images/idv/selfie-capture-accept-help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/idv/selfie-capture-help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,11 @@ function AcuantCapture(
} = useContext(AcuantContext);
const { isMockClient } = useContext(UploadContext);
const { trackEvent } = useContext(AnalyticsContext);
const { isSelfieCaptureEnabled } = useContext(SelfieCaptureContext);
const { isSelfieCaptureEnabled, immediatelyBeginCapture } = useContext(SelfieCaptureContext);
const fullScreenRef = useRef<FullScreenRefHandle>(null);
const inputRef = useRef<HTMLInputElement>(null);
const isForceUploading = useRef(false);
const isSuppressingClickLogging = useRef(false);
const [isCapturingEnvironment, setIsCapturingEnvironment] = useState(false);
const [ownErrorMessage, setOwnErrorMessage] = useState<string | null>(null);
const [hasStartedCropping, setHasStartedCropping] = useState(false);
useMemo(() => setOwnErrorMessage(null), [value]);
Expand All @@ -350,6 +349,9 @@ function AcuantCapture(
// This hook does that.
const isBackOfId = name === 'back';
useLogCameraInfo({ isBackOfId, hasStartedCropping });
const [isCapturingEnvironment, setIsCapturingEnvironment] = useState(
selfieCapture && immediatelyBeginCapture,
);

const {
failedCaptureAttempts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ function AcuantSelfieCamera({
CAPTURE_ALT: t('doc_auth.info.selfie_capture.action.capture'),
};
const cleanupSelfieCamera = () => {
window.AcuantPassiveLiveness.end();
window.AcuantPassiveLiveness?.end();
setIsActive(false);
};

const startSelfieCamera = () => {
window.AcuantPassiveLiveness.start(faceCaptureCallback, faceDetectionStates);
window.AcuantPassiveLiveness?.start(faceCaptureCallback, faceDetectionStates);
setIsActive(true);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { render } from '@testing-library/react';
import AcuantSelfieInstructions from './acuant-selfie-instructions';

describe('SelfieInstructions', () => {
let getByText;
let queryAllByRole;

beforeEach(() => {
const renderedComponent = render(<AcuantSelfieInstructions />);
getByText = renderedComponent.getByText;
queryAllByRole = renderedComponent.queryAllByRole;
});

it('renders the header', () => {
expect(getByText('doc_auth.headings.selfie_instructions.howto')).to.exist();
});

it('renders the instruction graphics', () => {
expect(queryAllByRole('img').length).to.equal(2);
});

it('renders the first instruction block', () => {
expect(getByText('doc_auth.info.selfie_capture_help_1')).to.exist();
});

it('renders the second instruction block', () => {
expect(getByText('doc_auth.info.selfie_capture_help_2')).to.exist();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { getAssetPath } from '@18f/identity-assets';
import { t } from '@18f/identity-i18n';

export default function AcuantSelfieInstructions() {
return (
<>
<div className="margin-bottom-1 text-bold">
{t('doc_auth.headings.selfie_instructions.howto')}
</div>
<div className="display-flex">
<img
src={getAssetPath('idv/selfie-capture-help.svg')}
alt={t('doc_auth.alt.selfie_help_1')}
/>
<div className="margin-left-2">{t('doc_auth.info.selfie_capture_help_1')}</div>
</div>
<div className="display-flex margin-top-1">
<img
src={getAssetPath('idv/selfie-capture-accept-help.svg')}
alt={t('doc_auth.alt.selfie_help_2')}
/>
<div className="margin-left-2">{t('doc_auth.info.selfie_capture_help_2')}</div>
</div>
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function DocumentCaptureReviewIssues({
defaultSideProps={defaultSideProps}
selfieValue={value.selfie}
isReviewStep
showHelp={false}
/>
)}
<FormStepsButton.Submit />
Expand Down
Loading