From aa8875d856cfc3c66717188c500b5e1343512029 Mon Sep 17 00:00:00 2001 From: Gary Zhao Date: Mon, 31 Jul 2023 11:47:32 -0400 Subject: [PATCH] [EASI-2990] Disable forms until all data loaded (#649) * loading state for collaborators * adding fieldset loading to addCollaborator page * adding fieldset loading to addCRTDLpage * adding fieldset loading to addCRTDLpage * adding fieldset loading to questionandreply * adding fieldset loading to Basic Task List index * adding fieldset loading to Basic Overview Task List index * adding fieldset loading to beneficiaries tasklist index * adding fieldset loading to beneficiaries people impact tasklist index * including additional loading states * adding fieldset disabled loading to the files * add fieldset disabled loading to select solution index * add loading disabled to all the things * add more * update snaps * move user event into waitfor function * Test opsEvalAndLearning spec with disabled form checks * adding error to the fieldset disabled * change the way the test is run * fix collaborator e2e test * fix discussion e2e test * Remove commented code * wip to add loading checks in cypress * using fieldest disabled based on error or loading instead of removing the entire form * phased out the query checks * phased out the query checks * phased out the query checks in characteristics.spec.js * change the way the disabled check works * phasing out the query checks in ParticipantsAndProviders.spec.js * add additional check in the clickPlanTableByName command * phased out the query checks in payments.spec.js * add a few comments for cypress test * updating snaps --------- Co-authored-by: Patrick Segura --- cypress/e2e/characteristics.spec.js | 46 +- cypress/e2e/collaborator.spec.js | 12 +- cypress/e2e/discussions.spec.js | 1 + cypress/e2e/filterGroups.spec.js | 2 + cypress/e2e/modelPlan.spec.js | 79 +- cypress/e2e/opsEvalAndLearning.spec.js | 73 +- cypress/e2e/participantsAndProviders.spec.js | 61 +- cypress/e2e/payments.spec.js | 80 +- cypress/support/model-plan-by-name.js | 1 + src/components/AskAQuestion/index.test.tsx | 9 - .../__snapshots__/index.test.tsx.snap | 24 +- src/views/ModelPlan/CRTDL/AddCRTDL/index.tsx | 31 +- .../__snapshots__/index.test.tsx.snap | 361 ++--- .../Collaborators/AddCollaborator/index.tsx | 243 +-- .../__snapshots__/index.test.tsx.snap | 27 +- src/views/ModelPlan/Collaborators/index.tsx | 25 +- .../Discussions/QuestionAndReply.tsx | 244 ++-- .../__snapshots__/index.test.tsx.snap | 1021 +++++++++++++ .../TaskList/Basics/Milestones/index.tsx | 142 +- .../__snapshots__/index.test.tsx.snap | 314 ++-- .../TaskList/Basics/Overview/index.tsx | 178 +-- .../Basics/__snapshots__/index.test.tsx.snap | 851 +++++------ src/views/ModelPlan/TaskList/Basics/index.tsx | 515 +++---- .../__snapshots__/index.test.tsx.snap | 873 +++++------ .../BeneficiaryIdentification/index.tsx | 517 +++---- .../__snapshots__/index.test.tsx.snap | 765 +++++----- .../Beneficiaries/PeopleImpact/index.tsx | 340 ++--- .../__snapshots__/index.test.tsx.snap | 689 ++++----- .../Authority/index.tsx | 492 +++---- .../__snapshots__/index.test.tsx.snap | 539 +++---- .../Involvements/index.tsx | 466 +++--- .../__snapshots__/index.test.tsx.snap | 665 ++++----- .../KeyCharacteristics/index.tsx | 608 ++++---- .../__snapshots__/index.test.tsx.snap | 759 +++++----- .../TargetsAndOptions/index.tsx | 794 +++++----- .../__snapshots__/index.test.tsx.snap | 613 ++++---- .../TaskList/GeneralCharacteristics/index.tsx | 497 ++++--- .../ITSolutions/AddCustomSolution/index.tsx | 4 +- .../AddOrUpdateOperationalNeed/index.tsx | 4 +- .../ITSolutions/AddSolution/index.tsx | 2 +- .../__snapshots__/index.test.tsx.snap | 275 ++-- .../ITSolutions/SelectSolutions/index.tsx | 190 +-- .../SolutionImplementation/index.tsx | 2 +- .../TaskList/ITSolutions/Subtasks/index.tsx | 2 +- .../__snapshots__/index.test.tsx.snap | 849 +++++------ .../CCWAndQuality/index.tsx | 476 +++--- .../__snapshots__/index.test.tsx.snap | 975 ++++++------ .../OpsEvalAndLearning/DataSharing/index.tsx | 629 ++++---- .../__snapshots__/index.test.tsx.snap | 973 ++++++------ .../OpsEvalAndLearning/Evaluation/index.tsx | 607 ++++---- .../IDDOC/__snapshots__/index.test.tsx.snap | 545 +++---- .../OpsEvalAndLearning/IDDOC/index.tsx | 314 ++-- .../__snapshots__/index.test.tsx.snap | 645 ++++---- .../IDDOCMonitoring/index.tsx | 376 ++--- .../__snapshots__/index.test.tsx.snap | 541 +++---- .../OpsEvalAndLearning/IDDOCTesting/index.tsx | 375 ++--- .../__snapshots__/index.test.tsx.snap | 521 +++---- .../OpsEvalAndLearning/Learning/index.tsx | 279 ++-- .../__snapshots__/index.test.tsx.snap | 1301 +++++++++-------- .../OpsEvalAndLearning/Performance/index.tsx | 652 +++++---- .../__snapshots__/index.test.tsx.snap | 1023 ++++++------- .../TaskList/OpsEvalAndLearning/index.tsx | 580 ++++---- .../__snapshots__/index.test.tsx.snap | 733 +++++----- .../Communication/index.tsx | 454 +++--- .../__snapshots__/index.test.tsx.snap | 695 ++++----- .../Coordination/index.tsx | 444 +++--- .../__snapshots__/index.test.tsx.snap | 841 +++++------ .../ParticipantOptions/index.tsx | 482 +++--- .../__snapshots__/index.test.tsx.snap | 1215 +++++++-------- .../ProviderOptions/index.tsx | 562 +++---- .../__snapshots__/index.test.tsx.snap | 817 ++++++----- .../ParticipantsAndProviders/index.tsx | 403 ++--- .../__snapshots__/index.test.tsx.snap | 627 ++++---- .../Payment/AnticipateDependencies/index.tsx | 366 ++--- .../__snapshots__/index.test.tsx.snap | 351 ++--- .../Payment/BeneficiaryCostSharing/index.tsx | 339 ++--- .../__snapshots__/index.test.tsx.snap | 915 ++++++------ .../Payment/ClaimsBasedPayment/index.tsx | 541 +++---- .../__snapshots__/index.test.tsx.snap | 743 +++++----- .../TaskList/Payment/Complexity/index.tsx | 392 ++--- .../__snapshots__/index.test.tsx.snap | 937 ++++++------ .../TaskList/Payment/FundingSource/index.tsx | 595 ++++---- .../__snapshots__/index.test.tsx.snap | 895 ++++++------ .../Payment/NonClaimsBasedPayment/index.tsx | 505 +++---- .../Recover/__snapshots__/index.test.tsx.snap | 591 ++++---- .../TaskList/Payment/Recover/index.tsx | 287 ++-- .../PrepareForClearance/Checklist/index.tsx | 2 +- 87 files changed, 20514 insertions(+), 19315 deletions(-) diff --git a/cypress/e2e/characteristics.spec.js b/cypress/e2e/characteristics.spec.js index eed44c46b5..f3fa4cc0cb 100644 --- a/cypress/e2e/characteristics.spec.js +++ b/cypress/e2e/characteristics.spec.js @@ -1,16 +1,6 @@ -import { aliasQuery } from '../support/graphql-test-utils'; - describe('The Model Plan General Characteristics Form', () => { beforeEach(() => { cy.localLogin({ name: 'MINT', role: 'MINT_USER_NONPROD' }); - - cy.intercept('POST', '/api/graph/query', req => { - aliasQuery(req, 'GetGeneralCharacteristics'); - aliasQuery(req, 'GetKeyCharacteristics'); - aliasQuery(req, 'GetInvolvements'); - aliasQuery(req, 'GetTargetsAndOptions'); - aliasQuery(req, 'GetAuthority'); - }); }); it('completes a Model Plan Characteristics', () => { @@ -19,19 +9,14 @@ describe('The Model Plan General Characteristics Form', () => { // Clicks the General Charactstics tasklist item cy.get('[data-testid="characteristics"]').click(); + // Page - /characteristics + cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/characteristics/ ); }); - // Page - /characteristics - - cy.wait('@GetGeneralCharacteristics') - .its('response.statusCode') - .should('eq', 200) - .wait(100); - cy.get('[data-testid="model-plan-name"]').contains('for Empty Plan'); cy.get('#plan-characteristics-is-new-model-no') @@ -74,13 +59,8 @@ describe('The Model Plan General Characteristics Form', () => { // Page - /characteristics/key-charactertics - cy.wait('@GetKeyCharacteristics') - .its('response.statusCode') - .should('eq', 200) - .wait(100); - cy.get('#plan-characteristics-alternative-payment-MIPS') - .check({ force: true }) + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -90,6 +70,7 @@ describe('The Model Plan General Characteristics Form', () => { cy.get('#plan-characteristics-key-characteristics').within(() => { cy.get("input[type='text']") + .should('not.be.disabled') .type('payment') .should('have.value', 'payment'); }); @@ -108,13 +89,8 @@ describe('The Model Plan General Characteristics Form', () => { // Page - /characteristics/involvements - cy.wait('@GetInvolvements') - .its('response.statusCode') - .should('eq', 200) - .wait(100); - cy.get('#plan-characteristics-care-coordination-involved') - .check({ force: true }) + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -148,12 +124,8 @@ describe('The Model Plan General Characteristics Form', () => { // Page - /characteristics/targets-and-options - cy.wait('@GetTargetsAndOptions') - .its('response.statusCode') - .should('eq', 200) - .wait(100); - cy.get('#plan-characteristics-geographies-targeted') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -189,12 +161,8 @@ describe('The Model Plan General Characteristics Form', () => { // Page - /characteristics/authority - cy.wait('@GetAuthority') - .its('response.statusCode') - .should('eq', 200) - .wait(100); - cy.get('#plan-characteristics-rulemaking-required') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); diff --git a/cypress/e2e/collaborator.spec.js b/cypress/e2e/collaborator.spec.js index ce093fb9d0..3952f18bbe 100644 --- a/cypress/e2e/collaborator.spec.js +++ b/cypress/e2e/collaborator.spec.js @@ -28,8 +28,11 @@ describe('The Collaborator/Team Member Form', () => { cy.get('#react-select-model-team-cedar-contact-input') .click() - .type('Jerry{enter}', { delay: 500 }) - .should('have.value', 'Jerry Seinfeld, SF13'); + .type('Jerry', { delay: 1000 }); + + cy.get('#react-select-model-team-cedar-contact-option-0') + .contains('Jerry Seinfeld, SF13') + .click(); cy.contains('button', 'Add team member').should('be.disabled'); @@ -57,7 +60,10 @@ describe('The Collaborator/Team Member Form', () => { cy.get('input').should('be.disabled'); - cy.get('select').select('Model Team').should('have.value', 'MODEL_TEAM'); + cy.get('select') + .should('not.be.disabled') + .select('Model Team') + .should('have.value', 'MODEL_TEAM'); cy.contains('button', 'Update team member').click(); diff --git a/cypress/e2e/discussions.spec.js b/cypress/e2e/discussions.spec.js index 9c19a64021..bb5adbe5ae 100644 --- a/cypress/e2e/discussions.spec.js +++ b/cypress/e2e/discussions.spec.js @@ -42,6 +42,7 @@ describe('Discussion Center', () => { cy.contains('button', 'Save answer').should('be.disabled'); cy.get('#discussion-content') + .should('not.be.disabled') .type('Model characteristics is located within the task list.') .should( 'have.value', diff --git a/cypress/e2e/filterGroups.spec.js b/cypress/e2e/filterGroups.spec.js index 9b8ba9eb61..0291af38a7 100644 --- a/cypress/e2e/filterGroups.spec.js +++ b/cypress/e2e/filterGroups.spec.js @@ -42,6 +42,8 @@ describe('Filter Group in Read Only Sections', () => { cy.get('#read-only-side-nav__wrapper').should('not.exist'); cy.get('.filtered-view-section--model-team').should('exist'); + // Clear filter after viewing the CCW filtered group view + cy.get('[data-testid="group-filter-banner"]').within(() => { cy.get('button').contains('Clear filter').click(); }); diff --git a/cypress/e2e/modelPlan.spec.js b/cypress/e2e/modelPlan.spec.js index 155667f12a..8c4cfad823 100644 --- a/cypress/e2e/modelPlan.spec.js +++ b/cypress/e2e/modelPlan.spec.js @@ -1,20 +1,6 @@ -import { aliasQuery } from '../support/graphql-test-utils'; -import verifyStatus from '../support/verifyRequestStatus'; - describe('The Model Plan Form', () => { beforeEach(() => { cy.localLogin({ name: 'MINT', role: 'MINT_USER_NONPROD' }); - - cy.intercept('POST', '/api/graph/query', req => { - aliasQuery(req, 'GetModelPlan'); - aliasQuery(req, 'GetIsCollaborator'); - aliasQuery(req, 'GetModelPlanBase'); - aliasQuery(req, 'GetModelCollaborators'); - aliasQuery(req, 'GetModelPlanInfo'); - aliasQuery(req, 'GetBasics'); - aliasQuery(req, 'GetMilestones'); - aliasQuery(req, 'GetAllModelPlans'); - }); }); it('fills out model plan name and creates plan', () => { @@ -32,45 +18,31 @@ describe('The Model Plan Form', () => { cy.contains('button', 'Next').click(); - cy.wait([ - '@GetIsCollaborator', - '@GetModelPlanBase', - '@GetModelCollaborators' - ]) - .then(verifyStatus) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/collaborators/); }); - cy.get('[data-testid="continue-to-tasklist"]').click(); - - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('[data-testid="page-loading"]').should('not.exist'); - cy.contains('h1', 'Model Plan task list'); + cy.get('[data-testid="continue-to-tasklist"]').click(); // renames a model plan cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); + cy.contains('h1', 'Model Plan task list'); + cy.contains('h3', 'Model basics'); cy.contains('button', 'Start').click(); - cy.wait('@GetModelPlanInfo') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list\/basics/); }); + cy.get('[data-testid="fieldset"]').should('not.be.disabled'); + cy.get('#plan-basics-model-name') .clear() .type('Renamed Model Plan Name') @@ -78,11 +50,6 @@ describe('The Model Plan Form', () => { cy.contains('button', 'Save and return to task list').click(); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); @@ -94,10 +61,7 @@ describe('The Model Plan Form', () => { cy.get('[data-testid="basics"]').click(); - cy.wait('@GetModelPlanInfo') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('[data-testid="fieldset"]').should('not.be.disabled'); cy.get('#plan-basics-abbreviation').type('RMP').should('have.value', 'RMP'); @@ -119,17 +83,14 @@ describe('The Model Plan Form', () => { cy.contains('button', 'Next').click(); - cy.wait('@GetBasics') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/basics\/overview/ ); }); + cy.get('[data-testid="fieldset"]').should('not.be.disabled'); + cy.get('#ModelType-Voluntary').check({ force: true }).should('be.checked'); cy.get('#ModelType-Problem') @@ -149,17 +110,14 @@ describe('The Model Plan Form', () => { cy.contains('button', 'Next').click(); - cy.wait('@GetMilestones') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/basics\/milestones/ ); }); + cy.get('[data-testid="fieldset"]').should('not.be.disabled'); + cy.contains('h3', 'Anticipated high level timeline'); cy.get('#Milestone-completeICIP') @@ -202,11 +160,6 @@ describe('The Model Plan Form', () => { cy.contains('button', 'Save and return to task list').click(); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); @@ -240,11 +193,6 @@ describe('The Model Plan Form', () => { .should('be.not.disabled') .click(); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); @@ -254,10 +202,7 @@ describe('The Model Plan Form', () => { // favorites and unfavorites a model plan cy.visit('/models'); - cy.wait('@GetAllModelPlans') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('[data-testid="page-loading"]').should('not.exist'); cy.contains('tr', 'Empty Plan').get('[data-cy="favorited"]'); diff --git a/cypress/e2e/opsEvalAndLearning.spec.js b/cypress/e2e/opsEvalAndLearning.spec.js index d00b302d87..2a209aa08f 100644 --- a/cypress/e2e/opsEvalAndLearning.spec.js +++ b/cypress/e2e/opsEvalAndLearning.spec.js @@ -6,15 +6,6 @@ describe('The Model Plan Ops Eval and Learning Form', () => { cy.intercept('POST', '/api/graph/query', req => { aliasQuery(req, 'GetModelPlan'); - aliasQuery(req, 'GetOpsEvalAndLearning'); - aliasQuery(req, 'GetIDDOC'); - aliasQuery(req, 'GetIDDOCTesting'); - aliasQuery(req, 'GetIDDOCMonitoring'); - aliasQuery(req, 'GetPerformance'); - aliasQuery(req, 'GetEvaluation'); - aliasQuery(req, 'GetCCWAndQuality'); - aliasQuery(req, 'GetDataSharing'); - aliasQuery(req, 'GetLearning'); }); }); @@ -29,18 +20,12 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Clicks the Ops Eval and Learning tasklist item cy.get('[data-testid="ops-eval-and-learning"]').click(); - cy.wait('@GetOpsEvalAndLearning') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + // Page - /ops-eval-and-learning - cy.location().should(loc => { - expect(loc.pathname).to.match( - /\/models\/.{36}\/task-list\/ops-eval-and-learning/ - ); - }); + cy.get('#ops-eval-and-learning-agency-or-state-help-YES_AGENCY_IAA').should( + 'not.be.disabled' + ); - // Page - /ops-eval-and-learning cy.get('[data-testid="model-plan-name"]').contains('for Empty Plan'); cy.get('#ops-eval-and-learning-agency-or-state-help-YES_AGENCY_IAA') @@ -89,11 +74,10 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/iddoc - cy.wait('@GetIDDOC').its('response.statusCode').should('eq', 200).wait(500); + cy.get('#ops-eval-and-learning-technical-contacts-identified-use-true') + .as('contacts') + .should('not.be.disabled'); - cy.get('#ops-eval-and-learning-technical-contacts-identified-use-true').as( - 'contacts' - ); cy.get('@contacts').check({ force: true }); cy.get('@contacts').should('be.checked'); @@ -120,10 +104,7 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/iddoc-testing - cy.wait('@GetIDDOCTesting') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-uat-needs').should('not.be.disabled'); cy.get('#ops-eval-and-learning-uat-needs') .type('Users to make sure this works correctly') @@ -162,10 +143,7 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/iddoc-monitoring - cy.wait('@GetIDDOCMonitoring') - .its('response.statusCode') - .should('eq', 200) - .wait(200); + cy.get('#ops-eval-and-learning-eft-setup-true').should('not.be.disabled'); cy.get('#ops-eval-and-learning-fulltime-or-incremental-INCREMENTAL') .check({ force: true }) @@ -196,10 +174,9 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/performance - cy.wait('@GetPerformance') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-benchmark-performance-YES_RECONCILE').should( + 'not.be.disabled' + ); cy.get('#ops-eval-and-learning-benchmark-performance-YES_RECONCILE') .check({ force: true }) @@ -245,10 +222,9 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/evaluation - cy.wait('@GetEvaluation') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-evaluation-approach-OTHER').should( + 'not.be.disabled' + ); cy.get('#ops-eval-and-learning-evaluation-approach-OTHER') .check({ force: true }) @@ -302,10 +278,7 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/ccw-and-quality - cy.wait('@GetCCWAndQuality') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-send-files-true').should('not.be.disabled'); cy.get('#ops-eval-and-learning-send-files-true') .check({ force: true }) @@ -331,10 +304,9 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/data-sharing - cy.wait('@GetDataSharing') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-data-sharing-starts').should( + 'not.be.disabled' + ); cy.get('#ops-eval-and-learning-data-sharing-starts').select('Other'); @@ -382,10 +354,9 @@ describe('The Model Plan Ops Eval and Learning Form', () => { // Page - /ops-eval-and-learning/learning - cy.wait('@GetLearning') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + cy.get('#ops-eval-and-learning-learning-systems-OTHER').should( + 'not.be.disabled' + ); cy.get('#ops-eval-and-learning-learning-systems-OTHER') .check({ force: true }) diff --git a/cypress/e2e/participantsAndProviders.spec.js b/cypress/e2e/participantsAndProviders.spec.js index c043d8ca32..809309cc2f 100644 --- a/cypress/e2e/participantsAndProviders.spec.js +++ b/cypress/e2e/participantsAndProviders.spec.js @@ -1,47 +1,28 @@ -import { aliasQuery } from '../support/graphql-test-utils'; - describe('The Model Plan Participants and Providers Form', () => { beforeEach(() => { cy.localLogin({ name: 'MINT', role: 'MINT_USER_NONPROD' }); - - cy.intercept('POST', '/api/graph/query', req => { - aliasQuery(req, 'GetModelPlan'); - aliasQuery(req, 'GetParticipantsAndProviders'); - aliasQuery(req, 'GetParticipantOptions'); - aliasQuery(req, 'GetCommunication'); - aliasQuery(req, 'GetCoordination'); - aliasQuery(req, 'GetProviderOptions'); - }); }); it('completes a Model Plan Participants and Providers', () => { cy.clickPlanTableByName('Empty Plan'); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - // Clicks the Participants and Providers tasklist item cy.get('[data-testid="participants-and-providers"]').click(); - cy.wait('@GetParticipantsAndProviders') - .its('response.statusCode') - .should('eq', 200) - .wait(500); + // Page - /participants-and-providers cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/participants-and-providers/ ); }); - - // Page - /participants-and-providers cy.get('[data-testid="model-plan-name"]').contains('for Empty Plan'); - cy.get('#participants-and-providers-participants').within(() => { - cy.get("input[type='text']").click(); - }); + cy.get('#participants-and-providers-participants') + .should('not.be.disabled') + .within(() => { + cy.get("input[type='text']").click(); + }); cy.get('[data-testid="option-MEDICARE_PROVIDERS"]') .check({ force: true }) @@ -88,12 +69,8 @@ describe('The Model Plan Participants and Providers Form', () => { // Page - /participants-and-providers/participant-options - cy.wait('@GetParticipantOptions') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.get('#participants-and-providers-expected-participants') + .should('not.be.disabled') .invoke('val', 2345) .trigger('change') .should('have.value', 2345); @@ -131,12 +108,8 @@ describe('The Model Plan Participants and Providers Form', () => { // Page - /participants-and-providers/communication - cy.wait('@GetCommunication') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.get('#participants-and-providers-communication-method-IT_TOOL') + .should('not.be.disabled') .as('communication') .check({ force: true }); cy.get('@communication').should('be.checked'); @@ -161,12 +134,8 @@ describe('The Model Plan Participants and Providers Form', () => { // Page - /participants-and-providers/coordination - cy.wait('@GetCoordination') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.get('#participants-and-providers-coordniate-work') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -190,13 +159,8 @@ describe('The Model Plan Participants and Providers Form', () => { // Page - /participants-and-providers/provider-options - cy.wait('@GetProviderOptions') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.get('#participants-and-providers-additional-frequency-OTHER') - .check({ force: true }) + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -247,11 +211,6 @@ describe('The Model Plan Participants and Providers Form', () => { cy.contains('button', 'Save and return to task list').click(); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); diff --git a/cypress/e2e/payments.spec.js b/cypress/e2e/payments.spec.js index 8dfa4a1726..9c0bbce9ba 100644 --- a/cypress/e2e/payments.spec.js +++ b/cypress/e2e/payments.spec.js @@ -1,44 +1,22 @@ -import { aliasQuery } from '../support/graphql-test-utils'; - describe('The Model Plan Payment Form', () => { beforeEach(() => { cy.localLogin({ name: 'MINT', role: 'MINT_USER_NONPROD' }); - - cy.intercept('POST', '/api/graph/query', req => { - aliasQuery(req, 'GetModelPlan'); - aliasQuery(req, 'GetFunding'); - aliasQuery(req, 'GetClaimsBasedPayment'); - aliasQuery(req, 'GetAnticipateDependencies'); - aliasQuery(req, 'GetBeneficiaryCostSharing'); - aliasQuery(req, 'GetNonClaimsBasedPayment'); - aliasQuery(req, 'GetComplexity'); - aliasQuery(req, 'GetRecover'); - }); }); it('completes a Model Plan Ops Eval and Learning form', () => { cy.clickPlanTableByName('Empty Plan'); - cy.wait('@GetModelPlan') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - // Clicks the Payment tasklist item cy.get('[data-testid="payment"]').click(); // Page - /payment - cy.wait('@GetFunding') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list\/payment/); }); cy.get('#payment-funding-source-PATIENT_PROTECTION_AFFORDABLE_CARE_ACT') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -72,17 +50,14 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/claims-based-payment - cy.wait('@GetClaimsBasedPayment') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/claims-based-payment/ ); }); + cy.get('[data-testid="fieldset"').first().should('not.be.disabled'); + cy.get('#payment-pay-claims').within(() => { cy.get("input[type='text']").click(); }); @@ -115,11 +90,6 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/anticipating-dependencies - cy.wait('@GetAnticipateDependencies') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/anticipating-dependencies/ @@ -127,6 +97,7 @@ describe('The Model Plan Payment Form', () => { }); cy.get('#payment-creating-dependencies-between-services-true') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -146,11 +117,6 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/beneficiary-cost-sharing - cy.wait('@GetBeneficiaryCostSharing') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/beneficiary-cost-sharing/ @@ -158,6 +124,7 @@ describe('The Model Plan Payment Form', () => { }); cy.get('#payment-beneficiary-cost-sharing') + .should('not.be.disabled') .type('Bill in accounting') .should('have.value', 'Bill in accounting'); @@ -177,17 +144,14 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/non-claims-based-payment - cy.wait('@GetNonClaimsBasedPayment') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/non-claims-based-payment/ ); }); + cy.get('[data-testid="fieldset"').first().should('not.be.disabled'); + cy.get('#payment-nonclaims-payments').within(() => { cy.get("input[type='text']").click(); }); @@ -222,11 +186,6 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/complexity - cy.wait('@GetComplexity') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/complexity/ @@ -234,6 +193,7 @@ describe('The Model Plan Payment Form', () => { }); cy.get('#payment-complexity-LOW') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -263,11 +223,6 @@ describe('The Model Plan Payment Form', () => { // Page - /payment/recover-payment - cy.wait('@GetRecover') - .its('response.statusCode') - .should('eq', 200) - .wait(500); - cy.location().should(loc => { expect(loc.pathname).to.match( /\/models\/.{36}\/task-list\/payment\/recover-payment/ @@ -275,6 +230,7 @@ describe('The Model Plan Payment Form', () => { }); cy.get('#payment-recover-payment-true') + .should('not.be.disabled') .check({ force: true }) .should('be.checked'); @@ -286,14 +242,14 @@ describe('The Model Plan Payment Form', () => { .type('10/26/2028') .should('have.value', '10/26/2028'); - cy.contains('button', 'Save and start next Model Plan section').should( - 'not.exist' - ); - - // Uncomment the code below once IT Lead Experience is PROD - // cy.contains('button', 'Continue to IT solutions and implementation status').click(); - // cy.location().should(loc => { - // expect(loc.pathname).to.match(/\/models\/.{36}\/task-list\/it-solutions$/); - // }); + cy.contains( + 'button', + 'Continue to IT solutions and implementation status' + ).click(); + cy.location().should(loc => { + expect(loc.pathname).to.match( + /\/models\/.{36}\/task-list\/it-solutions$/ + ); + }); }); }); diff --git a/cypress/support/model-plan-by-name.js b/cypress/support/model-plan-by-name.js index 9a3ec7d4d2..18baf02c18 100644 --- a/cypress/support/model-plan-by-name.js +++ b/cypress/support/model-plan-by-name.js @@ -5,4 +5,5 @@ Cypress.Commands.add('clickPlanTableByName', name => { cy.location().should(loc => { expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/); }); + cy.get('[data-testid="page-loading"]').should('not.exist'); }); diff --git a/src/components/AskAQuestion/index.test.tsx b/src/components/AskAQuestion/index.test.tsx index 31f1a25355..a23a7e5106 100644 --- a/src/components/AskAQuestion/index.test.tsx +++ b/src/components/AskAQuestion/index.test.tsx @@ -3,7 +3,6 @@ import { Provider } from 'react-redux'; import { MemoryRouter, Route } from 'react-router-dom'; import { MockedProvider } from '@apollo/client/testing'; import { render, screen, waitFor } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; import configureMockStore from 'redux-mock-store'; import { ASSESSMENT } from 'constants/jobCodes'; @@ -110,13 +109,5 @@ describe('Ask a Question Component', () => { expect(getByText('Type your question')).toBeInTheDocument(); }); - - const feedbackField = screen.getByRole('textbox', { - name: /Type your question/i - }); - - userEvent.type(feedbackField, 'Test feedback'); - - expect(feedbackField).toHaveValue('Test feedback'); }); }); diff --git a/src/views/ModelPlan/CRTDL/AddCRTDL/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/CRTDL/AddCRTDL/__snapshots__/index.test.tsx.snap index 695970f0d9..3ff0622aaf 100644 --- a/src/views/ModelPlan/CRTDL/AddCRTDL/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/CRTDL/AddCRTDL/__snapshots__/index.test.tsx.snap @@ -234,19 +234,19 @@ exports[`Model Plan Add CR and TDL page matches snapshot 1`] = ` - -
- -
+ + + { window.scrollTo(0, 0); }} > -
+
{ + +
+ +
-
- -
); diff --git a/src/views/ModelPlan/Collaborators/AddCollaborator/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/Collaborators/AddCollaborator/__snapshots__/index.test.tsx.snap index 4f60f1d118..1ead4d19d6 100644 --- a/src/views/ModelPlan/Collaborators/AddCollaborator/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/Collaborators/AddCollaborator/__snapshots__/index.test.tsx.snap @@ -29,212 +29,217 @@ exports[`Adding a collaborator page matches snapshot 1`] = `
-
- -
- - + +
+ +
-
- +
+ +
-
-
-
+
-
-
-
- - - Payment - - - -
-
+ + + + + + + + + + + +
-

- - - This team member will be able to view and edit anything about a model plan. Please make sure this individual should be able to do this before you proceed. +

+ + + This team member will be able to view and edit anything about a model plan. Please make sure this individual should be able to do this before you proceed. + - -

+

+
- -
- -
+ + +
{ UpdateModelPlanCollaboratorVariables >(UpdateModelPlanCollaborator); - const { data } = useQuery(GetModelPlanCollaborator, { - variables: { - id: collaboratorId - }, - skip: !collaboratorId - }); + const { data, loading: queryLoading } = useQuery( + GetModelPlanCollaborator, + { + variables: { + id: collaboratorId + }, + skip: !collaboratorId + } + ); const collaborator = data?.planCollaboratorByID ?? ({ userAccount: {} } as CollaboratorFormType); @@ -206,121 +215,125 @@ const Collaborators = () => { window.scrollTo(0, 0); }} > - - - - {flatErrors['userAccount.commonName']} - + + + {flatErrors['userAccount.commonName']} + - {collaboratorId ? ( - - ) : ( - <> - - - { - setFieldValue( - 'userAccount.commonName', - oktaUser?.displayName - ); - setFieldValue( - 'userAccount.username', - oktaUser?.username - ); - }} + {collaboratorId ? ( + - - )} - - - - - {flatErrors.teamRole} - ) => { - setFieldValue('teamRole', e.target.value); - }} - > - - {Object.keys(teamRoles).map(role => { - return ( - - ); - })} - - + {t('startTyping')} + - - - {t('searchMemberInfo')} - - + { + setFieldValue( + 'userAccount.commonName', + oktaUser?.displayName + ); + setFieldValue( + 'userAccount.username', + oktaUser?.username + ); + }} + /> + + )} + -
- - {(loading || updateLoading) && ( - - )} -
+ + {flatErrors.teamRole} + + ) => { + setFieldValue('teamRole', e.target.value); + }} + > + + {Object.keys(teamRoles).map(role => { + return ( + + ); + })} + + + + + + {t('searchMemberInfo')} + + + +
+ + {(loading || updateLoading) && ( + + )} +
+ ); diff --git a/src/views/ModelPlan/Collaborators/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/Collaborators/__snapshots__/index.test.tsx.snap index 4e8ca6a2d5..4aefd7b7c2 100644 --- a/src/views/ModelPlan/Collaborators/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/Collaborators/__snapshots__/index.test.tsx.snap @@ -71,23 +71,24 @@ exports[`Collaborator/Team Member page w/table matches snapshot 1`] = ` Add team member
-

