From 414a0ed4183c7c232f926601fcfe38788d11d095 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Wed, 10 Jul 2019 14:26:52 -0700 Subject: [PATCH 01/54] add introduction model locale --- .../Form/Introduction/Introduction.jsx | 5 + src/config/locales/en/introduction.js | 91 +++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/src/components/Form/Introduction/Introduction.jsx b/src/components/Form/Introduction/Introduction.jsx index 9e82fada4..dec32fb22 100644 --- a/src/components/Form/Introduction/Introduction.jsx +++ b/src/components/Form/Introduction/Introduction.jsx @@ -60,6 +60,11 @@ export class Introduction extends React.Component { acceptancePara = i18n.m('introduction.acceptance.para85') break } + case formTypes.SF85P: { + introductionContent = i18n.m('introduction.contents85p') + acceptancePara = i18n.m('introduction.acceptance.para85p') + break + } default: { introductionContent = i18n.m('introduction.contents') acceptancePara = i18n.m('introduction.acceptance.para') diff --git a/src/config/locales/en/introduction.js b/src/config/locales/en/introduction.js index 88889245f..a8de40343 100644 --- a/src/config/locales/en/introduction.js +++ b/src/config/locales/en/introduction.js @@ -168,6 +168,94 @@ export const introduction = { '## Public burden information', 'Public burden reporting for this collection of information is **estimated to average 120 minutes** per response, including time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding the burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to U.S. Office of Personnel Management, National Background Investigations Bureau, Attn: OMB Number 3206-0261 1900 E Street, NW, Washington, DC 20415. The OMB clearance number, 3206-0261, is currently valid. OPM may not collect this information, and you are not required to respond, unless this number is displayed.', ], + contents85p: [ + '# Questionnaire for Public Trust Positions', + `National Background Investigation System (NBIS) eApp version ${EAPP_VERSION}`, + '**Follow instructions completely or your form will be unable to be processed. If you have any questions, contact the office that provided you the form.**', + '## Instructions for completing this form ', + '1. **Follow the instructions provided to you, by the office that gave you this form** and any other clarifying instructions, provided by that office, to assist you with completion of this form. You must sign and date, in ink, the original and each copy you submit. **You should retain a copy of the completed form for your records.**', + '2. **All questions on this form must be answered**. If no response is necessary or applicable, indicate this on the form by checking the associated "Not Applicable" checkbox, unless otherwise noted.', + '3. **Do not abbreviate the names of cities or foreign countries**. Whenever you are asked to supply a country name, you may select the country name by using the country dropdown feature.', + '4. When entering a U.S. address or location, select the state or territory from the "States" dropdown list that will be provided. For locations outside of the U.S. and its territories, select the country in the "Country" dropdown list and leave the "State" field blank.', + '5. Do not abbreviate the names of cities or foreign countries.', + '6. The 5-digit postal Zip Codes are required to process your investigation more rapidly. Refer to an automated system approved by the U.S. Postal Service to assist you with Zip Codes.', + '7. For telephone numbers in the U.S., ensure that the area code is included.', + '8. **All dates provided in this form must be in Month/Day/Year or Month/Year format**. The year should be entered as a four character number (e.g., 1978 or 2001). If you are unable to report an exact date, approximate or estimate the date to the best of your ability, and indicate this by checking the "Estimated" checkbox.', + '---', + 'All questions on this form must be answered **completely and truthfully** in order that the Government may make the determinations described below on a complete record. Penalties for inaccurate or false statements are discussed below. **If you are a current civilian employee of the federal government**: failure to answer any questions completely and truthfully could result in an adverse personnel action against you, including loss of employment; with respect to Sections 21, 25, and 27, however, neither your truthful responses nor information derived from those responses will be used as evidence against you in a subsequent criminal proceeding.', + 'Note: If you complete the SF 85P, an Authorization for Release of Medical Information Pursuant to the Health Insurance Portability and Accountability Act (HIPAA) will be provided to you only in the event information arises in an investigation that requires further inquiry for resolution, and only to resolve such issues. This release authorizes an investigator to ask your health practitioner(s) only the questions specified on the release concerning mental health consultations of which the practitioner might be aware. If you are completing the SF 85P with the supplemental SF 85P-S, this release will be provided to you if you respond “yes” to the question regarding Your Medical Record. You may also be asked to complete a specific release if more detailed information is needed from your provider.', + '---', + '## How to save your progress', + '**This form will auto save your progress continuously throughout.** Each input will be validated and save as you enter your information.', + "To confirm you're auto saving and find out when the last save was check for the save icon on each screen.", + '---', + '## Purpose of this form', + 'This form will be used by the United States (U.S.) Government in conducting background investigations and reinvestigations of persons under consideration for, or retention of, public trust positions as defined in 5 CFR 731. This form may also be used by agencies in determining whether a subject performing work for, or on behalf of, the Government under a contract should be deemed eligible for logical or physical access when duties to be performed by an employee of a contractor are equivalent to the duties performed by an employee in a public trust position. For applicants, this form is to be used only after a conditional offer of employment has been made. This form is not to be used for National Security sensitive positions.', + 'Providing this information is voluntary. If you do not provide each item of requested information, however, we will not be able to complete your investigation, which will adversely affect your eligibility for a public trust position or your ability to obtain or retain Federal or contract employment, or logical or physical access. It is imperative that the information provided be true and accurate, to the best of your knowledge. Any information that you provide is evaluated on the basis of its currency, seriousness, relevance to the position and duties, and consistency with all other information about you. Withholding, misrepresenting, or falsifying information may affect your eligibility for a public trust position, or your ability to obtain or retain Federal or contract employment. In addition, withholding, misrepresenting, or falsifying information may affect your eligibility for physical and logical access to federally controlled facilities or information systems. Withholding, misrepresenting, or falsifying information may also negatively affect your employment prospects and job status, and the potential consequences include, but are not limited to, removal, debarment from Federal service, or prosecution.', + 'This form is a permanent document that may be used as the basis for future investigations, suitability or fitness for Federal employment, fitness for contract employment, or eligibility for physical and logical access to federally controlled facilities or information systems. Your responses to this form may be compared with your responses to previous SF 85P questionnaires.', + 'The investigation conducted on the basis of information provided on this form may be selected for studies and analyses in support of evaluating and improving the effectiveness and efficiency of the investigative and adjudicative methodologies. All study results released to the general public will delete personal identifiers such as name, social security number, and date and place of birth.', + '---', + '## Authority to Request this Information', + 'Depending upon the purpose of your investigation, the U.S. Government is authorized to ask for this information under Executive Orders 13467, 10865, 12333, and 12968; sections 3301, 3302, and 9101 of title 5, United States Code (U.S.C.); sections 2165 and 2201 of title 42, U.S.C.; chapter 23 of title 50, U.S.C.; and parts 2, 5, 731, 732, and 736 of title 5, Code of Federal Regulations (CFR), and Federal information processing standards.', + 'Your Social Security Number (SSN) is needed to identify records unique to you. Although disclosure of your SSN is not mandatory, failure to disclose your SSN may prevent or delay the processing of your background investigation. The authority for soliciting and verifying your SSN is Executive Order 9397, as amended by EO 13478.', + 'Your spouse’s SSN is needed solely to allow the investigative service provider to make inquiries regarding whether there is relevant conduct on your part as a result of your relationship with your spouse. Your spouse is not subject of the investigation.', + '---', + '## The Investigative Process', + 'Background investigations for public trust positions are conducted to gather information to determine whether you are reliable, trustworthy, of good conduct and character, and loyal to the U.S. The information that you provide on this form and your Declaration for Federal Employment (OF 306) may be confirmed during the investigation. The investigation may extend beyond the time covered by this form, when necessary to resolve issues. Your current employer may be contacted as part of the investigation, although you may have previously indicated on applications or other forms that you do not want your current employer to be contacted. If you have a security freeze on your consumer or credit report file, then we may not be able to complete your investigation, which can adversely affect your eligibility for a public trust position or your ability to obtain Federal or contract employment. To avoid such delays, you must request that the consumer reporting agencies lift the freeze in these instances.', + 'In addition to the questions on this form, inquiry also is made about your adherence to security requirements your honesty and integrity, falsification, misrepresentation, and any other behavior, activities, or associations that tend to demonstrate a person is not reliable, trustworthy, or loyal.', + 'After a suitability fitness determination is made, you may also be subject to continuous vetting which may include periodic reinvestigations to ensure your continuing suitability for employment.', + '---', + '## Your Personal Interview', + 'Some investigations will include an interview with you as a routine part of the investigative process. The investigator may ask you to explain your answers to any question on this form. This provides you the opportunity to update, clarify, and explain information on your form more completely, which often assists in completing your investigation. It is imperative that the interview be conducted as soon as possible after you are contacted. Postponements will delay the processing of your investigation, and declining to be interviewed may result in your investigation being delayed or canceled.', + 'For the interview, you will be required to provide photo identification, such as a valid state driver's license. You may be required to provide other documents to verify your identity, as instructed by your investigator. These documents may include certification of any legal name change, Social Security card, passport, and/or your birth certificate. You may also be asked to provide documents regarding information that you provide on this form, or about other matters requiring specific attention. These matters include (a) alien registration or naturalization documentation; (b) delinquent loans or taxes, bankruptcies, judgments, liens, or other financial obligations; (c) agreements involving child custody or support, alimony, or property settlements; (d) arrests, convictions, probation, and/or parole; or (e) other matters described in court records.', + '---', + '## Final determination on your eligibility', + 'Final determination on your suitability for a public trust position is the responsibility of the Office of Personnel Management or the Federal agency that requested your investigation. You may be provided the opportunity to explain, refute, or clarify any information before a final decision is made. The United States Government does not discriminate on the basis of prohibited categories, including but not limited to race, color, religion, sex (including pregnancy and gender identity), national origin, disability, and sexual orientation, when making determinations of suitability for a public trust position.', + '---', + '## Penalties for inaccurate or false statements', + 'The U.S. Criminal Code (title 18, section 1001) provides that knowingly falsifying or concealing a material fact is a felony which may result in fines and/or up to five (5) years imprisonment. In addition, Federal agencies generally fire, or disqualify individuals who have materially and deliberately falsified these forms, and this remains a part of the permanent record for future placements. Your prospects of placement are better if you answer all questions truthfully and completely. You will have adequate opportunity to explain any information you provide on this form and to make your comments part of the record.', + '---', + '## Disclosure information', + 'The information you provide is for the purpose of investigating you for a position, and the information will be protected from unauthorized disclosure. The collection, maintenance, and disclosure of background investigative information are governed by the Privacy Act. The agency that requested the investigation and the agency that conducted the investigation have published notices in the Federal Register describing the systems of records in which your records will be maintained. The information you provide on this form, and information collected during an investigation, may be disclosed without your consent by an agency maintaining the information in a system of records as permitted by the Privacy Act [5 U.S.C. 552a(b)], and by routine uses, a list of which are published by the agency in the Federal Register. The office that gave you this form will provide you a copy of its routine uses.', + '---', + '## Office of Personnnel Management (OPM) Routine Uses', + 'The Privacy Act routine uses of agencies conducting or requesting investigations, or with authorized custody over your investigative information, commonly include some or all of the following:', + '**a.** To designated officers and employees of agencies, offices, and other establishments in the executive, legislative, and judicial branches of the Federal Government or the Government of the District of Columbia having a need to investigate, evaluate, or make a determination regarding loyalty to the United States; qualifications, suitability, or fitness for Government employment or military service; eligibility for logical or physical access to federally-controlled facilities or information systems; eligibility for access to classified information or to hold a sensitive position; qualifications or fitness to perform work for or on behalf of the Government under contract, grant, or other agreement; or access to restricted areas.', + '**b.** To an element of the U.S. Intelligence Community as identified in E.O. 12333, as amended, for use in intelligence activities for the purpose of protecting United States national security interests.', + '**c.** To any source from which information is requested in the course of an investigation, to the extent necessary to identify the individual, inform the source of the nature and purpose of the investigation, and to identify the type of information requested.', + '**d.** To the appropriate Federal, state, local, tribal, foreign, or other public authority responsible for investigating, prosecuting, enforcing, or implementing a statute, rule, regulation, or order where OPM becomes aware of an indication of a violation or potential violation of civil or criminal law or regulation.', + '**e.** To an agency, office, or other establishment in the executive, legislative, or judicial branches of the Federal Government in response to its request, in connection with its current employee’s, contractor employee’s, or military member’s retention; loyalty; qualifications, suitability, or fitness for employment; eligibility for logical or physical access to federally-controlled facilities or information systems; eligibility for access to classified information or to hold a sensitive position; qualifications or fitness to perform work for or on behalf of the Government under contract, grant, or other agreement; or access to restricted areas.', + '**f.** To provide information to a congressional office from the record of an individual in response to an inquiry from the congressional office made at the request of that individual. However, the investigative file, or parts thereof, will only be released to a congressional office if OPM receives a notarized authorization or signed statement under 28 U.S.C. 1746 from the subject of the investigation.', + '**g.** To disclose information to contractors, grantees, or volunteers performing or working on a contract, service, grant, cooperative agreement, or job for the Federal Government.', + '**h.** For agencies that use adjudicative support services of another agency, at the request of the original agency, the results will be furnished to the agency providing the adjudicative support.', + '**i.** To provide criminal history record information to the FBI, to help ensure the accuracy and completeness of FBI and OPM records.', + '**j.** To appropriate agencies, entities, and persons when (1) OPM suspects or has confirmed that there has been a breach of the system of records; (2) OPM has determined that as a result of the suspected or confirmed breach there is a risk of harm to individuals, the agency (including its information systems, programs and operations), the Federal Government, or national security; and (3) the disclosure made to such agencies, entities, and persons is reasonably necessary to assist in connection with OPM’s efforts to respond to the suspected or confirmed breach or to prevent, minimize, or remedy such harm.', + '**k.** To another Federal agency or Federal entity, when OPM determines that information from this system of records is reasonably necessary to assist the recipient agency or entity in (1) responding to a suspected or confirmed breach or (2) preventing, minimizing, or remedying the risk of harm to individuals, the agency (including its information systems, programs and operations), the Federal Government, or national security, resulting from a suspected or confirmed breach.', + '**l.** To disclose information to another Federal agency, to a court, or a party in litigation before a court or in an administrative proceeding being conducted by a Federal agency, when the Government is a party to the judicial or administrative proceeding. In those cases where the Government is not a party to the proceeding, records may be disclosed if a subpoena has been signed by a judge.', + '**m.** To disclose information to the National Archives and Records Administration for use in records management inspections.', + '**n.** To disclose information to the Department of Justice, or in a proceeding before a court, adjudicative body, or other administrative body before which OPM is authorized to appear, when:', + '1. OPM, or any component thereof; or', + '2. Any employee of OPM in his or her official capacity; or', + '3. Any employee of OPM in his or her individual capacity where the Department of Justice or OPM has agreed to represent the employee; or', + '4. The United States, when OPM determines that litigation is likely to affect OPM or any of its components;', + 'is a party to litigation or has an interest in such litigation, and the use of such records by the Department of Justice or OPM is deemed by OPM to be relevant and necessary to the litigation, provided, however, that the disclosure is compatible with the purpose for which records were collected.', + '**o.** For the Merit Systems Protection Board--To disclose information to officials of the Merit Systems Protection Board or the Office of the Special Counsel, when requested in connection with appeals, special studies of the civil service and other merit systems, review of OPM rules and regulations, investigations of alleged or possible prohibited personnel practices, and such other functions, e.g., as promulgated in 5 U.S.C. 1205 and 1206, or as may be authorized by law.', + '**p.** To disclose information to an agency Equal Employment Opportunity (EEO) office or to the Equal Employment Opportunity Commission when requested in connection with investigations into alleged or possible discrimination practices in the Federal sector, or in the processing of a Federal-sector EEO complaint.', + '**q.** To disclose information to the Federal Labor Relations Authority or its General Counsel when requested in connection with investigations of allegations of unfair labor practices or matters before the Federal Service Impasses Panel.', + '**r.** To another Federal agency’s Office of Inspector General when OPM becomes aware of an indication of misconduct or fraud during the applicant’s submission of the standard forms.', + '**s.** To another Federal agency’s Office of Inspector General in connection with its inspection or audit activity of the investigative or adjudicative processes and procedures of its agency as authorized by the Inspector General Act of 1978, as amended, exclusive of requests for civil or criminal law enforcement activities.', + '**t.** To a Federal agency or state unemployment compensation office upon its request in order to adjudicate a claim for unemployment compensation benefits when the claim for benefits is made as the result of a qualifications, suitability, fitness, security, identity credential, or access determination.', + '**u.** To appropriately cleared individuals in Federal agencies, to determine whether information obtained in the course of processing the background investigation is or should be classified.', + '**v.** To the Office of the Director of National Intelligence for inclusion in its Scattered Castles system in order to facilitate reciprocity of background investigations and security clearances within the intelligence community or assist agencies in obtaining information required by the Federal Investigative Standards.', + '**w.** To the Director of National Intelligence, or assignee, such information as may be requested and relevant to implement the responsibilities of the Security Executive Agent for personnel security, and pertinent personnel security research and oversight, consistent with law or executive order.', + '**x.** To Executive Branch Agency insider threat, counterintelligence, and counterterrorism officials to fulfill their responsibilities under applicable Federal law and policy, including but not limited to E.O. 12333, 13587 and the National Insider Threat Policy and Minimum Standards.', + '**y.** To the appropriate Federal, State, local, tribal, foreign, or other public authority in the event of a natural or manmade disaster. The record will be used to provide leads to assist in locating missing subjects or assist in determining the health and safety of the subject. The record will also be used to assist in identifying victims and locating any surviving next of kin.', + '**z.** To Federal, State, and local government agencies, if necessary, to obtain information from them which will assist OPM in its responsibilities as the authorized Investigation Service Provider in conducting studies and analyses in support of evaluating and improving the effectiveness and efficiency of the background investigation methodologies.', + '**aa.** aa. To an agency, office, or other establishment in the executive, legislative, or judicial branches of the Federal Government in response to its request, in connection with the classifying of jobs, the letting of a contract, or the issuance of a license, grant, or other benefit by the requesting agency, to the extent that the information is relevant and necessary to the requesting agency’s decision on the matter.', + '---', + '## Public burden information', + 'Public burden reporting for this collection of information is **estimated to average 120 minutes** per response, including time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding the burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to U.S. Office of Personnel Management, National Background Investigations Bureau, Attn: OMB Number 3206-0261 1900 E Street, NW, Washington, DC 20415. The OMB clearance number, 3206-0261, is currently valid. OPM may not collect this information, and you are not required to respond, unless this number is displayed.', + ], acceptance: { heading: 'Statement of Understanding', @@ -179,6 +267,9 @@ export const introduction = { para85: [ 'I have read the instructions and I understand that if I withhold, misrepresent, or falsify information on this form, I am subject to the penalties for inaccurate or false statement (per U. S. Criminal Code, Title 18, section 1001), or removal and debarment from Federal Service.', ], + para85p: [ + 'I have read the instructions and I understand that if I withhold, misrepresent, or falsify information on this form, I am subject to the penalties for inaccurate or false statement (per U. S. Criminal Code, Title 18, section 1001), or removal and debarment from Federal Service.', + ], aria: { yes: 'Yes, I agree to this agreement', no: 'No, I do not agree to this agreement', From e390c35fc7c41f7c0b6a45d2e5f574756ee46135 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Wed, 10 Jul 2019 14:28:05 -0700 Subject: [PATCH 02/54] add back disciplinary produces subsection in military because it belongs --- src/config/formTypes.js | 1 + src/config/forms.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config/formTypes.js b/src/config/formTypes.js index 9fb165f43..76be52c74 100644 --- a/src/config/formTypes.js +++ b/src/config/formTypes.js @@ -169,6 +169,7 @@ export const SF85P = [ formSections.MILITARY_INTRO, formSections.MILITARY_SELECTIVE, formSections.MILITARY_HISTORY, + formSections.MILITARY_DISCIPLINARY, formSections.MILITARY_FOREIGN, formSections.MILITARY_REVIEW, ], diff --git a/src/config/forms.js b/src/config/forms.js index 0eb1d694c..faa40fbad 100644 --- a/src/config/forms.js +++ b/src/config/forms.js @@ -12,7 +12,7 @@ export const SF85 = { LEGAL_INVESTIGATED_YEARS: 'EVER', LEGAL_INVESTIGATED_DENIED_CLEARANCE_YEARS: 5, LEGAL_INVESTIGATED_DEBARRED_YEARS: 5, - FORM_LABEL: 'SF-85' + FORM_LABEL: 'SF-85', } export const SF85P = { @@ -28,7 +28,7 @@ export const SF85P = { LEGAL_INVESTIGATED_YEARS: 'EVER', LEGAL_INVESTIGATED_DENIED_CLEARANCE_YEARS: 'EVER', LEGAL_INVESTIGATED_DEBARRED_YEARS: 'EVER', - FORM_LABEL: 'SF-85P' + FORM_LABEL: 'SF-85P', } export const SF86 = { @@ -46,5 +46,5 @@ export const SF86 = { LEGAL_INVESTIGATED_YEARS: 'EVER', LEGAL_INVESTIGATED_DENIED_CLEARANCE_YEARS: 'EVER', LEGAL_INVESTIGATED_DEBARRED_YEARS: 'EVER', - FORM_LABEL: 'SF-86' + FORM_LABEL: 'SF-86', } From fc07dbc1cc4e0ce14a999178f28c9a79e33c1a72 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Wed, 10 Jul 2019 17:38:09 -0700 Subject: [PATCH 03/54] update relationship/marital sections to match SF85P --- .../ForeignBornDocuments.jsx | 42 ++++++++++--------- .../RelationshipStatus/CivilUnion.jsx | 3 +- .../RelationshipStatus/Divorce.jsx | 31 +++++++------- .../RelationshipStatus/Marital.jsx | 6 +++ .../Relationships/RelationshipsConnector.jsx | 7 ++++ src/helpers/branches.js | 8 ++++ src/helpers/branches.test.js | 24 +++++++++++ src/models/__tests__/divorce.test.js | 37 ++++++++++++++-- .../__tests__/foreignBornDocument.test.js | 26 +++++++++++- src/models/divorce.js | 11 +++-- src/models/foreignBornDocument.js | 9 ++-- src/selectors/branches.js | 12 ++++++ src/validators/civilunion.js | 23 +++++++--- src/validators/foreignborndocument.js | 20 +++++++-- src/validators/marital.js | 22 +++++++++- 15 files changed, 225 insertions(+), 56 deletions(-) diff --git a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx index 4799c5fd5..19462ef60 100644 --- a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx +++ b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx @@ -67,6 +67,7 @@ export default class ForeignBornDocuments extends ValidationElement { } render() { + const { requireRelationshipMaritalForeignBornDocExpiration } = this.props return (
- - - - - + {requireRelationshipMaritalForeignBornDocExpiration && ( + + + + + + )}
) } diff --git a/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx b/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx index 03ee2fe2b..951b09807 100644 --- a/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx +++ b/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx @@ -81,7 +81,7 @@ class CivilUnion extends ValidationElement { * {name: "country", comments: "", showComments: false, value: ['germany']} * */ - + const { requireRelationshipMaritalForeignBornDocExpiration } = this.props const { country } = this.props.BirthPlace const showForeignBornDocumentation = country && countryString(country) !== 'United States' const enteredCivilUnionMinDate = pickDate([ @@ -157,6 +157,7 @@ class CivilUnion extends ValidationElement { onError={this.props.onError} required={this.props.required} scrollIntoView={this.props.scrollIntoView} + requireRelationshipMaritalForeignBornDocExpiration={requireRelationshipMaritalForeignBornDocExpiration} /> diff --git a/src/components/Section/Relationships/RelationshipStatus/Divorce.jsx b/src/components/Section/Relationships/RelationshipStatus/Divorce.jsx index b17bd6b08..313ee4544 100644 --- a/src/components/Section/Relationships/RelationshipStatus/Divorce.jsx +++ b/src/components/Section/Relationships/RelationshipStatus/Divorce.jsx @@ -115,6 +115,7 @@ export default class Divorce extends React.Component { } render() { + const { requireRelationshipMaritalDivorcePhoneNumber } = this.props const enteredCivilUnionMinDate = pickDate([this.props.applicantBirthdate, this.props.Birthdate]) return (
@@ -182,20 +183,22 @@ export default class Divorce extends React.Component { /> - - - + {requireRelationshipMaritalDivorcePhoneNumber && ( + + + + )} @@ -206,6 +211,7 @@ export class Marital extends Subsection { applicantBirthdate={this.props.applicantBirthdate} required={this.props.required} scrollIntoView={this.props.scrollIntoView} + requireRelationshipMaritalDivorcePhoneNumber={requireRelationshipMaritalDivorcePhoneNumber} /> diff --git a/src/components/Section/Relationships/RelationshipsConnector.jsx b/src/components/Section/Relationships/RelationshipsConnector.jsx index e5e4f89b0..99bfbfa11 100644 --- a/src/components/Section/Relationships/RelationshipsConnector.jsx +++ b/src/components/Section/Relationships/RelationshipsConnector.jsx @@ -1,6 +1,11 @@ import React from 'react' import { connect } from 'react-redux' +import { + selectRelationshipMaritalForeignBornDocExpiration, + selectRelationshipMaritalDivorcePhoneNumber, +} from 'selectors/branches' + import { updateApplication, reportErrors, @@ -65,6 +70,8 @@ const connectRelationshipsSection = (Component, { addressBooks: AddressBooks, applicantBirthdate, currentAddress: History && History.CurrentAddress, + ...selectRelationshipMaritalForeignBornDocExpiration(state), + ...selectRelationshipMaritalDivorcePhoneNumber(state), } case 'Cohabitants': diff --git a/src/helpers/branches.js b/src/helpers/branches.js index 3303e11ff..e214e0744 100644 --- a/src/helpers/branches.js +++ b/src/helpers/branches.js @@ -128,3 +128,11 @@ export const requireLegalOffenseIncarcerated = formType => ( export const requireLegalInvestigationClearanceGranted = formType => ( requiredByForms(formType, [formTypes.SF85]) ) + +export const requireRelationshipMaritalForeignBornDocExpiration = formType => ( + requiredByForms(formType, [formTypes.SF86]) +) + +export const requireRelationshipMaritalDivorcePhoneNumber = formType => ( + requiredByForms(formType, [formTypes.SF86]) +) diff --git a/src/helpers/branches.test.js b/src/helpers/branches.test.js index b0ecb3aa8..ca6198f2a 100644 --- a/src/helpers/branches.test.js +++ b/src/helpers/branches.test.js @@ -15,6 +15,8 @@ import { requireFinancialCreditSection, requireFinancialDelinquentSection, requireFinancialNonpaymentSection, + requireRelationshipMaritalForeignBornDocExpiration, + requireRelationshipMaritalDivorcePhoneNumber, } from './branches' describe('Branches helper function', () => { @@ -190,4 +192,26 @@ describe('Branches helper function', () => { expect(requireFinancialNonpaymentSection('SF85')).toBe(false) }) }) + + describe('requireRelationshipMaritalForeignBornDocExpiration', () => { + it('is required by the SF86', () => { + expect(requireRelationshipMaritalForeignBornDocExpiration('SF86')).toBe(true) + }) + + it('is not required by the SF85 and SF85P', () => { + expect(requireRelationshipMaritalForeignBornDocExpiration('SF85')).toBe(false) + expect(requireRelationshipMaritalForeignBornDocExpiration('SF85P')).toBe(false) + }) + }) + + describe('requireRelationshipMaritalDivorcePhoneNumber', () => { + it('is required by the SF86', () => { + expect(requireRelationshipMaritalDivorcePhoneNumber('SF86')).toBe(true) + }) + + it('is not required by the SF85 and SF85P', () => { + expect(requireRelationshipMaritalDivorcePhoneNumber('SF85')).toBe(false) + expect(requireRelationshipMaritalDivorcePhoneNumber('SF85P')).toBe(false) + }) + }) }) diff --git a/src/models/__tests__/divorce.test.js b/src/models/__tests__/divorce.test.js index 8aaf5b26f..34ae2c8b8 100644 --- a/src/models/__tests__/divorce.test.js +++ b/src/models/__tests__/divorce.test.js @@ -77,8 +77,10 @@ describe('The divorce model', () => { it('the telephone field is required', () => { const testData = {} const expectedErrors = ['Telephone.required'] - - expect(validateModel(testData, divorce)) + const options = { + requireRelationshipMaritalDivorcePhoneNumber: true, + } + expect(validateModel(testData, divorce, options)) .toEqual(expect.arrayContaining(expectedErrors)) }) @@ -87,8 +89,11 @@ describe('The divorce model', () => { Telephone: { number: '123' }, } const expectedErrors = ['Telephone.model'] + const options = { + requireRelationshipMaritalDivorcePhoneNumber: true, + } - expect(validateModel(testData, divorce)) + expect(validateModel(testData, divorce, options)) .toEqual(expect.arrayContaining(expectedErrors)) }) @@ -377,4 +382,30 @@ describe('The divorce model', () => { }) }) }) + + describe('SF85P', () => { + it('does not need a phone number', () => { + const testData = { + Status: { value: 'Widowed' }, + Name: { first: 'Person', noMiddleName: true, last: 'Spouse' }, + Birthdate: { day: 5, month: 10, year: 1980 }, + BirthPlace: { city: 'New York', state: 'NY', country: 'United States' }, + Citizenship: { value: ['United States'] }, + Telephone: {}, + Recognized: { day: 10, month: 1, year: 2001 }, + Address: { + street: '1 Main St', + city: 'New York', + state: 'NY', + zipcode: '10000', + country: 'United States', + }, + DateDivorced: { day: 1, month: 1, year: 2010 }, + } + const options = { + requireRelationshipMaritalDivorcePhoneNumber: false, + } + expect(validateModel(testData, divorce, options)).toEqual(true) + }) + }) }) diff --git a/src/models/__tests__/foreignBornDocument.test.js b/src/models/__tests__/foreignBornDocument.test.js index 474894e60..ffd55a462 100644 --- a/src/models/__tests__/foreignBornDocument.test.js +++ b/src/models/__tests__/foreignBornDocument.test.js @@ -23,8 +23,11 @@ describe('The foreign born document model', () => { it('DocumentExpiration is required', () => { const testData = {} const expectedErrors = ['DocumentExpiration.required'] + const options = { + requireRelationshipMaritalForeignBornDocExpiration: true, + } - expect(validateModel(testData, foreignBornDocument)) + expect(validateModel(testData, foreignBornDocument, options)) .toEqual(expect.arrayContaining(expectedErrors)) }) @@ -33,8 +36,11 @@ describe('The foreign born document model', () => { DocumentExpiration: 'invalid', } const expectedErrors = ['DocumentExpiration.date'] + const options = { + requireRelationshipMaritalForeignBornDocExpiration: true, + } - expect(validateModel(testData, foreignBornDocument)) + expect(validateModel(testData, foreignBornDocument, options)) .toEqual(expect.arrayContaining(expectedErrors)) }) @@ -122,4 +128,20 @@ describe('The foreign born document model', () => { expect(validateModel(testData, foreignBornDocument)).toEqual(true) }) }) + + describe('SF85P', () => { + it('validates when there is no document expiration date', () => { + const testData = { + DocumentType: { value: 'Other' }, + OtherExplanation: { value: 'Something' }, + DocumentExpiration: {}, + DocumentNumber: { value: '123' }, + } + const options = { + requireRelationshipMaritalForeignBornDocExpiration: false, + } + + expect(validateModel(testData, foreignBornDocument, options)).toEqual(true) + }) + }) }) diff --git a/src/models/divorce.js b/src/models/divorce.js index 0099b1659..69ed7ece8 100644 --- a/src/models/divorce.js +++ b/src/models/divorce.js @@ -27,9 +27,14 @@ const divorce = { validator: { length: { minimum: 1 } }, }, }, - Telephone: { - presence: true, - model: { validator: phone }, + Telephone: (value, attributes, attributeName, options) => { + if (options.requireRelationshipMaritalDivorcePhoneNumber) { + return { + presence: true, + model: { validator: phone }, + } + } + return {} }, Recognized: { presence: true, diff --git a/src/models/foreignBornDocument.js b/src/models/foreignBornDocument.js index ba55e0f9e..2bed2103a 100644 --- a/src/models/foreignBornDocument.js +++ b/src/models/foreignBornDocument.js @@ -18,9 +18,12 @@ const foreignBornDocument = { return {} }, - DocumentExpiration: (value, attributes) => { - if (attributes.DocumentExpirationNotApplicable - && attributes.DocumentExpirationNotApplicable.applicable === false) { + DocumentExpiration: (value, attributes, attributeName, options) => { + if ( + (attributes.DocumentExpirationNotApplicable + && attributes.DocumentExpirationNotApplicable.applicable === false) + || !options.requireRelationshipMaritalForeignBornDocExpiration + ) { return {} } diff --git a/src/selectors/branches.js b/src/selectors/branches.js index 9b1ed99bd..645541b9c 100644 --- a/src/selectors/branches.js +++ b/src/selectors/branches.js @@ -31,6 +31,8 @@ import { requireLegalOffenseSentenced, requireLegalOffenseIncarcerated, requireLegalInvestigationClearanceGranted, + requireRelationshipMaritalForeignBornDocExpiration, + requireRelationshipMaritalDivorcePhoneNumber, } from 'helpers/branches' import { formTypeSelector } from 'selectors/formType' @@ -137,3 +139,13 @@ export const selectLegalInvestigationClearanceGranted = createSelector(formTypeS formType => ({ requireLegalInvestigationClearanceGranted: requireLegalInvestigationClearanceGranted(formType), })) + +export const selectRelationshipMaritalForeignBornDocExpiration = createSelector(formTypeSelector, + formType => ({ + requireRelationshipMaritalForeignBornDocExpiration: requireRelationshipMaritalForeignBornDocExpiration(formType), + })) + +export const selectRelationshipMaritalDivorcePhoneNumber = createSelector(formTypeSelector, + formType => ({ + requireRelationshipMaritalDivorcePhoneNumber: requireRelationshipMaritalDivorcePhoneNumber(formType), + })) diff --git a/src/validators/civilunion.js b/src/validators/civilunion.js index 9245061ec..96b1ec082 100644 --- a/src/validators/civilunion.js +++ b/src/validators/civilunion.js @@ -1,13 +1,26 @@ import { validateModel } from 'models/validate' import civilUnion from 'models/civilUnion' - -export const validateCivilUnion = data => ( - validateModel(data, civilUnion) === true -) +import store from 'services/store' +import * as formTypes from 'constants/formTypes' +import { requireRelationshipMaritalForeignBornDocExpiration } from 'helpers/branches' + +export const validateCivilUnion = (data, formType = formTypes.SF86) => { + const isForeignBornDocExpirationRequired = requireRelationshipMaritalForeignBornDocExpiration(formType) + + return validateModel( + data, + civilUnion, + { requireRelationshipMaritalForeignBornDocExpiration: isForeignBornDocExpirationRequired }, + ) === true +} export default class CivilUnionValidator { constructor(data = {}) { + const state = store.getState() + const { formType } = state.application.Settings + this.data = data + this.formType = formType } validCitizenship() { @@ -43,6 +56,6 @@ export default class CivilUnionValidator { } isValid() { - return validateCivilUnion(this.data) + return validateCivilUnion(this.data, this.formType) } } diff --git a/src/validators/foreignborndocument.js b/src/validators/foreignborndocument.js index 3f8e20439..9bbf72865 100644 --- a/src/validators/foreignborndocument.js +++ b/src/validators/foreignborndocument.js @@ -1,13 +1,25 @@ import { validateModel } from 'models/validate' import foreignBornDocument from 'models/foreignBornDocument' +import store from 'services/store' +import * as formTypes from 'constants/formTypes' +import { requireRelationshipMaritalForeignBornDocExpiration } from 'helpers/branches' -export const validateForeignBornDocument = data => ( - validateModel(data, foreignBornDocument) === true -) +export const validateForeignBornDocument = (data, formType = formTypes.SF86) => { + const isForeignBornDocExpirationRequired = requireRelationshipMaritalForeignBornDocExpiration(formType) + return validateModel( + data, + foreignBornDocument, + { requireRelationshipMaritalForeignBornDocExpiration: isForeignBornDocExpirationRequired } + ) === true +} export default class ForeignBornDocumentValidator { constructor(data = {}) { + const state = store.getState() + const { formType } = state.application.Settings + this.data = data + this.formType = formType } validDocumentType() { @@ -29,6 +41,6 @@ export default class ForeignBornDocumentValidator { } isValid() { - return validateForeignBornDocument(this.data) + return validateForeignBornDocument(this.data, this.formType) } } diff --git a/src/validators/marital.js b/src/validators/marital.js index 83f4316f8..b319b644e 100644 --- a/src/validators/marital.js +++ b/src/validators/marital.js @@ -1,7 +1,13 @@ +import store from 'services/store' +import * as formTypes from 'constants/formTypes' import { validateModel } from 'models/validate' import civilUnion from 'models/civilUnion' import divorce from 'models/divorce' import { maritalStatusOptions, marriedOptions, previouslyMarriedOptions } from 'constants/enums/relationshipOptions' +import { + requireRelationshipMaritalForeignBornDocExpiration, + requireRelationshipMaritalDivorcePhoneNumber, +} from 'helpers/branches' const maritalModel = { Status: { @@ -45,11 +51,23 @@ const maritalModel = { }, } -export const validateMarital = data => validateModel(data, maritalModel) === true +export const validateMarital = (data, formType = formTypes.SF86) => { + const isForeignBornDocExpirationRequired = requireRelationshipMaritalForeignBornDocExpiration(formType) + const isDivorceePhoneNumberRequired = requireRelationshipMaritalDivorcePhoneNumber(formType) + const options = { + requireRelationshipMaritalForeignBornDocExpiration: isForeignBornDocExpirationRequired, + requireRelationshipMaritalDivorcePhoneNumber: isDivorceePhoneNumberRequired, + } + return validateModel(data, maritalModel, options) === true +} export default class MaritalValidator { constructor(data = {}) { + const state = store.getState() + const { formType } = state.application.Settings + this.data = data + this.formType = formType } validStatus() { @@ -63,6 +81,6 @@ export default class MaritalValidator { } isValid() { - return validateMarital(this.data) + return validateMarital(this.data, this.formType) } } From 0a0b546a08428938638bbbc9d56d14596103cdab Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Wed, 10 Jul 2019 18:09:01 -0700 Subject: [PATCH 04/54] update tests to pass --- .../Main/__snapshots__/App.test.jsx.snap | 617 +++++++++--------- .../RelationshipStatus/CivilUnion.jsx | 1 + src/config/locales/en/introduction.js | 4 +- 3 files changed, 323 insertions(+), 299 deletions(-) diff --git a/src/components/Main/__snapshots__/App.test.jsx.snap b/src/components/Main/__snapshots__/App.test.jsx.snap index cfe896bb9..bb217020a 100644 --- a/src/components/Main/__snapshots__/App.test.jsx.snap +++ b/src/components/Main/__snapshots__/App.test.jsx.snap @@ -837,13 +837,6 @@ exports[`App component for the SF85 renders the homepage 1`] = ` > Instructions - - Logout -
@@ -881,7 +874,7 @@ exports[`App component for the SF85 renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" >
Sections complete @@ -935,7 +928,7 @@ exports[`App component for the SF85 renders the homepage 1`] = ` >
  • -

    - Questionnaire for National Security Positions -

    +

    + Questionnaire for Public Trust Positions +

    @@ -2235,9 +2228,12 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    1. - Follow the instructions provided to you by the office that gave you this form + Follow the instructions provided to you, by the office that gave you this form + + and any other clarifying instructions, provided by that office, to assist you with completion of this form. You must sign and date, in ink, the original and each copy you submit. + + You should retain a copy of the completed form for your records. - and any other clarifying instructions, provided by that office, to assist you with completion of this form. You should retain a copy of the completed form for your records.
    @@ -2261,13 +2257,49 @@ exports[`App component for the SF85P renders the homepage 1`] = ` Do not abbreviate the names of cities or foreign countries - . + . Whenever you are asked to supply a country name, you may select the country name by using the country dropdown feature.
    1. +
    2. + When entering a U.S. address or location, select the state or territory from the "States" dropdown list that will be provided. For locations outside of the U.S. and its territories, select the country in the "Country" dropdown list and leave the "State" field blank. +
    3. +
    +
    +
    +
      +
    1. + Do not abbreviate the names of cities or foreign countries. +
    2. +
    +
    +
    +
      +
    1. + The 5-digit postal Zip Codes are required to process your investigation more rapidly. Refer to an automated system approved by the U.S. Postal Service to assist you with Zip Codes. +
    2. +
    +
    +
    +
      +
    1. + For telephone numbers in the U.S., ensure that the area code is included. +
    2. +
    +
    +
    +
    1. @@ -2293,6 +2325,11 @@ exports[`App component for the SF85P renders the homepage 1`] = ` failure to answer any questions completely and truthfully could result in an adverse personnel action against you, including loss of employment; with respect to these sections: Illegal Use of Drugs and Drug Activity, Use of Information Technology Systems, and Association Record, however, neither your truthful responses nor information derived from those responses will be used as evidence against you in a subsequent criminal proceeding.

    +
    +

    + Note: If you complete the SF 85P, an Authorization for Release of Medical Information Pursuant to the Health Insurance Portability and Accountability Act (HIPAA) will be provided to you only in the event information arises in an investigation that requires further inquiry for resolution, and only to resolve such issues. This release authorizes an investigator to ask your health practitioner(s) only the questions specified on the release concerning mental health consultations of which the practitioner might be aware. If you are completing the SF 85P with the supplemental SF 85P-S, this release will be provided to you if you respond “yes” to the question regarding Your Medical Record. You may also be asked to complete a specific release if more detailed information is needed from your provider. +

    +

    @@ -2324,22 +2361,22 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - This form will be used by the United States (U.S.) Government in conducting background investigations, reinvestigations, and continuous evaluations of persons under consideration for, or retention of, national security positions as defined in 5 CFR 732, and for individuals requiring eligibility for access to classified information under Executive Order 12968. This form may also be used by agencies in determining whether a subject performing work for, or on behalf of, the Government under a contract should be deemed eligible for logical or physical access when the nature of the work to be performed is sensitive and could bring about an adverse effect on the national security. + This form will be used by the United States (U.S.) Government in conducting background investigations and reinvestigations of persons under consideration for, or retention of, public trust positions as defined in 5 CFR 731. This form may also be used by agencies in determining whether a subject performing work for, or on behalf of, the Government under a contract should be deemed eligible for logical or physical access when duties to be performed by an employee of a contractor are equivalent to the duties performed by an employee in a public trust position. For applicants, this form is to be used only after a conditional offer of employment has been made. This form is not to be used for National Security sensitive positions.

    - Providing this information is voluntary. If you do not provide each item of requested information, however, we will not be able to complete your investigation, which will adversely affect your eligibility for a national security position, eligibility for access to classified information, or logical or physical access. It is imperative that the information provided be true and accurate, to the best of your knowledge. Any information that you provide is evaluated on the basis of its currency, seriousness, relevance to the position and duties, and consistency with all other information about you. Withholding, misrepresenting, or falsifying information may affect your eligibility for access to classified information, eligibility for a sensitive position, or your ability to obtain or retain Federal or contract employment. In addition, withholding, misrepresenting, or falsifying information may affect your eligibility for physical and logical access to federally controlled facilities or information systems. Withholding, misrepresenting, or falsifying information may also negatively affect your employment prospects and job status, and the potential consequences include, but are not limited to, removal, debarment from Federal service, loss of eligibility for access to classified information, or prosecution. + Providing this information is voluntary. If you do not provide each item of requested information, however, we will not be able to complete your investigation, which will adversely affect your eligibility for a public trust position or your ability to obtain or retain Federal or contract employment, or logical or physical access. It is imperative that the information provided be true and accurate, to the best of your knowledge. Any information that you provide is evaluated on the basis of its currency, seriousness, relevance to the position and duties, and consistency with all other information about you. Withholding, misrepresenting, or falsifying information may affect your eligibility for a public trust position, or your ability to obtain or retain Federal or contract employment. In addition, withholding, misrepresenting, or falsifying information may affect your eligibility for physical and logical access to federally controlled facilities or information systems. Withholding, misrepresenting, or falsifying information may also negatively affect your employment prospects and job status, and the potential consequences include, but are not limited to, removal, debarment from Federal service, or prosecution.

    - This form may become a permanent document that may be used as the basis for future investigations, eligibility determinations for access to classified information, or to hold a sensitive position, suitability or fitness for Federal employment, fitness for contract employment, or eligibility for physical and logical access to federally controlled facilities or information systems. Your responses to this form may be compared with your responses to previous SF-86 questionnaires. + This form is a permanent document that may be used as the basis for future investigations, suitability or fitness for Federal employment, fitness for contract employment, or eligibility for physical and logical access to federally controlled facilities or information systems. Your responses to this form may be compared with your responses to previous SF 85P questionnaires.

    - The investigation conducted on the basis of information provided on this form may be selected for studies and analyses in support of evaluating and improving the effectiveness and efficiency of the investigative and adjudicative methodologies. All study results released to the general public will delete personal identifiers such as name, Social Security Number, and date and place of birth. + The investigation conducted on the basis of information provided on this form may be selected for studies and analyses in support of evaluating and improving the effectiveness and efficiency of the investigative and adjudicative methodologies. All study results released to the general public will delete personal identifiers such as name, social security number, and date and place of birth.

    @@ -2347,12 +2384,12 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - Authority to request this information + Authority to Request this Information

    - Depending upon the purpose of your investigation, the U.S. Government is authorized to ask for this information under Executive Orders 10450, 10865, 12333, and 12968; sections 3301, 3302, and 9101 of title 5, United States Code (U.S.C.); sections 2165 and 2201 of title 42, U.S.C.; chapter 23 of title 50, U.S.C.; and parts 2, 5, 731, 732, and 736 of title 5, Code of Federal Regulations (CFR). + Depending upon the purpose of your investigation, the U.S. Government is authorized to ask for this information under Executive Orders 13467, 10865, 12333, and 12968; sections 3301, 3302, and 9101 of title 5, United States Code (U.S.C.); sections 2165 and 2201 of title 42, U.S.C.; chapter 23 of title 50, U.S.C.; and parts 2, 5, 731, 732, and 736 of title 5, Code of Federal Regulations (CFR), and Federal information processing standards.

    @@ -2360,27 +2397,32 @@ exports[`App component for the SF85P renders the homepage 1`] = ` Your Social Security Number (SSN) is needed to identify records unique to you. Although disclosure of your SSN is not mandatory, failure to disclose your SSN may prevent or delay the processing of your background investigation. The authority for soliciting and verifying your SSN is Executive Order 9397, as amended by EO 13478.

    +
    +

    + Your spouse’s SSN is needed solely to allow the investigative service provider to make inquiries regarding whether there is relevant conduct on your part as a result of your relationship with your spouse. Your spouse is not subject of the investigation. +

    +

    - The investigative process + The Investigative Process

    - Background investigations for national security positions are conducted to gather information to determine whether you are reliable, trustworthy, of good conduct and character, and loyal to the U.S. The information that you provide on this form may be confirmed during the investigation. The investigation may extend beyond the time covered by this form, when necessary to resolve issues. Your current employer may be contacted as part of the investigation, although you may have previously indicated on applications or other forms that you do not want your current employer to be contacted. If you have a security freeze on your consumer or credit report file, then we may not be able to complete your investigation, which can adversely affect your eligibility for a national security position. To avoid such delays, you should request that the consumer reporting agencies lift the freeze in these instances. + Background investigations for public trust positions are conducted to gather information to determine whether you are reliable, trustworthy, of good conduct and character, and loyal to the U.S. The information that you provide on this form and your Declaration for Federal Employment (OF 306) may be confirmed during the investigation. The investigation may extend beyond the time covered by this form, when necessary to resolve issues. Your current employer may be contacted as part of the investigation, although you may have previously indicated on applications or other forms that you do not want your current employer to be contacted. If you have a security freeze on your consumer or credit report file, then we may not be able to complete your investigation, which can adversely affect your eligibility for a public trust position or your ability to obtain Federal or contract employment. To avoid such delays, you must request that the consumer reporting agencies lift the freeze in these instances.

    - In addition to the questions on this form, inquiry also is made about your adherence to security requirements, your honesty and integrity, vulnerability to exploitation or coercion, falsification, misrepresentation, and any other behavior, activities, or associations that tend to demonstrate a person is not reliable, trustworthy, or loyal. Federal agency records checks may be conducted on your spouse or legally recognized civil union/domestic partner, cohabitant(s), and immediate family members. After an eligibility determination has been completed, you also may be subject to continuous evaluation, which may include periodic reinvestigations, to determine whether retention in your position is clearly consistent with the interests of national security. + In addition to the questions on this form, inquiry also is made about your adherence to security requirements your honesty and integrity, falsification, misrepresentation, and any other behavior, activities, or associations that tend to demonstrate a person is not reliable, trustworthy, or loyal.

    - The information you provide on this form may be confirmed during the investigation, and may be used for identification purposes throughout the investigation process. + After a suitability fitness determination is made, you may also be subject to continuous vetting which may include periodic reinvestigations to ensure your continuing suitability for employment.

    @@ -2388,7 +2430,7 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - Your personal interview + Your Personal Interview

    @@ -2411,7 +2453,7 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - Final determination on your eligibility for a national security position is the responsibility of the Federal agency that requested your investigation and the agency that conducted your investigation. You will be provided the opportunity to explain, refute, or clarify any information before a final decision is made, if an unfavorable decision is considered. The United States Government does not discriminate on the basis of prohibited categories, including but not limited to race, color, religion, sex (including pregnancy and gender identity), national origin, disability, or sexual orientation when granting access to classified information. + Final determination on your suitability for a public trust position is the responsibility of the Office of Personnel Management or the Federal agency that requested your investigation. You may be provided the opportunity to explain, refute, or clarify any information before a final decision is made. The United States Government does not discriminate on the basis of prohibited categories, including but not limited to race, color, religion, sex (including pregnancy and gender identity), national origin, disability, and sexual orientation, when making determinations of suitability for a public trust position.

    @@ -2424,7 +2466,7 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - The U.S. Criminal Code (title 18, section 1001) provides that knowingly falsifying or concealing a material fact is a felony which may result in fines and/or up to five (5) years imprisonment. In addition, Federal agencies generally fire, do not grant a security clearance, or disqualify individuals who have materially and deliberately falsified these forms, and this remains a part of the permanent record for future placements. Your prospects of placement or security clearance are better if you answer all questions truthfully and completely. You will have adequate opportunity to explain any information you provide on this form and to make your comments part of the record. + The U.S. Criminal Code (title 18, section 1001) provides that knowingly falsifying or concealing a material fact is a felony which may result in fines and/or up to five (5) years imprisonment. In addition, Federal agencies generally fire, or disqualify individuals who have materially and deliberately falsified these forms, and this remains a part of the permanent record for future placements. Your prospects of placement are better if you answer all questions truthfully and completely. You will have adequate opportunity to explain any information you provide on this form and to make your comments part of the record.

    @@ -2437,17 +2479,7 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - The information you provide is for the purpose of investigating you for a national security position, and the information will be protected from unauthorized disclosure. The collection, maintenance, and disclosure of background investigative information are governed by the Privacy Act. The agency that requested the investigation and the agency that conducted the investigation have published notices in the Federal Register describing the systems of records in which your records will be maintained. The information you provide on this form, and information collected during an investigation, may be disclosed without your consent by an agency maintaining the information in a system of records as permitted by the Privacy Act [5 U.S.C. 552a(b)], and by routine uses, a list of which are published by the agency in the Federal Register. The office that gave you this form will provide you a copy of its routine uses. -

    -
    -
    -

    - You will not receive prior notice of such disclosures under a routine use. -

    -
    -
    -

    - In addition to those disclosures generally permitted under the Privacy Act, all or a portion of the records or information you provide on this form or during your investigation may be disclosed outside of OPM as a routine use as outlined below. + The information you provide is for the purpose of investigating you for a position, and the information will be protected from unauthorized disclosure. The collection, maintenance, and disclosure of background investigative information are governed by the Privacy Act. The agency that requested the investigation and the agency that conducted the investigation have published notices in the Federal Register describing the systems of records in which your records will be maintained. The information you provide on this form, and information collected during an investigation, may be disclosed without your consent by an agency maintaining the information in a system of records as permitted by the Privacy Act [5 U.S.C. 552a(b)], and by routine uses, a list of which are published by the agency in the Federal Register. The office that gave you this form will provide you a copy of its routine uses.

    @@ -2460,7 +2492,7 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    - OPM has published the following Privacy Act routine uses for its system of records for background investigations: + The Privacy Act routine uses of agencies conducting or requesting investigations, or with authorized custody over your investigative information, commonly include some or all of the following:

    @@ -2605,10 +2637,15 @@ exports[`App component for the SF85P renders the homepage 1`] = ` start="4" >
  • - The United States, when OPM determines that litigation is likely to affect OPM or any of its components; is a party to litigation or has an interest in such litigation, and the use of such records by the Department of Justice or OPM is deemed by OPM to be relevant and necessary to the litigation, provided, however, that the disclosure is compatible with the purpose for which records were collected. + The United States, when OPM determines that litigation is likely to affect OPM or any of its components;
  • +
    +

    + is a party to litigation or has an interest in such litigation, and the use of such records by the Department of Justice or OPM is deemed by OPM to be relevant and necessary to the litigation, provided, however, that the disclosure is compatible with the purpose for which records were collected. +

    +

    @@ -2710,7 +2747,7 @@ exports[`App component for the SF85P renders the homepage 1`] = ` aa. - To an agency, office, or other establishment in the executive, legislative, or judicial branches of the Federal Government in response to its request, in connection with the classifying of jobs, the letting of a contract, or the issuance of a license, grant, or other benefit by the requesting agency, to the extent that the information is relevant and necessary to the requesting agency’s decision on the matter. + aa. To an agency, office, or other establishment in the executive, legislative, or judicial branches of the Federal Government in response to its request, in connection with the classifying of jobs, the letting of a contract, or the issuance of a license, grant, or other benefit by the requesting agency, to the extent that the information is relevant and necessary to the requesting agency’s decision on the matter.

    @@ -2725,9 +2762,9 @@ exports[`App component for the SF85P renders the homepage 1`] = `

    Public burden reporting for this collection of information is - estimated to average 150 minutes per response + estimated to average 120 minutes - , including time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding the burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to U.S. Office of Personnel Management, Federal Investigative Services, Attn: OMB Number 3206-0005, 1900 E Street, N.W., Washington, DC 20415. The OMB clearance number, 3206-0005, is currently valid. OPM may not collect this information, and you are not required to respond, unless this number is displayed. + per response, including time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding the burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to U.S. Office of Personnel Management, National Background Investigations Bureau, Attn: OMB Number 3206-0261 1900 E Street, NW, Washington, DC 20415. The OMB clearance number, 3206-0261, is currently valid. OPM may not collect this information, and you are not required to respond, unless this number is displayed.

    @@ -2781,7 +2818,7 @@ exports[`App component for the SF85P renders the homepage 1`] = ` >

    - I have read the instructions and I understand that if I withhold, misrepresent, or falsify information on this form, I am subject to the penalties for inaccurate or false statement (per U. S. Criminal Code, Title 18, section 1001), denial or revocation of a security clearance, and/or removal and debarment from Federal Service. + I have read the instructions and I understand that if I withhold, misrepresent, or falsify information on this form, I am subject to the penalties for inaccurate or false statement (per U. S. Criminal Code, Title 18, section 1001), or removal and debarment from Federal Service.

    @@ -3000,13 +3037,6 @@ exports[`App component for the SF85P renders the homepage 1`] = ` > Instructions -
    - Logout - @@ -3044,7 +3074,7 @@ exports[`App component for the SF85P renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" > @@ -5811,7 +5834,7 @@ exports[`App component for the SF86 renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" >
    Sections complete @@ -5865,7 +5888,7 @@ exports[`App component for the SF86 renders the homepage 1`] = ` >
  • {}, onError: (value, arr) => arr, defaultState: true, + requireRelationshipMaritalForeignBornDocExpiration: true, } export default CivilUnion diff --git a/src/config/locales/en/introduction.js b/src/config/locales/en/introduction.js index a8de40343..4953fc531 100644 --- a/src/config/locales/en/introduction.js +++ b/src/config/locales/en/introduction.js @@ -182,7 +182,7 @@ export const introduction = { '7. For telephone numbers in the U.S., ensure that the area code is included.', '8. **All dates provided in this form must be in Month/Day/Year or Month/Year format**. The year should be entered as a four character number (e.g., 1978 or 2001). If you are unable to report an exact date, approximate or estimate the date to the best of your ability, and indicate this by checking the "Estimated" checkbox.', '---', - 'All questions on this form must be answered **completely and truthfully** in order that the Government may make the determinations described below on a complete record. Penalties for inaccurate or false statements are discussed below. **If you are a current civilian employee of the federal government**: failure to answer any questions completely and truthfully could result in an adverse personnel action against you, including loss of employment; with respect to Sections 21, 25, and 27, however, neither your truthful responses nor information derived from those responses will be used as evidence against you in a subsequent criminal proceeding.', + 'All questions on this form must be answered **completely and truthfully** in order that the Government may make the determinations described below on a complete record. Penalties for inaccurate or false statements are discussed below. **If you are a current civilian employee of the federal government:** failure to answer any questions completely and truthfully could result in an adverse personnel action against you, including loss of employment; with respect to these sections: Illegal Use of Drugs and Drug Activity, Use of Information Technology Systems, and Association Record, however, neither your truthful responses nor information derived from those responses will be used as evidence against you in a subsequent criminal proceeding.', 'Note: If you complete the SF 85P, an Authorization for Release of Medical Information Pursuant to the Health Insurance Portability and Accountability Act (HIPAA) will be provided to you only in the event information arises in an investigation that requires further inquiry for resolution, and only to resolve such issues. This release authorizes an investigator to ask your health practitioner(s) only the questions specified on the release concerning mental health consultations of which the practitioner might be aware. If you are completing the SF 85P with the supplemental SF 85P-S, this release will be provided to you if you respond “yes” to the question regarding Your Medical Record. You may also be asked to complete a specific release if more detailed information is needed from your provider.', '---', '## How to save your progress', @@ -218,7 +218,7 @@ export const introduction = { '## Disclosure information', 'The information you provide is for the purpose of investigating you for a position, and the information will be protected from unauthorized disclosure. The collection, maintenance, and disclosure of background investigative information are governed by the Privacy Act. The agency that requested the investigation and the agency that conducted the investigation have published notices in the Federal Register describing the systems of records in which your records will be maintained. The information you provide on this form, and information collected during an investigation, may be disclosed without your consent by an agency maintaining the information in a system of records as permitted by the Privacy Act [5 U.S.C. 552a(b)], and by routine uses, a list of which are published by the agency in the Federal Register. The office that gave you this form will provide you a copy of its routine uses.', '---', - '## Office of Personnnel Management (OPM) Routine Uses', + '## Office of Personnel Management (OPM) Routine Uses', 'The Privacy Act routine uses of agencies conducting or requesting investigations, or with authorized custody over your investigative information, commonly include some or all of the following:', '**a.** To designated officers and employees of agencies, offices, and other establishments in the executive, legislative, and judicial branches of the Federal Government or the Government of the District of Columbia having a need to investigate, evaluate, or make a determination regarding loyalty to the United States; qualifications, suitability, or fitness for Government employment or military service; eligibility for logical or physical access to federally-controlled facilities or information systems; eligibility for access to classified information or to hold a sensitive position; qualifications or fitness to perform work for or on behalf of the Government under contract, grant, or other agreement; or access to restricted areas.', '**b.** To an element of the U.S. Intelligence Community as identified in E.O. 12333, as amended, for use in intelligence activities for the purpose of protecting United States national security interests.', From 8d6f7566a65670d76eff60f841d77d92473c5ea6 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Wed, 10 Jul 2019 18:35:49 -0700 Subject: [PATCH 05/54] update snapshot in docker --- .../Main/__snapshots__/App.test.jsx.snap | 501 +++++++++--------- 1 file changed, 261 insertions(+), 240 deletions(-) diff --git a/src/components/Main/__snapshots__/App.test.jsx.snap b/src/components/Main/__snapshots__/App.test.jsx.snap index bb217020a..bfbf8982f 100644 --- a/src/components/Main/__snapshots__/App.test.jsx.snap +++ b/src/components/Main/__snapshots__/App.test.jsx.snap @@ -837,6 +837,13 @@ exports[`App component for the SF85 renders the homepage 1`] = ` > Instructions + + Logout +
  • @@ -874,7 +881,7 @@ exports[`App component for the SF85 renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" > @@ -3074,7 +3088,7 @@ exports[`App component for the SF85P renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" > @@ -5834,7 +5855,7 @@ exports[`App component for the SF86 renders the homepage 1`] = ` className="eapp-structure-left eapp-navigation mobile-hidden" >
    Sections complete @@ -5888,7 +5909,7 @@ exports[`App component for the SF86 renders the homepage 1`] = ` >
  • Date: Wed, 10 Jul 2019 20:12:01 -0700 Subject: [PATCH 06/54] update cohabitant component so that it has flag whether the expiration date is required. and lint errors --- .../ForeignBornDocuments.jsx | 43 +++++++----- .../RelationshipStatus/Cohabitant.jsx | 70 +++++++++++-------- .../Relationships/RelationshipsConnector.jsx | 1 + 3 files changed, 65 insertions(+), 49 deletions(-) diff --git a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx index 19462ef60..f946d6fb3 100644 --- a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx +++ b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx @@ -32,37 +32,37 @@ export default class ForeignBornDocuments extends ValidationElement { DocumentExpiration: this.props.DocumentExpiration, DocumentExpirationNotApplicable: this.props .DocumentExpirationNotApplicable, - ...queue + ...queue, }) } updateDocumentType(values) { this.update({ - DocumentType: values + DocumentType: values, }) } updateOtherExplanation(values) { this.update({ - OtherExplanation: values + OtherExplanation: values, }) } updateDocumentNumber(values) { this.update({ - DocumentNumber: values + DocumentNumber: values, }) } updateDocumentExpiration(values) { this.update({ - DocumentExpiration: values + DocumentExpiration: values, }) } updateDocumentExpirationNotApplicable(values) { this.update({ - DocumentExpirationNotApplicable: values + DocumentExpirationNotApplicable: values, }) } @@ -74,14 +74,16 @@ export default class ForeignBornDocuments extends ValidationElement { help="relationships.civilUnion.help.foreignBornDocument" title={i18n.t('relationships.civilUnion.heading.foreignBornDocument')} scrollIntoView={this.props.scrollIntoView} - adjustFor="p"> + adjustFor="p" + > + onError={this.props.onError} + > + onError={this.props.onError} + > + onError={this.props.onError} + > + onError={this.props.onError} + > + onError={this.props.onError} + > + adjustFor="labels" + > + onUpdate={this.updateDocumentExpirationNotApplicable} + > {}, - onError: (value, arr) => { - return arr - } + onUpdate: () => {}, + onError: (value, arr) => arr, + requireRelationshipMaritalForeignBornDocExpiration: true, } diff --git a/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx b/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx index 098e0c137..16dada6ba 100644 --- a/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx +++ b/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx @@ -12,7 +12,7 @@ import { Suggestions, Show, Country, - Location + Location, } from '../../../Form' import { CohabitantValidator } from '../../../../validators/cohabitant' import { countryString } from '../../../../validators/location' @@ -49,7 +49,7 @@ export default class Cohabitant extends ValidationElement { Citizenship: this.props.Citizenship, CohabitationBegan: this.props.CohabitationBegan, SameSpouse: this.props.SameSpouse, - ...queue + ...queue, }) } @@ -64,7 +64,7 @@ export default class Cohabitant extends ValidationElement { Citizenship: null, CohabitationBegan: null, SameSpouse: false, - SameSpouseConfirmed: false + SameSpouseConfirmed: false, } if (this.props.onUpdate) { @@ -78,61 +78,61 @@ export default class Cohabitant extends ValidationElement { } const similarSpouse = new CohabitantValidator({ - Name: values + Name: values, }).similarSpouse(this.props.spouse) this.update({ Name: values, - SameSpouse: similarSpouse + SameSpouse: similarSpouse, }) } updateBirthdate(values) { this.update({ - Birthdate: values + Birthdate: values, }) } updateBirthPlace(values) { this.update({ - BirthPlace: values + BirthPlace: values, }) } updateForeignBornDocument(values) { this.update({ - ForeignBornDocument: values + ForeignBornDocument: values, }) } updateSSN(values) { this.update({ - SSN: values + SSN: values, }) } updateOtherNames(values) { this.update({ - OtherNames: values + OtherNames: values, }) } updateCitizenship(values) { this.update({ - Citizenship: values + Citizenship: values, }) } updateCohabitationBegan(values) { this.update({ - CohabitationBegan: values + CohabitationBegan: values, }) } renderSpouseSuggestion() { const spouse = this.props.spouse const name = spouse - ? `${spouse.first || ''} ${spouse.middle || ''} ${spouse.last || - ''}`.trim() + ? `${spouse.first || ''} ${spouse.middle || ''} ${spouse.last + || ''}`.trim() : '' return
    {name}
    } @@ -144,7 +144,7 @@ export default class Cohabitant extends ValidationElement { dismissSpouseSuggestion() { this.update({ SameSpouseConfirmed: true, - SameSpouse: false + SameSpouse: false, }) } @@ -167,6 +167,7 @@ export default class Cohabitant extends ValidationElement { } render() { + const { requireRelationshipMaritalForeignBornDocExpiration } = this.props const cohabitationBeganMinDate = pickDate([this.props.applicantBirthdate, this.props.Birthdate]) return (
    @@ -192,9 +193,10 @@ export default class Cohabitant extends ValidationElement { /> + scrollIntoView={this.props.scrollIntoView} + > + adjustFor="datecontrol" + > + scrollIntoView={this.props.scrollIntoView} + > + scrollIntoView={this.props.scrollIntoView} + > + scrollIntoView={this.props.scrollIntoView} + > @@ -286,11 +293,12 @@ export default class Cohabitant extends ValidationElement { title={i18n.t('relationships.cohabitant.heading.citizenship')} help="relationships.cohabitant.help.citizenship" scrollIntoView={this.props.scrollIntoView} - adjustFor="country"> + adjustFor="country" + > + adjustFor="datecontrol" + > {}, - onError: (value, arr) => { - return arr - } + onUpdate: () => {}, + onError: (value, arr) => arr, + requireRelationshipMaritalForeignBornDocExpiration: true, } diff --git a/src/components/Section/Relationships/RelationshipsConnector.jsx b/src/components/Section/Relationships/RelationshipsConnector.jsx index 99bfbfa11..38b6fd48d 100644 --- a/src/components/Section/Relationships/RelationshipsConnector.jsx +++ b/src/components/Section/Relationships/RelationshipsConnector.jsx @@ -79,6 +79,7 @@ const connectRelationshipsSection = (Component, { ...Relationships && Relationships.Cohabitants, spouse, applicantBirthdate, + ...selectRelationshipMaritalForeignBornDocExpiration(state), } case 'People': From 15f92a0f56895642c8919e9fa842e5f4847b1ab2 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Thu, 11 Jul 2019 07:34:56 -0700 Subject: [PATCH 07/54] update prop name in ForeignBornDocuments --- .../Form/ForeignBornDocuments/ForeignBornDocuments.jsx | 6 +++--- .../Section/Relationships/RelationshipStatus/CivilUnion.jsx | 2 +- .../Section/Relationships/RelationshipStatus/Cohabitant.jsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx index f946d6fb3..fa71ad6fc 100644 --- a/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx +++ b/src/components/Form/ForeignBornDocuments/ForeignBornDocuments.jsx @@ -67,7 +67,7 @@ export default class ForeignBornDocuments extends ValidationElement { } render() { - const { requireRelationshipMaritalForeignBornDocExpiration } = this.props + const { requireExpirationDate } = this.props return (
    - {requireRelationshipMaritalForeignBornDocExpiration && ( + {requireExpirationDate && ( {}, onError: (value, arr) => arr, - requireRelationshipMaritalForeignBornDocExpiration: true, + requireExpirationDate: true, } diff --git a/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx b/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx index 86bc484ce..aa14ea569 100644 --- a/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx +++ b/src/components/Section/Relationships/RelationshipStatus/CivilUnion.jsx @@ -157,7 +157,7 @@ class CivilUnion extends ValidationElement { onError={this.props.onError} required={this.props.required} scrollIntoView={this.props.scrollIntoView} - requireRelationshipMaritalForeignBornDocExpiration={requireRelationshipMaritalForeignBornDocExpiration} + requireExpirationDate={requireRelationshipMaritalForeignBornDocExpiration} /> diff --git a/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx b/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx index 16dada6ba..3e5d65beb 100644 --- a/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx +++ b/src/components/Section/Relationships/RelationshipStatus/Cohabitant.jsx @@ -252,7 +252,7 @@ export default class Cohabitant extends ValidationElement { onError={this.props.onError} required={this.props.required} scrollIntoView={this.props.scrollIntoView} - requireRelationshipMaritalForeignBornDocExpiration={requireRelationshipMaritalForeignBornDocExpiration} + requireExpirationDate={requireRelationshipMaritalForeignBornDocExpiration} /> From d5e221c77e293aa6e8be3169a24fe201da3ba8f9 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Thu, 11 Jul 2019 10:53:06 -0700 Subject: [PATCH 08/54] update relationships relatives for SF85P --- .../Relationships/RelationshipsConnector.jsx | 4 +++ .../Relationships/Relatives/Relative.jsx | 11 ++++-- src/helpers/branches.js | 12 +++++++ src/helpers/branches.test.js | 36 +++++++++++++++++++ src/models/__tests__/relative.test.js | 8 +++++ src/models/relative.js | 28 +++++++++------ src/selectors/branches.js | 18 ++++++++++ src/validators/relatives.js | 5 ++- 8 files changed, 109 insertions(+), 13 deletions(-) diff --git a/src/components/Section/Relationships/RelationshipsConnector.jsx b/src/components/Section/Relationships/RelationshipsConnector.jsx index 38b6fd48d..9b6e59799 100644 --- a/src/components/Section/Relationships/RelationshipsConnector.jsx +++ b/src/components/Section/Relationships/RelationshipsConnector.jsx @@ -4,6 +4,8 @@ import { connect } from 'react-redux' import { selectRelationshipMaritalForeignBornDocExpiration, selectRelationshipMaritalDivorcePhoneNumber, + selectRelationshipRelativesUSResidenceDoc, + selectRelationshipRelativesForeignGovtAffExplanation, } from 'selectors/branches' import { @@ -93,6 +95,8 @@ const connectRelationshipsSection = (Component, { ...Relationships && Relationships.Relatives, applicantBirthdate, addressBooks: AddressBooks, + ...selectRelationshipRelativesUSResidenceDoc(state), + ...selectRelationshipRelativesForeignGovtAffExplanation(state), } default: diff --git a/src/components/Section/Relationships/Relatives/Relative.jsx b/src/components/Section/Relationships/Relatives/Relative.jsx index 2d901655e..3e92903b1 100644 --- a/src/components/Section/Relationships/Relatives/Relative.jsx +++ b/src/components/Section/Relationships/Relatives/Relative.jsx @@ -25,6 +25,7 @@ import { import ConnectedAlternateAddress from 'components/Form/Location/AlternateAddress' import { RelativeValidator } from 'validators' import { countryString } from 'validators/location' +import { selectRelationshipRelativesForeignGovtAffExplanation } from 'selectors/branches' import Alias from './Alias' export default class Relative extends ValidationElement { @@ -302,6 +303,7 @@ export default class Relative extends ValidationElement { } render() { + const { requireRelationshipRelativesUSResidenceDoc } = this.props const relativeContactMinDate = pickDate([ this.props.applicantBirthdate, this.props.Birthdate, @@ -701,7 +703,8 @@ export default class Relative extends ValidationElement { - + ( export const requireRelationshipMaritalDivorcePhoneNumber = formType => ( requiredByForms(formType, [formTypes.SF86]) ) + +export const requireRelationshipRelativesForeignBornDoc = formType => ( + requiredByForms(formType, [formTypes.SF86]) +) + +export const requireRelationshipRelativesUSResidenceDoc = formType => ( + requiredByForms(formType, [formTypes.SF86]) +) + +export const requireRelationshipRelativesForeignGovtAffExplanation = formType => ( + requiredByForms(formType, [formTypes.SF86]) +) diff --git a/src/helpers/branches.test.js b/src/helpers/branches.test.js index ca6198f2a..8d15db5e8 100644 --- a/src/helpers/branches.test.js +++ b/src/helpers/branches.test.js @@ -17,6 +17,9 @@ import { requireFinancialNonpaymentSection, requireRelationshipMaritalForeignBornDocExpiration, requireRelationshipMaritalDivorcePhoneNumber, + requireRelationshipRelativesForeignBornDoc, + requireRelationshipRelativesUSResidenceDoc, + requireRelationshipRelativesForeignGovtAffExplanation, } from './branches' describe('Branches helper function', () => { @@ -214,4 +217,37 @@ describe('Branches helper function', () => { expect(requireRelationshipMaritalDivorcePhoneNumber('SF85P')).toBe(false) }) }) + + describe('requireRelationshipRelativesForeignBornDoc', () => { + it('is required by the SF86', () => { + expect(requireRelationshipRelativesForeignBornDoc('SF86')).toBe(true) + }) + + it('is not required by the SF85 and SF85P', () => { + expect(requireRelationshipRelativesForeignBornDoc('SF85')).toBe(false) + expect(requireRelationshipRelativesForeignBornDoc('SF85P')).toBe(false) + }) + }) + + describe('requireRelationshipRelativesUSResidenceDoc', () => { + it('is required by the SF86', () => { + expect(requireRelationshipRelativesUSResidenceDoc('SF86')).toBe(true) + }) + + it('is not required by the SF85 and SF85P', () => { + expect(requireRelationshipRelativesUSResidenceDoc('SF85')).toBe(false) + expect(requireRelationshipRelativesUSResidenceDoc('SF85P')).toBe(false) + }) + }) + + describe('requireRelationshipRelativesForeignGovtAffExplanation', () => { + it('is required by the SF86', () => { + expect(requireRelationshipRelativesForeignGovtAffExplanation('SF86')).toBe(true) + }) + + it('is not required by the SF85 and SF85P', () => { + expect(requireRelationshipRelativesForeignGovtAffExplanation('SF85')).toBe(false) + expect(requireRelationshipRelativesForeignGovtAffExplanation('SF85P')).toBe(false) + }) + }) }) diff --git a/src/models/__tests__/relative.test.js b/src/models/__tests__/relative.test.js index 96552926d..04085418d 100644 --- a/src/models/__tests__/relative.test.js +++ b/src/models/__tests__/relative.test.js @@ -1,4 +1,5 @@ import { validateModel } from 'models/validate' +import * as formTypes from 'constants/formTypes' import relative, { isCitizen, requireCitizenshipDocumentation, requireResidenceDocumentation, isLivingNonCitizen, @@ -47,6 +48,13 @@ describe('The requireCitizenshipDocumentation function', () => { })) .toEqual(true) }) + + it('returns false if the form is SF85P', () => { + expect(requireCitizenshipDocumentation({ + Citizenship: { value: ['United States', 'Canada'] }, + Birthplace: { country: { value: 'Canada' } }, + }, formTypes.SF85P)) + }) }) describe('The requireResidenceDocumentation function', () => { diff --git a/src/models/relative.js b/src/models/relative.js index 9481343a6..11bc82aeb 100644 --- a/src/models/relative.js +++ b/src/models/relative.js @@ -4,9 +4,14 @@ import address from 'models/shared/locations/address' import usAddress from 'models/shared/locations/usAddress' import birthplaceWithoutCounty from 'models/shared/locations/birthplaceWithoutCounty' import { hasYesOrNo } from 'models/validate' +import * as formTypes from 'constants/formTypes' +import { requireRelationshipRelativesForeignBornDoc } from 'helpers/branches' import { - MOTHER, immedateFamilyOptions, relativeCitizenshipDocumentationOptions, + MOTHER, + immedateFamilyOptions, + relativeOptions, + relativeCitizenshipDocumentationOptions, relativeResidentDocumentationOptions, } from 'constants/enums/relationshipOptions' @@ -24,15 +29,18 @@ export const isLiving = attributes => ( attributes.IsDeceased && attributes.IsDeceased.value === 'No' ) -export const requireCitizenshipDocumentation = (attributes) => { - const bornInUS = attributes.Birthplace - && attributes.Birthplace.country - && countryString(attributes.Birthplace.country) === 'United States' - - return !!(isCitizen(attributes) - && attributes.Birthplace - && attributes.Birthplace.country - && !bornInUS) +export const requireCitizenshipDocumentation = (attributes, formType = formTypes.SF86) => { + if (requireRelationshipRelativesForeignBornDoc(formType)) { + const bornInUS = attributes.Birthplace + && attributes.Birthplace.country + && countryString(attributes.Birthplace.country) === 'United States' + + return !!(isCitizen(attributes) + && attributes.Birthplace + && attributes.Birthplace.country + && !bornInUS) + } + return false } export const isLivingNonCitizen = attributes => ( diff --git a/src/selectors/branches.js b/src/selectors/branches.js index 645541b9c..3b0f28792 100644 --- a/src/selectors/branches.js +++ b/src/selectors/branches.js @@ -33,6 +33,9 @@ import { requireLegalInvestigationClearanceGranted, requireRelationshipMaritalForeignBornDocExpiration, requireRelationshipMaritalDivorcePhoneNumber, + requireRelationshipRelativesForeignBornDoc, + requireRelationshipRelativesUSResidenceDoc, + requireRelationshipRelativesForeignGovtAffExplanation, } from 'helpers/branches' import { formTypeSelector } from 'selectors/formType' @@ -149,3 +152,18 @@ export const selectRelationshipMaritalDivorcePhoneNumber = createSelector(formTy formType => ({ requireRelationshipMaritalDivorcePhoneNumber: requireRelationshipMaritalDivorcePhoneNumber(formType), })) + +export const selectRelationshipRelativesForeignBornDoc = createSelector(formTypeSelector, + formType => ({ + requireRelationshipRelativesForeignBornDoc: requireRelationshipRelativesForeignBornDoc(formType), + })) + +export const selectRelationshipRelativesUSResidenceDoc = createSelector(formTypeSelector, + formType => ({ + requireRelationshipRelativesUSResidenceDoc: requireRelationshipRelativesUSResidenceDoc(formType), + })) + +export const selectRelationshipRelativesForeignGovtAffExplanation = createSelector(formTypeSelector, + formType => ({ + requireRelationshipRelativesForeignGovtAffExplanation: requireRelationshipRelativesForeignGovtAffExplanation(formType), + })) diff --git a/src/validators/relatives.js b/src/validators/relatives.js index aee658745..f6114f641 100644 --- a/src/validators/relatives.js +++ b/src/validators/relatives.js @@ -103,7 +103,10 @@ export default class RelativesValidator { export class RelativeValidator { constructor(data = {}) { + const state = store.getState() + const { formType } = state.application.Settings this.data = data + this.formType = formType } citizen() { @@ -111,7 +114,7 @@ export class RelativeValidator { } requiresCitizenshipDocumentation() { - return requireCitizenshipDocumentation(this.data) + return requireCitizenshipDocumentation(this.data, this.formType) } validRelation() { From a882681337d70bd11d26b34ade663e59cc11c0bc Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Thu, 11 Jul 2019 11:07:27 -0700 Subject: [PATCH 09/54] add default pop to satisfy test --- src/components/Section/Relationships/Relatives/Relative.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Section/Relationships/Relatives/Relative.jsx b/src/components/Section/Relationships/Relatives/Relative.jsx index 3e92903b1..3dfcf99d1 100644 --- a/src/components/Section/Relationships/Relatives/Relative.jsx +++ b/src/components/Section/Relationships/Relatives/Relative.jsx @@ -1088,6 +1088,7 @@ Relative.defaultProps = { EmployerRelationship: {}, addressBooks: {}, addressBook: 'Relative', + requireRelationshipRelativesUSResidenceDoc: true, dispatch: () => {}, onUpdate: () => {}, onError: (value, arr) => arr, From 5378aa70eb36c79a75ed2a3023b71e434dafce88 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Mon, 15 Jul 2019 09:04:59 -0700 Subject: [PATCH 10/54] remove maintains contact from sf85p --- src/helpers/branches.js | 2 +- src/helpers/branches.test.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helpers/branches.js b/src/helpers/branches.js index 492ff90d4..e1156b646 100644 --- a/src/helpers/branches.js +++ b/src/helpers/branches.js @@ -17,7 +17,7 @@ export const requireCitizenshipForeignPassportsSection = formType => ( ) export const requireForeignMilitaryMaintainsContact = formType => ( - requiredByForms(formType, [formTypes.SF86, formTypes.SF85P]) + requiredByForms(formType, [formTypes.SF86]) ) export const requireForeignContactsSection = formType => ( diff --git a/src/helpers/branches.test.js b/src/helpers/branches.test.js index 8d15db5e8..d98efbd0e 100644 --- a/src/helpers/branches.test.js +++ b/src/helpers/branches.test.js @@ -62,7 +62,7 @@ describe('Branches helper function', () => { describe('requireCitizenshipForeignPassportsSection', () => { it('is required by the SF86 and SF85P', () => { expect(requireCitizenshipForeignPassportsSection('SF86')).toBe(true) - expect(requireHistoryFederalSection('SF85P')).toBe(true) + expect(requireCitizenshipForeignPassportsSection('SF85P')).toBe(true) }) it('is not required by the SF85', () => { @@ -71,13 +71,13 @@ describe('Branches helper function', () => { }) describe('requireForeignMilitaryMaintainsContact', () => { - it('is required by the SF86 and SF85P', () => { + it('is required by the SF86', () => { expect(requireForeignMilitaryMaintainsContact('SF86')).toBe(true) - expect(requireHistoryFederalSection('SF85P')).toBe(true) }) - it('is not required by the SF85', () => { + it('is not required by the SF85 and SF85P', () => { expect(requireForeignMilitaryMaintainsContact('SF85')).toBe(false) + expect(requireForeignMilitaryMaintainsContact('SF85P')).toBe(false) }) }) From 3521710439983c72f7ca56a57426d04a12446f12 Mon Sep 17 00:00:00 2001 From: Christopher Hui Date: Mon, 15 Jul 2019 10:37:05 -0700 Subject: [PATCH 11/54] remove questions about foreign travel in sf85p --- .../Section/Foreign/ForeignConnector.jsx | 16 +- .../Foreign/Travel/TravelQuestions.jsx | 254 ++++++++++-------- src/helpers/branches.js | 16 ++ src/helpers/branches.test.js | 48 ++++ src/selectors/branches.js | 24 ++ 5 files changed, 242 insertions(+), 116 deletions(-) diff --git a/src/components/Section/Foreign/ForeignConnector.jsx b/src/components/Section/Foreign/ForeignConnector.jsx index 4799623d3..52f929743 100644 --- a/src/components/Section/Foreign/ForeignConnector.jsx +++ b/src/components/Section/Foreign/ForeignConnector.jsx @@ -7,6 +7,10 @@ import { selectForeignActivitiesSection, selectForeignBusinessSection, selectForeignTravelSection, + selectForeignCounterIntelligence, + selectForeignExcessiveKnowledge, + selectForeignSensitiveInformation, + selectForeignThreatened, } from 'selectors/branches' import { @@ -102,7 +106,13 @@ const connectForeignSection = (Component, { case 'Voting': return { ...foreign.Voting } || {} case 'Travel': - return { ...foreign.Travel } || {} + return { + ...foreign.Travel, + ...selectForeignCounterIntelligence(state), + ...selectForeignExcessiveKnowledge(state), + ...selectForeignSensitiveInformation(state), + ...selectForeignThreatened(state), + } || {} default: return { Application: app, @@ -129,6 +139,10 @@ const connectForeignSection = (Component, { ...selectForeignActivitiesSection(state), ...selectForeignBusinessSection(state), ...selectForeignTravelSection(state), + ...selectForeignCounterIntelligence(state), + ...selectForeignExcessiveKnowledge(state), + ...selectForeignSensitiveInformation(state), + ...selectForeignThreatened(state), } } } diff --git a/src/components/Section/Foreign/Travel/TravelQuestions.jsx b/src/components/Section/Foreign/Travel/TravelQuestions.jsx index 5a8cd70f5..da1755505 100644 --- a/src/components/Section/Foreign/Travel/TravelQuestions.jsx +++ b/src/components/Section/Foreign/Travel/TravelQuestions.jsx @@ -174,6 +174,12 @@ export default class TravelQuestions extends ValidationElement { } render() { + const { + requireForeignCounterIntelligence, + requireForeignExcessiveKnowledge, + requireForeignSensitiveInformation, + requireForeignThreatened, + } = this.props return (
    - - - -