- No associated team members -

-

- -

+
+

+ Loading the page +

{ DeleteModelPlanCollaborator ); - const { error, data, refetch } = useQuery( + const { error, data, refetch, loading } = useQuery( GetModelPlanCollaborators, { variables: { @@ -209,16 +210,18 @@ export const CollaboratorsContent = () => { {t('addTeamMemberButton')} - {collaborators.length === 0 ? ( - - ) : ( - - )} + {loading && } + {!loading && + (collaborators.length === 0 ? ( + + ) : ( + + ))}
( + const { data, loading, error } = useQuery( GetMostRecentRoleSelection ); @@ -172,132 +173,135 @@ const QuestionAndReply = ({ window.scrollTo(0, 0); }} > - - +
+ + -

{t('roleInfo')}

+

{t('roleInfo')}

- {flatErrors.userRole} + {flatErrors.userRole} - ) => { - setFieldValue('userRole', e.target.value); - }} - > - - {Object.keys(DiscussionUserRole) - .sort(sortOtherEnum) - .map(role => { - return ( - - ); - })} - + ) => { + setFieldValue('userRole', e.target.value); + }} + > + + {Object.keys(DiscussionUserRole) + .sort(sortOtherEnum) + .map(role => { + return ( + + ); + })} + - {values.userRole === DiscussionUserRole.NONE_OF_THE_ABOVE && ( -
- - - {flatErrors.userRoleDescription} - - -
- )} -
+ {values.userRole === + DiscussionUserRole.NONE_OF_THE_ABOVE && ( +
+ + + {flatErrors.userRoleDescription} + + +
+ )} + - - - {flatErrors.content} - - -
- - -
+ + {flatErrors.content} + + +
+ + +
+
); diff --git a/src/views/ModelPlan/TaskList/Basics/Milestones/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/Basics/Milestones/__snapshots__/index.test.tsx.snap index fa49635ff9..a372d9cf3f 100644 --- a/src/views/ModelPlan/TaskList/Basics/Milestones/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/Basics/Milestones/__snapshots__/index.test.tsx.snap @@ -95,6 +95,1027 @@ exports[`Model Plan Documents page matches snapshot 1`] = `
+
+
+

+ Anticipated high level timeline +

+
+
+

+ + Please be sure that the dates listed here are updated in the clearance calendar, if applicable. Contact the MINT Team at + + MINTTeam@cms.hhs.gov + + if you have any questions. + +

+
+
+
    +
  1. +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
    +
  2. +
  3. +
    + + Clearance + + +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
    +
  4. +
  5. +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
  6. +
  7. +
    + + Application period + +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
  8. +
  9. +
    + + Performance period + + +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
  10. +
  11. +
    +
    +
    + +
    + mm/dd/yyyy +
    +
    +
    + +
    + + + +
    +
    +
    +
  12. +
+
+ +
+
+ + + That is, the basic model would start at the earliest possible date but additional facets could be phased in at a later quarter. + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+ + +
+ +
+
diff --git a/src/views/ModelPlan/TaskList/Basics/Milestones/index.tsx b/src/views/ModelPlan/TaskList/Basics/Milestones/index.tsx index 9aa50503be..baacd7eded 100644 --- a/src/views/ModelPlan/TaskList/Basics/Milestones/index.tsx +++ b/src/views/ModelPlan/TaskList/Basics/Milestones/index.tsx @@ -180,72 +180,72 @@ const Milestones = () => {

- {!loading && ( - { - handleFormSubmit(); - }} - enableReinitialize - validateOnBlur={false} - validateOnChange={false} - validateOnMount={false} - innerRef={formikRef} - > - {(formikProps: FormikProps) => { - const { - errors, - handleSubmit, - setErrors, - setFieldError, - setFieldValue, - validateForm, - values - } = formikProps; - const flatErrors = flattenErrors(errors); - - const handleOnBlur = ( - e: React.ChangeEvent, - field: string - ) => { - if (e.target.value === '') { - setFieldValue(field, null); - return; - } - try { - setFieldValue(field, new Date(e.target.value).toISOString()); - delete errors[field as keyof InitialValueType]; - } catch (err) { - setFieldError(field, generalT('validDate')); - } - }; - return ( - <> - {Object.keys(errors).length > 0 && ( - - {Object.keys(flatErrors).map(key => { - return ( - - ); - })} - - )} - -
{ - handleSubmit(e); - window.scrollTo(0, 0); - }} + { + handleFormSubmit(); + }} + enableReinitialize + validateOnBlur={false} + validateOnChange={false} + validateOnMount={false} + innerRef={formikRef} + > + {(formikProps: FormikProps) => { + const { + errors, + handleSubmit, + setErrors, + setFieldError, + setFieldValue, + validateForm, + values + } = formikProps; + const flatErrors = flattenErrors(errors); + + const handleOnBlur = ( + e: React.ChangeEvent, + field: string + ) => { + if (e.target.value === '') { + setFieldValue(field, null); + return; + } + try { + setFieldValue(field, new Date(e.target.value).toISOString()); + delete errors[field as keyof InitialValueType]; + } catch (err) { + setFieldError(field, generalT('validDate')); + } + }; + return ( + <> + {Object.keys(errors).length > 0 && ( + + {Object.keys(flatErrors).map(key => { + return ( + + ); + })} + + )} + + { + handleSubmit(e); + window.scrollTo(0, 0); + }} + > +
{planBasicsMiscT('highLevelTimeline')} @@ -580,12 +580,12 @@ const Milestones = () => { {generalT('saveAndReturn')} - - - ); - }} - - )} +
+ + + ); + }} +
); diff --git a/src/views/ModelPlan/TaskList/Basics/Overview/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/Basics/Overview/__snapshots__/index.test.tsx.snap index d4d68c5855..9a01b0962e 100644 --- a/src/views/ModelPlan/TaskList/Basics/Overview/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/Basics/Overview/__snapshots__/index.test.tsx.snap @@ -99,125 +99,174 @@ exports[`Model Plan Documents page matches snapshot 1`] = ` action="#" class="tablet:grid-col-6 margin-top-6" > -
- -
-
- - -
-
+
- - -
-
-
-
-
+
+ + +
+ + +
- Problem statement - - +
+ + +
+ +

+ You only need to select the CMMI group if CMMI is selected as the main CMS component. +

-
- - -
- -
-
- -

- You only need to select the CMMI group if CMMI is selected as the main CMS component. -

-
- - -

-

-
- - -

-

-
- - -

-

-
- - -

- - -

+ Next +

-
-
-
- +
{ window.scrollTo(0, 0); }} > - - - - {flatErrors.modelName} - + - - - - - - - {modelPlanT('abbreviation.hint')} - + className="margin-top-4" + > + + + {flatErrors.modelName} + + - {flatErrors.abbreviation} - - - -
- - -

- {planBasicsMiscT('otherIdentifiersInfo1')} - - - {planBasicsMiscT('otherIdentifiersInfo2')} - - - {planBasicsMiscT('otherIdentifiersInfo3')} -

- - - - - - - {flatErrors['basics.amsModelID']} - - - - - - - - - - {flatErrors['basics.demoCode']} - - - - - -
+ + + + {modelPlanT('abbreviation.hint')} + + + + {flatErrors.abbreviation} + + + - - - - - {flatErrors['basics.modelCategory']} - - - - ) => { - setFieldValue( - 'basics.modelCategory', - e.target.value - ); - }} - > - - {Object.keys(modelCategoryConfig.options).map( - category => { - return ( - - ); +
- + > + + +

+ {planBasicsMiscT('otherIdentifiersInfo1')} + + + {planBasicsMiscT('otherIdentifiersInfo2')} + + + {planBasicsMiscT('otherIdentifiersInfo3')} +

+ + + + - -
- ( - <> -
- {Object.keys(modelCMSCenterConfig.options).map( - center => { + + + + + {flatErrors['basics.modelCategory']} + + + + ) => { + setFieldValue( + 'basics.modelCategory', + e.target.value + ); + }} + > + + {Object.keys(modelCategoryConfig.options).map( + category => { + return ( + + ); + } + )} + + + + +
+ ( + <> + + + + {flatErrors['basics.cmsCenters']} + + + {Object.keys( + modelCMSCenterConfig.options + ).map(center => { return ( { }} /> ); - } - )} - - {values.basics.cmsCenters.includes( - CMSCenter.OTHER - ) && ( - - - - {flatErrors['basics.cmsOther']} - - - - )} - - )} - /> -
-
- - + )} + + )} + /> + +
+ - {planBasicsT('cmmiGroups.question')} - + -

- {planBasicsT('cmmiGroups.hint')} -

+

+ {planBasicsT('cmmiGroups.hint')} +

- - {flatErrors['basics.cmmiGroups']} - - {Object.keys(CMMIGroup).map(group => { - return ( - - - - ); - })} -
- -
+ + {flatErrors['basics.cmmiGroups']} + + {Object.keys(CMMIGroup).map(group => { + return ( + + + + ); + })} + + +
+ +
-
- + diff --git a/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/__snapshots__/index.test.tsx.snap index 7f4c4a98c3..defbd21620 100644 --- a/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/__snapshots__/index.test.tsx.snap @@ -109,81 +109,106 @@ exports[`Model Plan Beneficiaries matches snapshot 1`] = ` class="margin-top-6" data-testid="beneficiaries-identification-form" > -
- -
-
- - + Who are the beneficiaries of this model? Select all that apply. + +
+ +
- 2 selected +
+ 2 selected +
+
+ +
- + + + -
-
-
- - -
+
+ + +
-
- - -
-
-
-

- Selected groups -

-
    -
  • + Selected groups + +
      - - Medicaid - - - - - - -
    • - + + + + +
    • +
    • - Other - - - - - -
    • -
    + Other + + + + + +
  • +
+
-
-
- - -
-
- - -
-
-
-
- -
-
- - -
-
- -
-
-
- - + + +
- +
-
-
-
-
- -
+ + +
+
+ + +
+
+ + +
+
- - + + +
-
+
+
+
+ + +
+
- - + + +
- +
-
- - -
+ Next +
- -
-
- + diff --git a/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/index.tsx b/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/index.tsx index 9c93932717..51d17850d9 100644 --- a/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/index.tsx +++ b/src/views/ModelPlan/TaskList/Beneficiaries/BeneficiaryIdentification/index.tsx @@ -214,292 +214,297 @@ const BeneficiaryIdentification = () => { handleSubmit(e); }} > - - - - {flatErrors.beneficiaries} - - - { - setFieldValue('beneficiaries', value); - }} - initialValues={initialValues.beneficiaries} - /> - - {(values?.beneficiaries || []).includes( - BeneficiariesType.OTHER - ) && ( - - - - {flatErrors.beneficiariesOther} - - - - )} + {t('beneficiaries')} + + + {flatErrors.beneficiaries} + - {(values?.beneficiaries || []).includes( - BeneficiariesType.NA - ) && ( - - {t('beneficiariesNA')} - - )} - - - - - - - - {flatErrors.treatDualElligibleDifferent} - -
{ - setFieldValue( - 'treatDualElligibleDifferent', - 'YES' - ); + as={MultiSelect} + id="beneficiaries-beneficiaries" + name="beneficiaries" + ariaLabel="label-beneficiaries-beneficiaries" + options={mappedBeneficiariesType} + selectedLabel={t('selectedGroup')} + onChange={(value: string[] | []) => { + setFieldValue('beneficiaries', value); }} + initialValues={initialValues.beneficiaries} /> - {values?.treatDualElligibleDifferent === - TriStateAnswer.YES && ( + {(values?.beneficiaries || []).includes( + BeneficiariesType.OTHER + ) && ( - {flatErrors.treatDualElligibleDifferentHow} + {flatErrors.beneficiariesOther} )} - { - setFieldValue( - 'treatDualElligibleDifferent', - 'NO' - ); - }} - /> - { - setFieldValue( - 'treatDualElligibleDifferent', - 'TBD' - ); - }} - /> -
- -
- - - - {flatErrors.excludeCertainCharacteristics} - -
- { - setFieldValue( - 'excludeCertainCharacteristics', - 'YES' - ); - }} + {(values?.beneficiaries || []).includes( + BeneficiariesType.NA + ) && ( + + {t('beneficiariesNA')} + + )} + + + - {values?.excludeCertainCharacteristics === - TriStateAnswer.YES && ( - + + + {flatErrors.treatDualElligibleDifferent} + +
+ - - - { - flatErrors.excludeCertainCharacteristicsCriteria + onChange={() => { + setFieldValue( + 'treatDualElligibleDifferent', + 'YES' + ); + }} + /> + + {values?.treatDualElligibleDifferent === + TriStateAnswer.YES && ( + - + + + {flatErrors.treatDualElligibleDifferentHow} + + + + )} + { + setFieldValue( + 'treatDualElligibleDifferent', + 'NO' + ); + }} + /> + { + setFieldValue( + 'treatDualElligibleDifferent', + 'TBD' + ); + }} + /> +
+ +
+ + + + + {flatErrors.excludeCertainCharacteristics} + +
+ { + setFieldValue( + 'excludeCertainCharacteristics', + 'YES' + ); + }} + /> + + {values?.excludeCertainCharacteristics === + TriStateAnswer.YES && ( + - - )} + > + + + { + flatErrors.excludeCertainCharacteristicsCriteria + } + + + + )} - { - setFieldValue( - 'excludeCertainCharacteristics', - 'NO' - ); - }} - /> - { - setFieldValue( - 'excludeCertainCharacteristics', - 'TBD' - ); - }} + { + setFieldValue( + 'excludeCertainCharacteristics', + 'NO' + ); + }} + /> + { + setFieldValue( + 'excludeCertainCharacteristics', + 'TBD' + ); + }} + /> +
+ -
- -
+ -
- +
+ - - + diff --git a/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/__snapshots__/index.test.tsx.snap index 96fd7a0a22..ae2522b621 100644 --- a/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/__snapshots__/index.test.tsx.snap @@ -109,240 +109,265 @@ exports[`Model Plan Beneficiaries matches snapshot 1`] = ` class="margin-top-6" data-testid="beneficiaries-people-impact-form" > -
- -
- - 0 - - - 10,000+ - -
- - - -
-
- - -
+ How many people do you think will be impacted by this model? + +
- - + + 0 + + + 10,000+ +
-
- - -
-
+ +
- - + + +
- -
- -
-
- - + How will you choose beneficiaries? Select all that apply. + +
+ +
- 2 selected +
+ 2 selected +
+
+ +
- + + + -
-
-
- - -
+
+ + +
-
- - -
-
-
-

- Selected methods -

-
    -
  • + Selected methods + +
      - - Historical claims - - - - - - -
    • - + + + + +
    • +
    • - Other - - - - - -
    • -
    + Other + + + + + +
  • +
+
-
-
- - -
-
- + + +
- -
- + + +
- - + diff --git a/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/index.tsx b/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/index.tsx index 202bab9cc3..b728fd671a 100644 --- a/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/index.tsx +++ b/src/views/ModelPlan/TaskList/Beneficiaries/PeopleImpact/index.tsx @@ -211,184 +211,194 @@ const PeopleImpact = () => { handleSubmit(e); }} > - - - - {flatErrors.numberPeopleImpacted} - - ) => { - setFieldValue( - 'numberPeopleImpacted', - Number(e.target.value) - ); - }} - /> -
- {t('zero')} - {t('tenThousand')} -
- - - {flatErrors.numberPeopleImpacted} - - - ) => { - if (Number.isNaN(e.target.value)) return; - setFieldValue( - 'numberPeopleImpacted', - Number(e.target.value) - ); - }} - /> + + + {flatErrors.numberPeopleImpacted} + + + ) => { + setFieldValue( + 'numberPeopleImpacted', + Number(e.target.value) + ); + }} + /> +
+ {t('zero')} + {t('tenThousand')} +
+ + + {flatErrors.numberPeopleImpacted} + + + ) => { + if (Number.isNaN(e.target.value)) return; + setFieldValue( + 'numberPeopleImpacted', + Number(e.target.value) + ); + }} + /> - - - {flatErrors.participantsCurrentlyInModels} - -
- {[ - ConfidenceType.NOT_AT_ALL, - ConfidenceType.SLIGHTLY, - ConfidenceType.FAIRLY, - ConfidenceType.COMPLETELY - ].map(key => ( - { - setFieldValue('estimateConfidence', key); - }} - /> - ))} -
- -
+ + + {flatErrors.participantsCurrentlyInModels} + +
+ {[ + ConfidenceType.NOT_AT_ALL, + ConfidenceType.SLIGHTLY, + ConfidenceType.FAIRLY, + ConfidenceType.COMPLETELY + ].map(key => ( + { + setFieldValue('estimateConfidence', key); + }} + /> + ))} +
+ + - - - - {flatErrors.beneficiarySelectionMethod} - + + + {flatErrors.beneficiarySelectionMethod} + - { - setFieldValue('beneficiarySelectionMethod', value); - }} - initialValues={ - initialValues.beneficiarySelectionMethod - } - /> + { + setFieldValue( + 'beneficiarySelectionMethod', + value + ); + }} + initialValues={ + initialValues.beneficiarySelectionMethod + } + /> - {(values?.beneficiarySelectionMethod || []).includes( - SelectionMethodType.OTHER - ) && ( - - - - {flatErrors.beneficiarySelectionOther} - - - - )} + + + {flatErrors.beneficiarySelectionOther} + + + + )} - - + + -
+
+ + +
- -
- + diff --git a/src/views/ModelPlan/TaskList/GeneralCharacteristics/Authority/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/GeneralCharacteristics/Authority/__snapshots__/index.test.tsx.snap index 004cd88bf8..618789b60b 100644 --- a/src/views/ModelPlan/TaskList/GeneralCharacteristics/Authority/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/GeneralCharacteristics/Authority/__snapshots__/index.test.tsx.snap @@ -97,286 +97,380 @@ exports[`Model Plan Characteristics matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="plan-characteristics-authority-form" > -
- -
-
- - -
-
+
+ - + + +
-
-
- - -
- - -
-
+ + +
- - Add an additional note - -
- - What authority allows CMMI to test the model? - -
- -
+ - 3021 (ACA) - -

- -

- -
-
+
+
+ + +
- -
-
-
-

-
-

- Model Plan status -

-
- - -

-

-
-

-
-
-
- - -
- +
{ handleSubmit(e); }} > - - - {flatErrors.rulemakingRequired} -
- { - setFieldValue('rulemakingRequired', true); - }} - /> - {values.rulemakingRequired === true && ( -
- - - - {flatErrors.rulemakingRequiredDescription} - - + + + + {flatErrors.rulemakingRequired} + +
+ { + setFieldValue('rulemakingRequired', true); + }} + /> + {values.rulemakingRequired === true && ( +
+ - -
- )} - { - setFieldValue('rulemakingRequired', false); - }} - /> -
-
- - - - ( - <> - - {t('authorityAllowed')} - - - {flatErrors.authorityAllowances} - - - {Object.keys(AuthorityAllowance) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.authorityAllowances.indexOf( - e.target.value as AuthorityAllowance - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === 'OTHER' && - values.authorityAllowances.includes( - type as AuthorityAllowance - ) && ( - - - - {flatErrors.authorityAllowancesOther} - - - - )} - - ); - })} - - )} - /> - - + > + + + {flatErrors.rulemakingRequiredDescription} + + +
+
+ )} + { + setFieldValue('rulemakingRequired', false); + }} + /> +
+
- - - {flatErrors.waiversRequired} -
- { - setFieldValue('waiversRequired', true); - }} - /> - { - setFieldValue('waiversRequired', false); - }} - /> -
-
+ - {values.waiversRequired && ( ( <> - - {t('waiverTypes')} + + {t('authorityAllowed')} - {flatErrors.waiversRequiredTypes} + {flatErrors.authorityAllowances} - {Object.keys(WaiverType).map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.waiversRequiredTypes.indexOf( - e.target.value as WaiverType - ); - arrayHelpers.remove(idx); - } - }} - /> - - ); - })} + {Object.keys(AuthorityAllowance) + .sort(sortOtherEnum) + .map(type => { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.authorityAllowances.indexOf( + e.target.value as AuthorityAllowance + ); + arrayHelpers.remove(idx); + } + }} + /> + {type === 'OTHER' && + values.authorityAllowances.includes( + type as AuthorityAllowance + ) && ( + + + + {flatErrors.authorityAllowancesOther} + + + + )} + + ); + })} )} /> - )} - + + + + + {flatErrors.waiversRequired} +
+ { + setFieldValue('waiversRequired', true); + }} + /> + { + setFieldValue('waiversRequired', false); + }} + /> +
+
- {!loading && values.status && ( - ( + <> + + {t('waiverTypes')} + + + {flatErrors.waiversRequiredTypes} + + + {Object.keys(WaiverType).map(type => { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.waiversRequiredTypes.indexOf( + e.target.value as WaiverType + ); + arrayHelpers.remove(idx); + } + }} + /> + + ); + })} + + )} + /> + )} + + - )} -
+ {!loading && values.status && ( + + )} + +
+ + +
- -
- + {id && ( -
- -
-
- - -
-
+
- - -
-
-
-
-
+
+ + +
+ +
+
- - Add an additional note - -
-
- -
+
-
- - -
-
+
+ - + + +
-
-
- - -
- - -
-
+ + +
- - Add an additional note - -
-
- -
+
-
- -
+
+
- -
-
+ + + + Add an additional note + +
+
+ + +
- -
- - -
- +
{ handleSubmit(e); }} > - - - - {flatErrors.careCoordinationInvolved} - -
- { - setFieldValue('careCoordinationInvolved', true); - setFieldValue( - 'careCoordinationInvolvedDescription', - '' - ); - }} - /> - {values.careCoordinationInvolved === true && ( -
- - - - {flatErrors.careCoordinationInvolvedDescription} - - + + + + {flatErrors.careCoordinationInvolved} + +
+ { + setFieldValue('careCoordinationInvolved', true); + setFieldValue( + 'careCoordinationInvolvedDescription', + '' + ); + }} + /> + {values.careCoordinationInvolved === true && ( +
+ - -
- )} - { - setFieldValue('careCoordinationInvolved', false); - }} - /> -
-
+ > + + + {flatErrors.careCoordinationInvolvedDescription} + + +
+
+ )} + { + setFieldValue('careCoordinationInvolved', false); + }} + /> +
+
- + - - - - {flatErrors.additionalServicesInvolved} - -
- { - setFieldValue('additionalServicesInvolved', true); - setFieldValue( - 'additionalServicesInvolvedDescription', - '' - ); - }} - /> - {values.additionalServicesInvolved === true && ( -
- - - - {flatErrors.additionalServicesInvolvedDescription} - - + + + {flatErrors.additionalServicesInvolved} + +
+ { + setFieldValue('additionalServicesInvolved', true); + setFieldValue( + 'additionalServicesInvolvedDescription', + '' + ); + }} + /> + {values.additionalServicesInvolved === true && ( +
+ - -
- )} - { - setFieldValue('additionalServicesInvolved', false); - }} - /> -
-
+ > + + + {flatErrors.additionalServicesInvolvedDescription} + + + +
+ )} + { + setFieldValue('additionalServicesInvolved', false); + }} + /> +
+
- + - - - - {flatErrors.communityPartnersInvolved} - -
- { - setFieldValue('communityPartnersInvolved', true); - setFieldValue( - 'communityPartnersInvolvedDescription', - '' - ); - }} - /> - {values.communityPartnersInvolved === true && ( -
- - - - {flatErrors.communityPartnersInvolvedDescription} - - + + + {flatErrors.communityPartnersInvolved} + +
+ { + setFieldValue('communityPartnersInvolved', true); + setFieldValue( + 'communityPartnersInvolvedDescription', + '' + ); + }} + /> + {values.communityPartnersInvolved === true && ( +
+ - -
- )} - { - setFieldValue('communityPartnersInvolved', false); - }} - /> -
-
+ > + + + {flatErrors.communityPartnersInvolvedDescription} + + + +
+ )} + { + setFieldValue('communityPartnersInvolved', false); + }} + /> +
+
- + -
+
+ + +
- -
- + {id && ( -
- - What type of Alternative Payment Model (APM) do you think the model could be? -
+ + What type of Alternative Payment Model (APM) do you think the model could be? +
-

- - - In order to be considered by the Quality Payment Program (QPP), and to be MIPS or Advanced APM, you will need to collect TINs and NPIs for providers. +

+ + + In order to be considered by the Quality Payment Program (QPP), and to be MIPS or Advanced APM, you will need to collect TINs and NPIs for providers. + - -

+

+
-
-
-
- - -

-

-
- -
+
- MIPS APM - -

-

-
- -
+
- Regular APM - -

-

+ + +

+

+
+ + +

+

+
- - -

+ + Add an additional note +

- +
- -
- -
- -
-
- - -
- 1 selected +
+ 1 selected +
+
+ +
- + + + -
-
-
- - -
+
+ +
-
- -
-
-
-

- Selected key characteristics -

-
    -
  • - +
      +
    • - Other - - - - - -
    • -
    + Other + + + + +
    +
  • +
+
- -
+
+ +
+
+ +

+ Please describe the other key characteristics +

+ +
+
+ + +
-
-
- -

- Please describe the other key characteristics -

- -
-
- - -
- +
{ handleSubmit(e); }} > - - - {t('modelAPM')} - - - - {t('MIPSInfo')} - - +
+ + + {t('modelAPM')} + + + + {t('MIPSInfo')} + + - - {flatErrors.alternativePaymentModelTypes} - + + {flatErrors.alternativePaymentModelTypes} + -
- {Object.keys(AlternativePaymentModelType) - .filter(x => x !== AlternativePaymentModelType.NOT_APM) - .map(type => { - return ( - - - - ); - })} - ) => { - if (e.target.checked) { - setFieldValue( - 'alternativePaymentModelTypes', - AlternativePaymentModelType.NOT_APM +
+ {Object.keys(AlternativePaymentModelType) + .filter(x => x !== AlternativePaymentModelType.NOT_APM) + .map(type => { + return ( + + + ); - } else { - setFieldValue('alternativePaymentModelTypes', []); - } - }} - /> -
- - - - - - - {flatErrors.keyCharacteristics} - - { - setFieldValue('keyCharacteristics', value); - }} - initialValues={initialValues.keyCharacteristics} - /> - + })} + ) => { + if (e.target.checked) { + setFieldValue( + 'alternativePaymentModelTypes', + AlternativePaymentModelType.NOT_APM + ); + } else { + setFieldValue('alternativePaymentModelTypes', []); + } + }} + /> +
- + +
- {values.keyCharacteristics.includes( - KeyCharacteristic.OTHER - ) && ( - - )} - {(values.keyCharacteristics.includes( - 'PART_C' as KeyCharacteristic - ) || - values.keyCharacteristics.includes( - 'PART_D' as KeyCharacteristic - )) && ( - <> + + + {values.keyCharacteristics.includes( + KeyCharacteristic.OTHER + ) && ( - + )} - + {(values.keyCharacteristics.includes( + 'PART_C' as KeyCharacteristic + ) || + values.keyCharacteristics.includes( + 'PART_D' as KeyCharacteristic + )) && ( + <> + + + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + + {flatErrors.collectPlanBids} + +
+ { + setFieldValue('collectPlanBids', true); + }} + /> + { + setFieldValue('collectPlanBids', false); + }} + /> +
+
- - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } - /> - )} - - {flatErrors.managePartCDEnrollment} - -
- { - setFieldValue('managePartCDEnrollment', true); - }} - /> - { - setFieldValue('managePartCDEnrollment', false); - }} - /> -
-
+ + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + + {flatErrors.managePartCDEnrollment} + +
+ { + setFieldValue('managePartCDEnrollment', true); + }} + /> + { + setFieldValue('managePartCDEnrollment', false); + }} + /> +
+ - + - - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } - /> - )} - - {flatErrors.planContractUpdated} - -
- { - setFieldValue('planContractUpdated', true); - }} - /> - { - setFieldValue('planContractUpdated', false); - }} - /> -
-
+ + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + + {flatErrors.planContractUpdated} + +
+ { + setFieldValue('planContractUpdated', true); + }} + /> + { + setFieldValue('planContractUpdated', false); + }} + /> +
+ - - - )} + + + )} -
+
+ + +
- -
- +
{id && ( -
- -
+ +
+
+ + +
+
+ + +
+
+ + Geography type is +
+

+

-
- - Geography type is - -
- - -

-

-
- - -

-

-
- -
+
- Other - -

-

-
- + +
+ - Please specify what the other geography type is. - - -
- - Geographies are applied to - -
- -
+
- Beneficiaries - -

-

-
- -
+
- Participants - -

-

-
- -
+
- Providers - -

+ + +

+

+
+ +
- -

+

+
+ + +
+
+ + +
+
- -
- -
+ + What is the agreement type? +
+
+

+ + Changing your answer to this question may also affect your selections in the IT solutions and implementation status tracker. + + +

+
+
+

+ Note: CMMI writes, Office of General Council (OGC) approves both types of agreements +

+
+

+

-
-
-
+
+ + +

+

+
+
+ + +
- -
- - What is the agreement type? - -
-
-

- - Changing your answer to this question may also affect your selections in the IT solutions and implementation status tracker. - - -

-
-
-

- Note: CMMI writes, Office of General Council (OGC) approves both types of agreements -

-
- - -

-

-
- - -

-

-
- - -

-

-
-
- - -
- +
{ handleSubmit(e); }} > - - - - {flatErrors.geographiesTargeted} - -
- { - setFieldValue('geographiesTargeted', true); - }} - /> - { - setFieldValue('geographiesTargeted', false); - }} - /> -
- {values.geographiesTargeted && ( - <> - ( - <> - - {t('geographyType')} - - - {flatErrors.geographiesTargetedTypes} - +
+ + + + {flatErrors.geographiesTargeted} + +
+ { + setFieldValue('geographiesTargeted', true); + }} + /> + { + setFieldValue('geographiesTargeted', false); + }} + /> +
+ {values.geographiesTargeted && ( + <> + ( + <> + + {t('geographyType')} + + + {flatErrors.geographiesTargetedTypes} + - {Object.keys(GeographyType) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.geographiesTargetedTypes.indexOf( - e.target.value as GeographyType - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === 'OTHER' && - values.geographiesTargetedTypes.includes( - type as GeographyType - ) && ( - { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.geographiesTargetedTypes.indexOf( + e.target.value as GeographyType + ); + arrayHelpers.remove(idx); } - > - - - { - flatErrors.geographiesTargetedTypesOther + }} + /> + {type === 'OTHER' && + values.geographiesTargetedTypes.includes( + type as GeographyType + ) && ( + - - - )} - - ); - })} - - )} - /> + > + + + { + flatErrors.geographiesTargetedTypesOther + } + + + + )} + + ); + })} + + )} + /> - ( - <> - - {t('geographyApplied')} - - - {flatErrors.geographiesTargetedAppliedTo} - + ( + <> + + {t('geographyApplied')} + + + {flatErrors.geographiesTargetedAppliedTo} + - {Object.keys(GeographyApplication) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.geographiesTargetedAppliedTo.indexOf( - e.target - .value as GeographyApplication - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === 'OTHER' && - values.geographiesTargetedAppliedTo.includes( - type as GeographyApplication - ) && ( - { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.geographiesTargetedAppliedTo.indexOf( + e.target + .value as GeographyApplication + ); + arrayHelpers.remove(idx); } - > - - - { - flatErrors.geographiesTargetedAppliedToOther + }} + /> + {type === 'OTHER' && + values.geographiesTargetedAppliedTo.includes( + type as GeographyApplication + ) && ( + - - - )} - - ); - })} - - )} - /> + > + + + { + flatErrors.geographiesTargetedAppliedToOther + } + + + + )} + + ); + })} + + )} + /> - - - )} -
+ + + )} + - - - - {flatErrors.participationOptions} - -
- { - setFieldValue('participationOptions', true); - }} - /> - { - setFieldValue('participationOptions', false); - }} - /> -
-
+ + + + {flatErrors.participationOptions} + +
+ { + setFieldValue('participationOptions', true); + }} + /> + { + setFieldValue('participationOptions', false); + }} + /> +
+
- + - - ( - <> - - {t('agreementType')} - + + ( + <> + + {t('agreementType')} + - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } - /> - )} + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} -

- {t('agreementNote')} -

+

+ {t('agreementNote')} +

- - {flatErrors.agreementTypes} - + + {flatErrors.agreementTypes} + - {Object.keys(AgreementType) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.agreementTypes.indexOf( - e.target.value as AgreementType - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === 'OTHER' && - values.agreementTypes.includes( - type as AgreementType - ) && ( - - - - {flatErrors.agreementTypesOther} - - - - )} - - ); - })} - - )} - /> -
+ + + {flatErrors.agreementTypesOther} + + +
+ )} + + ); + })} + + )} + /> + - {values.agreementTypes.includes( - 'PARTICIPATION' as AgreementType - ) && ( - <> - - -

- {t('agreementDepending')} -

- - {flatErrors.multiplePatricipationAgreementsNeeded} - -
- { - setFieldValue( - 'multiplePatricipationAgreementsNeeded', + +

+ {t('agreementDepending')} +

+ + {flatErrors.multiplePatricipationAgreementsNeeded} + +
+ - { - setFieldValue( - 'multiplePatricipationAgreementsNeeded', + } + onChange={() => { + setFieldValue( + 'multiplePatricipationAgreementsNeeded', + true + ); + }} + /> + -
- + } + onChange={() => { + setFieldValue( + 'multiplePatricipationAgreementsNeeded', + false + ); + }} + /> +
+
- - - )} + + + )} -
+
+ + +
- -
- +
{id && ( -
- -
-
- - -
-
- - -
-
-

- Start typing the name of the model -

+
+ + +
+
+ + +
+
- - - - - +

-   - - +

- + +   - - - -
- - When autocomplete results are available use up and down arrows to review + + + +
+ + When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures. - + +
-
-
- -
-
- - -
-
+
- - -
-
-
-
- -
+ +
+
+ + +
+ +
+
-
- -
+
+
+ + +
+
+
+ + +
+
-
- - -
- +
-
- - -
+ Next +
-
-
-
- +
{ >(null); const history = useHistory(); - const { data: modelData, error: modelError } = useQuery< - GetDraftModelPlansType, - GetModelPlansVariables - >(GetDraftModelPlans, { - variables: { - filter: ModelPlanFilter.INCLUDE_ALL, - isMAC: false + const { + data: modelData, + error: modelError, + loading: modelLoading + } = useQuery( + GetDraftModelPlans, + { + variables: { + filter: ModelPlanFilter.INCLUDE_ALL, + isMAC: false + } } - }); + ); const { data: existingModelData, - error: existingModelError + error: existingModelError, + loading: existingModelLoading } = useQuery(GetExistingModelPlans); // Combined MINT models with existing models from DB. Sorts them alphabetically and returns options for MultiSelect @@ -280,274 +285,282 @@ export const CharacteristicsContent = () => { handleSubmit(e); }} > - - - {flatErrors.isNewModel} -
- { - setFieldValue('isNewModel', true); - setFieldValue('existingModel', ''); - }} - /> - { - setFieldValue('isNewModel', false); - }} - /> -
- {values.isNewModel === false && ( - - -

{t('startTypeing')}

- {flatErrors.existingModel} - - + + {flatErrors.isNewModel} +
+ { + setFieldValue('isNewModel', true); + setFieldValue('existingModel', ''); }} - options={modelPlanOptions} - defaultValue={ - modelPlanOptions.find( - modelPlan => modelPlan.label === existingModel - )?.value || '' - } - onChange={modelPlanID => { - const model = modelPlanOptions.find( - modelPlan => modelPlan.value === modelPlanID - ); - if (model) { - setFieldValue('existingModel', model.label); - } else { - setFieldValue('existingModel', ''); - } + /> + { + setFieldValue('isNewModel', false); }} /> - - )} - - - - - - {flatErrors.resemblesExistingModel} - -
- { - setFieldValue('resemblesExistingModel', true); - }} - /> - { - setFieldValue('resemblesExistingModel', false); - }} - /> -
- {values.resemblesExistingModel && ( - <> +
+ {values.isNewModel === false && ( -

+

{t('startTypeing')}

- {flatErrors.resemblesExistingModelWhich} + {flatErrors.existingModel} - { - setFieldValue('existingModelLinks', value); + defaultValue={ + modelPlanOptions.find( + modelPlan => modelPlan.label === existingModel + )?.value || '' + } + onChange={modelPlanID => { + const model = modelPlanOptions.find( + modelPlan => modelPlan.value === modelPlanID + ); + if (model) { + setFieldValue('existingModel', model.label); + } else { + setFieldValue('existingModel', ''); + } }} - initialValues={initialValues.existingModelLinks} />
- - - - {flatErrors.resemblesExistingModelHow} - - - + +

+ {t('startTypeing')} +

+ + {flatErrors.resemblesExistingModelWhich} + - - - )} -
- - - - - {flatErrors.hasComponentsOrTracks} - -
- { - setFieldValue('hasComponentsOrTracks', true); - setFieldValue('hasComponentsOrTracksDiffer', ''); - }} - /> - {values.hasComponentsOrTracks === true && ( -
+ { + setFieldValue('existingModelLinks', value); + }} + initialValues={initialValues.existingModelLinks} + /> + - {flatErrors.hasComponentsOrTracksDiffer} + {flatErrors.resemblesExistingModelHow} -
- )} - { - setFieldValue('hasComponentsOrTracks', false); - }} - /> -
- -
+ + + )} +
+ + + + + {flatErrors.hasComponentsOrTracks} + +
+ { + setFieldValue('hasComponentsOrTracks', true); + setFieldValue('hasComponentsOrTracksDiffer', ''); + }} + /> + {values.hasComponentsOrTracks === true && ( +
+ + + + {flatErrors.hasComponentsOrTracksDiffer} + + + +
+ )} + { + setFieldValue('hasComponentsOrTracks', false); + }} + /> +
-
- +
+ -
- + - {id && ( + {id && !(loading || modelLoading || existingModelLoading) && ( { diff --git a/src/views/ModelPlan/TaskList/ITSolutions/AddCustomSolution/index.tsx b/src/views/ModelPlan/TaskList/ITSolutions/AddCustomSolution/index.tsx index 1476a0a199..99cf1484c7 100644 --- a/src/views/ModelPlan/TaskList/ITSolutions/AddCustomSolution/index.tsx +++ b/src/views/ModelPlan/TaskList/ITSolutions/AddCustomSolution/index.tsx @@ -101,7 +101,7 @@ const AddCustomSolution = () => { const { showMessageOnNextPage } = useMessage(); - const { data, loading } = useQuery< + const { data, loading, error } = useQuery< GetOperationalSolutionType, GetOperationalSolutionVariables >(GetOperationalSolution, { @@ -291,7 +291,7 @@ const AddCustomSolution = () => { )} )} -
+
{selectedSolution === null ? ( { const isUpdating = !!operationalNeedID; - const { data } = useQuery< + const { data, loading, error } = useQuery< GetOperationalNeedType, GetOperationalNeedVariables >(GetOperationalNeed, { @@ -226,7 +226,7 @@ const AddOrUpdateOperationalNeed = () => { handleSubmit(e); }} > -
+
{ handleSubmit(e); }} > -
+
- - Choose from common solutions - -
    -
    + Choose from common solutions + +
      -
    • -
      - -
      +

      - Select this solution - + Research, Measurement, Assessment, Design, and Analysis +

      +
      + (RMADA) +
      -

      - Research, Measurement, Assessment, Design, and Analysis -

      -
      +
      - (RMADA) -
      -
      -
      - Research, Measurement, Assessment, Design, and Analysis (RMADA) Indefinite Delivery Indefinite Quantity 2 (IDIQ) umbrella contract, the Centers for Medicare & Medicaid Services (CMS) shall award task orders (TOs) for a wide range of analytic support and technical assistance activities that support models and demonstration programs created or derived under the auspices of the Patient Protection & Affordable Care Act (ACA), the Medicare Access and CHIP Reauthorization Act (MACRA), other non-ACA statutes, and future health reform legislation. Supporting all aspects of model design and operations (with the exception of information technology); +

      + Point of contact +

      +

      + Joe Pusateri +

      + +
      + joseph.pusateri@cms.hhs.gov +
      +
      +
    - -
- - - - -
+ +
+ - - + + + + diff --git a/src/views/ModelPlan/TaskList/ITSolutions/SelectSolutions/index.tsx b/src/views/ModelPlan/TaskList/ITSolutions/SelectSolutions/index.tsx index 2e6ebfe01a..9b14d3ab37 100644 --- a/src/views/ModelPlan/TaskList/ITSolutions/SelectSolutions/index.tsx +++ b/src/views/ModelPlan/TaskList/ITSolutions/SelectSolutions/index.tsx @@ -10,6 +10,7 @@ import { useMutation, useQuery } from '@apollo/client'; import { Button, CardGroup, + Fieldset, Grid, IconArrowBack } from '@trussworks/react-uswds'; @@ -309,105 +310,108 @@ const SelectSolutions = () => { handleSubmit(e); }} > - - {t('chooseCommonSolution')} - - - {loading ? ( - - ) : ( - - {commonSolutions.map( - (solution: GetOperationalNeedSolutionsType) => ( - - x.id === '00000000-0000-0000-0000-000000000000' - ? x.name === solution.name - : x.id === solution.id +
+ + {t('chooseCommonSolution')} + + + {loading ? ( + + ) : ( + + {commonSolutions.map( + (solution: GetOperationalNeedSolutionsType) => ( + + x.id === + '00000000-0000-0000-0000-000000000000' + ? x.name === solution.name + : x.id === solution.id + )} + // Default Operational Solutions start with an id full of zeroes. + // if solution is default solution, then check name to find index + // otherwise, continue to use id to find index + key={`${ + solution.nameOther + ?.toLowerCase() + .replaceAll(' ', '-') || + solution.name + ?.toLowerCase() + .replaceAll(' ', '-') + }--${solution.id}`} + /> + ) + )} + + )} + + {otherSolutions.length > 0 && ( + <> + + {t('chooseOtherSolution')} + + {loading ? ( + + ) : ( + + {otherSolutions.map( + (solution: GetOperationalNeedSolutionsType) => ( + + x.id === + '00000000-0000-0000-0000-000000000000' + ? x.name === solution.name + : x.id === solution.id + )} + key={solution.nameOther || solution.name} + /> + ) )} - // Default Operational Solutions start with an id full of zeroes. - // if solution is default solution, then check name to find index - // otherwise, continue to use id to find index - key={`${ - solution.nameOther - ?.toLowerCase() - .replaceAll(' ', '-') || - solution.name - ?.toLowerCase() - .replaceAll(' ', '-') - }--${solution.id}`} - /> - ) - )} - - )} - - {otherSolutions.length > 0 && ( - <> - - {t('chooseOtherSolution')} - - {loading ? ( - - ) : ( - - {otherSolutions.map( - (solution: GetOperationalNeedSolutionsType) => ( - - x.id === - '00000000-0000-0000-0000-000000000000' - ? x.name === solution.name - : x.id === solution.id - )} - key={solution.nameOther || solution.name} - /> - ) - )} - - )} - - )} - - + + )} + + )} -
+ +
+ +
+ -
- +
); diff --git a/src/views/ModelPlan/TaskList/ITSolutions/SolutionImplementation/index.tsx b/src/views/ModelPlan/TaskList/ITSolutions/SolutionImplementation/index.tsx index aad2160758..ad3763d1de 100644 --- a/src/views/ModelPlan/TaskList/ITSolutions/SolutionImplementation/index.tsx +++ b/src/views/ModelPlan/TaskList/ITSolutions/SolutionImplementation/index.tsx @@ -336,7 +336,7 @@ const SolutionImplementation = () => { handleSubmit(e); }} > -
+
{loading ? ( ) : ( diff --git a/src/views/ModelPlan/TaskList/ITSolutions/Subtasks/index.tsx b/src/views/ModelPlan/TaskList/ITSolutions/Subtasks/index.tsx index 8e549b7f55..3b86da3f31 100644 --- a/src/views/ModelPlan/TaskList/ITSolutions/Subtasks/index.tsx +++ b/src/views/ModelPlan/TaskList/ITSolutions/Subtasks/index.tsx @@ -387,7 +387,7 @@ const Subtasks = ({ handleSubmit(e); }} > -
+
{({ push, remove }) => { const { subtasks } = formValues; diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/CCWAndQuality/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/CCWAndQuality/__snapshots__/index.test.tsx.snap index dcf9191c6f..10149e312b 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/CCWAndQuality/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/CCWAndQuality/__snapshots__/index.test.tsx.snap @@ -97,491 +97,496 @@ exports[`Model Plan Ops Eval and Learning CCW and Qualtiy matches snapshot 1`] = class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-ccw-and-quality-form" > -

- Chronic Conditions Warehouse (CCW) questions -

-
- -
-
- - -
-
- - -
-
+

+ Chronic Conditions Warehouse (CCW) questions +

- -
-
-
- -
-
- - +
+
- Yes - -
+ + +
+
- - + + Add an additional note +
-
+
- -
- -
- -
-
- - +
+
- Yes - -
+ + +
+
- - + + Add an additional note +
-
+
-
+
+ - - Add an additional note - -
- -

- Quality questions -

-
- -
+ +
+
-

- - Changing your answer to this question may also affect your selections in the IT solutions and implementation status tracker. - - -

+ + Add an additional note +
-
+ Quality questions + +
+
- - +

+ + Changing your answer to this question may also affect your selections in the IT solutions and implementation status tracker. + + +

+
+
+
+ + +
+
+ + +
+
- - + + Add an additional note +
-
+
- -
- -
- -
-
- - +
+
- Yes - -
+ + +
+
- - + + Add an additional note +
- +
+
- -
- -
- +
{ handleSubmit(e); }} > - {isCCWInvolvement(ccmInvolvment) && ( - <> -

{t('ccwSpecific')}

- - - - - {flatErrors.sendFilesBetweenCcw} - -
- {[true, false].map(key => ( - { - setFieldValue('sendFilesBetweenCcw', key); - }} - /> - ))} -
+ + + {flatErrors.sendFilesBetweenCcw} + +
+ {[true, false].map(key => ( + { + setFieldValue('sendFilesBetweenCcw', key); + }} + /> + ))} +
- -
+ + - - - - {flatErrors.appToSendFilesToKnown} - -
- {[true, false].map(key => ( - + + + {flatErrors.appToSendFilesToKnown} + +
+ {[true, false].map(key => ( + + { + setFieldValue('appToSendFilesToKnown', key); + }} + /> + {key === true && + values.appToSendFilesToKnown === key && ( +
+ + + {flatErrors.appToSendFilesToWhich} + + +
+ )} +
+ ))} +
+ + + + + + + + {flatErrors.useCcwForFileDistribiutionToParticipants} + +
+ {[true, false].map(key => ( { - setFieldValue('appToSendFilesToKnown', key); + setFieldValue( + 'useCcwForFileDistribiutionToParticipants', + key + ); }} /> - {key === true && - values.appToSendFilesToKnown === key && ( -
- - - {flatErrors.appToSendFilesToWhich} - - -
- )} - - ))} -
- - -
+ ))} +
- - + + )} + + {isQualityMeasures(dataNeededForMonitoring) && ( + <> +

{t('qualityQuestions')}

+ + - {t('distributeFiles')} - - - {flatErrors.useCcwForFileDistribiutionToParticipants} - -
- {[true, false].map(key => ( - + {t('validatedQuality')} + + + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) } - onChange={() => { - setFieldValue( - 'useCcwForFileDistribiutionToParticipants', - key - ); - }} /> - ))} -
- - -
- - )} + )} - {isQualityMeasures(dataNeededForMonitoring) && ( - <> -

{t('qualityQuestions')}

+ + {flatErrors.developNewQualityMeasures} + +
+ {[true, false].map(key => ( + { + setFieldValue('developNewQualityMeasures', key); + }} + /> + ))} +
- - - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } + - )} - - - {flatErrors.developNewQualityMeasures} - -
- {[true, false].map(key => ( - { - setFieldValue('developNewQualityMeasures', key); - }} - /> - ))} -
- - -
+
- - - - {flatErrors.qualityPerformanceImpactsPayment} - -
- {[true, false].map(key => ( - { - setFieldValue( - 'qualityPerformanceImpactsPayment', - key - ); - }} - /> - ))} -
- - -
- - )} + + + {flatErrors.qualityPerformanceImpactsPayment} + +
+ {[true, false].map(key => ( + { + setFieldValue( + 'qualityPerformanceImpactsPayment', + key + ); + }} + /> + ))} +
-
+ + + + )} + +
+ + +
- -
- + {id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/DataSharing/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/DataSharing/__snapshots__/index.test.tsx.snap index 8b70240a5a..8b229192f6 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/DataSharing/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/DataSharing/__snapshots__/index.test.tsx.snap @@ -97,557 +97,562 @@ exports[`Model Plan Ops Eval and Learning Data Sharing matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-data-sharing-form" > -
- - Data sharing timing and frequency - - -

- If using ACO-OS support, SSM request to begin analysis at least 1 year before implementation -

- -
-
-
+
- How often do you anticipate sharing data? - -
-
- - + How often do you anticipate sharing data? + +
+ +
- 0 selected +
+ 0 selected +
+
+ +
- -
-
-
- -
-
-
- +
+ +
+
+ +
- + Data collection starts + +
-
-
- - Data collection timing and frequency - - - -
-
- -
-
- - + How often do you anticipate collecting data? + +
+ +
- 0 selected +
+ 0 selected +
+
+ +
- -
-
-
- -
-
-
- +
+ +
-
-
- + +
-
-
- -
- +
+
- Other Value - + +
+
- -
- -
- +
{ handleSubmit(e); }} > - - {t('reportingTiming')} - -

- {t('dataSharingInfo')} -

- {flatErrors.dataSharingStarts} - ) => { - setFieldValue('dataSharingStarts', e.target.value); - }} + {t('reportingTiming')} + +

+ {t('dataSharingInfo')} +

+ + {flatErrors.dataSharingStarts} + + ) => { + setFieldValue('dataSharingStarts', e.target.value); + }} + > + + {dataSharingOptions.map(type => { + return ( + + ); + })} + + + {values.dataSharingStarts === 'OTHER' && ( +
+ + + {flatErrors.dataSharingStartsOther} + + +
+ )} +
+ + - - {dataSharingOptions.map(type => { - return ( - - ); - })} - - - {values.dataSharingStarts === 'OTHER' && ( -
- - - {flatErrors.dataSharingStartsOther} - - -
- )} -
- - - + + + {flatErrors.dataSharingFrequency} + + ({ + value: key, + label: translateDataFrequencyType(key) + }))} + selectedLabel={t('dataSharingHowOftenSeleted')} + onChange={(value: string[] | []) => { + setFieldValue('dataSharingFrequency', value); + }} + initialValues={initialValues.dataSharingFrequency} + /> + {(values?.dataSharingFrequency || []).includes( + DataFrequencyType.OTHER + ) && ( +
+ + + {flatErrors.dataSharingFrequencyOther} + + +
+ )} + + +
+ + - {t('dataSharingHowOften')} - - - - {flatErrors.dataSharingFrequency} - - ({ - value: key, - label: translateDataFrequencyType(key) - }))} - selectedLabel={t('dataSharingHowOftenSeleted')} - onChange={(value: string[] | []) => { - setFieldValue('dataSharingFrequency', value); - }} - initialValues={initialValues.dataSharingFrequency} - /> - {(values?.dataSharingFrequency || []).includes( - DataFrequencyType.OTHER - ) && ( -
- - - {flatErrors.dataSharingFrequencyOther} - - -
- )} - - -
- - - {t('dataCollectionTiming')} - + + - {t('dataCollection')} - - - {flatErrors.dataCollectionStarts} - - ) => { - setFieldValue('dataCollectionStarts', e.target.value); - }} + + + + {flatErrors.dataCollectionFrequency} + + ({ + value: key, + label: translateDataFrequencyType(key) + }))} + selectedLabel={t('dataSharingHowOftenSeleted')} + onChange={(value: string[] | []) => { + setFieldValue('dataCollectionFrequency', value); + }} + initialValues={initialValues.dataCollectionFrequency} + /> + {(values?.dataCollectionFrequency || []).includes( + DataFrequencyType.OTHER + ) && ( +
+ + + {flatErrors.dataCollectionFrequencyOther} + + +
+ )} + + +
+ + - - {dataSharingOptions.map(type => { - return ( - - ); - })} - - - {values.dataCollectionStarts === 'OTHER' && ( -
- - - {flatErrors.dataCollectionStartsOther} - - -
- )} -
- - - - - - {flatErrors.dataCollectionFrequency} - - ({ - value: key, - label: translateDataFrequencyType(key) - }))} - selectedLabel={t('dataSharingHowOftenSeleted')} - onChange={(value: string[] | []) => { - setFieldValue('dataCollectionFrequency', value); - }} - initialValues={initialValues.dataCollectionFrequency} - /> - {(values?.dataCollectionFrequency || []).includes( - DataFrequencyType.OTHER - ) && ( -
- - - {flatErrors.dataCollectionFrequencyOther} - - -
- )} - - -
- - - - - {flatErrors.qualityReportingStarts} - - ) => { - setFieldValue('qualityReportingStarts', e.target.value); - }} - > - - {dataSharingOptions.map(type => { - return ( - - ); - })} - - - {values.qualityReportingStarts === 'OTHER' && ( -
- - - {flatErrors.qualityReportingStartsOther} - - -
- )} - - -
- -
+ + + {flatErrors.qualityReportingStarts} + + ) => { + setFieldValue('qualityReportingStarts', e.target.value); + }} + > + + {dataSharingOptions.map(type => { + return ( + + ); + })} + + + {values.qualityReportingStarts === 'OTHER' && ( +
+ + + {flatErrors.qualityReportingStartsOther} + + +
+ )} + + + + +
+ + +
- -
- + {id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Evaluation/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Evaluation/__snapshots__/index.test.tsx.snap index f6980515e3..a8e5e156b9 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Evaluation/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Evaluation/__snapshots__/index.test.tsx.snap @@ -97,50 +97,174 @@ exports[`Model Plan Ops Eval and Learning matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-evaluation-form" > -
+
+ + What type of evaluation approach are you considering? Select all that apply. + +
+ + +

+

+
+ + +

+

+
+ + +

+

+
+ + +

+

+
+ + +

+

+
+ +
+
- What type of evaluation approach are you considering? Select all that apply. + Is Chronic Conditions Warehouse (CCW) involved in the model? -
- - -

-

+ If you select either yes option, there will be additional questions to answer. +

-
- - Is Chronic Conditions Warehouse (CCW) involved in the model? - -

- If you select either yes option, there will be additional questions to answer. -

-
- - -

-

-
- - -

-

-
- - -

-

-
- - -

-

-
- -
-
- -

- If you select quality claims-based measures or quality reported measures, there will be additional questions to answer. -

-
-
+

- - + If you select quality claims-based measures or quality reported measures, there will be additional questions to answer. +

+
+ +
- 0 selected +
+ 0 selected +
+
+ +
- -
-
-
- -
-
-
- +
+ +
-
-
- + + Add an additional note + +
-
-
- -
-
- - + What data will you send to participants? Select all that apply. + +
+ +
- 0 selected +
+ 0 selected +
+
+ +
- -
-
-
- -
+
+ +
-
- -
+
+
+
- -
-
-
- -
-
- - +
+
- Yes - -
+ + +
+
- - + + Add an additional note +
- +
+
- -
- -
- +
{ handleSubmit(e); }} > - +
+ + ( + <> + + {t('evaluationApproach')} + + + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + + + {flatErrors.evaluationApproaches} + + + {Object.keys(EvaluationApproachType) + .sort(sortOtherEnum) + .map(type => { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.evaluationApproaches.indexOf( + e.target + .value as EvaluationApproachType + ); + arrayHelpers.remove(idx); + } + }} + /> + {type === EvaluationApproachType.OTHER && + values.evaluationApproaches.includes( + type + ) && ( +
+ + + {flatErrors.evaluationApproachOther} + + +
+ )} +
+ ); + })} + + + )} + /> +
+ ( <> - - {t('evaluationApproach')} - - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } - /> - )} + {t('ccw')} + +

{t('ccwInfo')}

- {flatErrors.evaluationApproaches} + {flatErrors.ccmInvolvment} - {Object.keys(EvaluationApproachType) + {Object.keys(CcmInvolvmentType) .sort(sortOtherEnum) .map(type => { return ( @@ -303,33 +381,31 @@ const Evaluation = () => { if (e.target.checked) { arrayHelpers.push(e.target.value); } else { - const idx = values.evaluationApproaches.indexOf( - e.target.value as EvaluationApproachType + const idx = values.ccmInvolvment.indexOf( + e.target.value as CcmInvolvmentType ); arrayHelpers.remove(idx); } }} /> - {type === EvaluationApproachType.OTHER && - values.evaluationApproaches.includes( - type - ) && ( + {type === CcmInvolvmentType.OTHER && + values.ccmInvolvment.includes(type) && (
- {flatErrors.evaluationApproachOther} + {flatErrors.ccmInvolvmentOther}
)} @@ -337,284 +413,217 @@ const Evaluation = () => { ); })} )} /> - - - ( - <> - {t('ccw')} - -

{t('ccwInfo')}

- - {flatErrors.ccmInvolvment} - - {Object.keys(CcmInvolvmentType) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.ccmInvolvment.indexOf( - e.target.value as CcmInvolvmentType - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === CcmInvolvmentType.OTHER && - values.ccmInvolvment.includes(type) && ( -
- - - {flatErrors.ccmInvolvmentOther} - - -
- )} -
- ); - })} - - - )} - /> - - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } + + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + +

+ {t('dataNeededInfo')} +

+ + + {flatErrors.dataNeededForMonitoring} + + { + setFieldValue('dataNeededForMonitoring', value); + }} + initialValues={initialValues.dataNeededForMonitoring} /> - )} - -

{t('dataNeededInfo')}

- - - {flatErrors.dataNeededForMonitoring} - - + + + {flatErrors.dataNeededForMonitoringOther} + + +
)} - selectedLabel={t('selectedData')} - onChange={(value: string[] | []) => { - setFieldValue('dataNeededForMonitoring', value); - }} - initialValues={initialValues.dataNeededForMonitoring} - /> - {(values?.dataNeededForMonitoring || []).includes( - DataForMonitoringType.OTHER - ) && ( -
- - - {flatErrors.dataNeededForMonitoringOther} - - -
- )} - - + + - - - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } + + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} + + + {flatErrors.dataToSendParticicipants} + + { + setFieldValue('dataToSendParticicipants', value); + }} + initialValues={initialValues.dataToSendParticicipants} /> - )} - - - {flatErrors.dataToSendParticicipants} - - + + + {flatErrors.dataToSendParticicipantsgOther} + + + )} - selectedLabel={t('selectedData')} - onChange={(value: string[] | []) => { - setFieldValue('dataToSendParticicipants', value); - }} - initialValues={initialValues.dataToSendParticicipants} - /> - {(values?.dataToSendParticicipants || []).includes( - DataToSendParticipantsType.OTHER_MIPS_DATA - ) && ( -
- - - {flatErrors.dataToSendParticicipantsgOther} - - -
- )} - -
+ + - - - - {flatErrors.shareCclfData} -
- {[true, false].map(key => ( - { - setFieldValue('shareCclfData', key); - }} - /> - ))} -
- - -
+ + + {flatErrors.shareCclfData} +
+ {[true, false].map(key => ( + { + setFieldValue('shareCclfData', key); + }} + /> + ))} +
-
+ + + +
+ + +
- -
- + {id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOC/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOC/__snapshots__/index.test.tsx.snap index 03dc375109..0eea61eaa2 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOC/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOC/__snapshots__/index.test.tsx.snap @@ -97,148 +97,289 @@ exports[`Model Plan Ops Eval and Learning IDDOC matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-iddoc-form" > -

- IDDOC operations questions -

-
- -
+ IDDOC operations questions + +
-
- -
+
+ + +
+
- - + + Add an additional note +
- +
- + +
+ +
+ +
- -
- +

+ Interface Control Document (ICD) questions +

- This means the participant record for a model would be included in the ACO-OS Entity File. + An interface control document provides a record of all interface information generated for a project.

-
+ + +
+
+
- - + mm/dd/yyyy
- - + +
+ + +
- +
@@ -268,120 +409,27 @@ exports[`Model Plan Ops Eval and Learning IDDOC matches snapshot 1`] = ` Add an additional note
-
-

- Interface Control Document (ICD) questions -

-

- An interface control document provides a record of all interface information generated for a project. -

-
- - -
-
- -
- mm/dd/yyyy -
-
- -
- - - + Back + +
-
-
-
-
- - -
- +
{ handleSubmit(e); }} > -

{t('iddocHeading')}

- - - - {flatErrors.technicalContactsIdentified} - - -
- {[true, false].map(key => ( - - { - setFieldValue('technicalContactsIdentified', key); - }} - /> - {values.technicalContactsIdentified === true && - key === true && ( -
- - - {flatErrors.technicalContactsIdentifiedDetail} - - -
- )} -
- ))} -
+
+

{t('iddocHeading')}

+ + + + {flatErrors.technicalContactsIdentified} + - - +
+ {[true, false].map(key => ( + + { + setFieldValue('technicalContactsIdentified', key); + }} + /> + {values.technicalContactsIdentified === true && + key === true && ( +
+ + + {flatErrors.technicalContactsIdentifiedDetail} + + +
+ )} +
+ ))} +
- - -

- {t('participantInformationInfo')} -

- - {flatErrors.captureParticipantInfo} - -
- { - setFieldValue('captureParticipantInfo', true); - }} - /> - { - setFieldValue('captureParticipantInfo', false); - }} + -
+
+ + + +

+ {t('participantInformationInfo')} +

+ + {flatErrors.captureParticipantInfo} + +
+ { + setFieldValue('captureParticipantInfo', true); + }} + /> + { + setFieldValue('captureParticipantInfo', false); + }} + /> +
- -
+ + -

{t('icdHeading')}

+

{t('icdHeading')}

-

- {t('icdSubheading')} -

+

+ {t('icdSubheading')} +

- - - {flatErrors.icdOwner} - - - - {!loading && ( - <> - + + {flatErrors.icdOwner} + + - - - )} + {!loading && ( + <> + + + + + )} -
+
+ + +
- -
- +
{id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCMonitoring/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCMonitoring/__snapshots__/index.test.tsx.snap index 57d02237a6..6171c60c78 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCMonitoring/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCMonitoring/__snapshots__/index.test.tsx.snap @@ -97,305 +97,353 @@ exports[`Model Plan Ops Eval and Learning IDDOC matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-iddoc-monitoring-form" > -

- Data monitoring questions continued -

-
- -
+ Data monitoring questions continued + +
-
- - -
-
+
- - -
-
-
-
- -
+ +
+
+ + +
+ +
+
-
- - -
-
+
- - -
- -
-
- -
+ +
+
+ + +
+ +
+
-
- - -
-
+
- - -
- -
-
- -
+ +
+
+ + +
+ +
+
-
- - -
-
+
- - -
- -
-
- -

- This means we would use these files for Participating and Preferred Providers. -

-
+ +
+
+ + +
+ + +
-
- -
+
+
+
+
- -
-
-
+
- File naming conventions - - -
-
+ + +
- -
- - -
- +
{ handleSubmit(e); }} > -

{t('dataMonitoringContinued')}

+
+

{t('dataMonitoringContinued')}

- - - - {flatErrors.dataFullTimeOrIncremental} - -
- {Object.keys(DataFullTimeOrIncrementalType).map(key => ( - { - setFieldValue('dataFullTimeOrIncremental', key); - }} - /> - ))} -
-
+ + + + {flatErrors.dataFullTimeOrIncremental} + +
+ {Object.keys(DataFullTimeOrIncrementalType).map(key => ( + { + setFieldValue('dataFullTimeOrIncremental', key); + }} + /> + ))} +
+
- - - {flatErrors.eftSetUp} -
- {[true, false].map(key => ( - { - setFieldValue('eftSetUp', key); - }} - /> - ))} -
-
+ + + {flatErrors.eftSetUp} +
+ {[true, false].map(key => ( + { + setFieldValue('eftSetUp', key); + }} + /> + ))} +
+
- - - - {flatErrors.unsolicitedAdjustmentsIncluded} - -
- {[true, false].map(key => ( - { - setFieldValue('unsolicitedAdjustmentsIncluded', key); - }} - /> - ))} -
-
+ + + + {flatErrors.unsolicitedAdjustmentsIncluded} + +
+ {[true, false].map(key => ( + { + setFieldValue( + 'unsolicitedAdjustmentsIncluded', + key + ); + }} + /> + ))} +
+
- - - - {flatErrors.dataFlowDiagramsNeeded} - -
- {[true, false].map(key => ( - { - setFieldValue('dataFlowDiagramsNeeded', key); - }} - /> - ))} -
-
+ + + + {flatErrors.dataFlowDiagramsNeeded} + +
+ {[true, false].map(key => ( + { + setFieldValue('dataFlowDiagramsNeeded', key); + }} + /> + ))} +
+
- - -

- {t('benefitEnhancementInfo')} -

- - {flatErrors.produceBenefitEnhancementFiles} - -
- {[true, false].map(key => ( - { - setFieldValue('produceBenefitEnhancementFiles', key); - }} - /> - ))} -
-
+ + +

+ {t('benefitEnhancementInfo')} +

+ + {flatErrors.produceBenefitEnhancementFiles} + +
+ {[true, false].map(key => ( + { + setFieldValue( + 'produceBenefitEnhancementFiles', + key + ); + }} + /> + ))} +
+
- - - - {flatErrors.fileNamingConventions} - - - + > + + + {flatErrors.fileNamingConventions} + + + - + -
+
+ + +
- -
- +
{id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCTesting/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCTesting/__snapshots__/index.test.tsx.snap index 21b02f442c..112aefd37d 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCTesting/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/IDDOCTesting/__snapshots__/index.test.tsx.snap @@ -97,92 +97,288 @@ exports[`Model Plan Ops Eval and Learning IDDOC matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-iddoc-testing-form" > -

- Testing questions -

-
+

+ Testing questions +

-

- - - SSM request to begin analysis at least 1 year before implementation +

+ + + SSM request to begin analysis at least 1 year before implementation + - -

+

+
-
-
- - +
+
- STC – test data needs - - -
-
-
+

+ Data monitoring questions +

+ - Define the testing timelines - - - -
- -

- Please list and known ’unknowns,’ that is, are there policy decisions that you are aware of that are still pending or are subject to change? If so, please list to the best of your ability. -

- -
-
-

-

- Model Plan status -

+

- -

+ class="margin-0" + > + Model Plan status +

+
+ + +

+

-
-
- + + +
- - +
{ handleSubmit(e); }} > - - ( - <> - - {t('learningSystem')} - +
+ + ( + <> + + {t('learningSystem')} + - {itSolutionsStarted && ( - - handleFormSubmit( - `/models/${modelID}/task-list/it-solutions` - ) - } - /> - )} + {itSolutionsStarted && ( + + handleFormSubmit( + `/models/${modelID}/task-list/it-solutions` + ) + } + /> + )} - - {flatErrors.modelLearningSystems} - + + {flatErrors.modelLearningSystems} + - {Object.keys(ModelLearningSystemType) - .sort(sortOtherEnum) - .map(type => { - return ( - - - ) => { - if (e.target.checked) { - arrayHelpers.push(e.target.value); - } else { - const idx = values.modelLearningSystems.indexOf( - e.target - .value as ModelLearningSystemType - ); - arrayHelpers.remove(idx); - } - }} - /> - {type === ModelLearningSystemType.OTHER && - values.modelLearningSystems.includes( - type - ) && ( -
- - - {flatErrors.modelLearningSystemsOther} - - -
- )} -
- ); - })} - - - )} - /> -
+ {Object.keys(ModelLearningSystemType) + .sort(sortOtherEnum) + .map(type => { + return ( + + + ) => { + if (e.target.checked) { + arrayHelpers.push(e.target.value); + } else { + const idx = values.modelLearningSystems.indexOf( + e.target + .value as ModelLearningSystemType + ); + arrayHelpers.remove(idx); + } + }} + /> + {type === ModelLearningSystemType.OTHER && + values.modelLearningSystems.includes( + type + ) && ( +
+ + + {flatErrors.modelLearningSystemsOther} + + +
+ )} +
+ ); + })} + + + )} + /> + - - -

- {t('obstaclesInfo')} -

- - {flatErrors.anticipatedChallenges} - - -
+ + +

+ {t('obstaclesInfo')} +

+ + {flatErrors.anticipatedChallenges} + + +
- {!loading && values.status && ( - - )} + {!loading && values.status && ( + + )} -
+
+ + +
- -
- +
{id && ( diff --git a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Performance/__snapshots__/index.test.tsx.snap b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Performance/__snapshots__/index.test.tsx.snap index 825fab7523..4599ef6f38 100644 --- a/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Performance/__snapshots__/index.test.tsx.snap +++ b/src/views/ModelPlan/TaskList/OpsEvalAndLearning/Performance/__snapshots__/index.test.tsx.snap @@ -97,715 +97,720 @@ exports[`Model Plan Ops Eval and Learning Performance matches snapshot 1`] = ` class="desktop:grid-col-6 margin-top-6" data-testid="ops-eval-and-learning-performance-form" > -
- -
-
- - -
-
- - -
-
- - -
-
-
+
+ - - Add an additional note - -
-
-
- -
-
- - +
+
- Yes - -
+ + +
+
- -
- +
- -
- -
- - -
-
- - +
+
- Yes - -
+ + +
+
- -
- - -
+
-
- - + +
+
- Yes - -
-
- -
+
- No - -
-
- -
-
- -
+
+ +
+
- Yes - -
-
- -
+
- No - -
-
- -
-
- -
+
+ +
+
- Yes - -
-
- -
+
- No - -
-
-
-
+
+