Skip to content

Commit

Permalink
Merge pull request #1299 from CMSgov/MINT-3020/fe-collaboration-area
Browse files Browse the repository at this point in the history
[MINT-3020] Collaboration area page
  • Loading branch information
patrickseguraoddball authored Aug 20, 2024
2 parents d30781b + 3d3d39b commit 0ee659a
Show file tree
Hide file tree
Showing 265 changed files with 4,034 additions and 2,745 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/beneficiaries.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ describe('The Model Plan Beneficiaries Form', () => {

cy.contains('button', 'Save and return to task list').click();

cy.url().should('include', '/task-list');
cy.url().should('include', '/collaboration-area/task-list');
});
});
4 changes: 2 additions & 2 deletions cypress/e2e/characteristics.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('The Model Plan General Characteristics Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/characteristics/
/\/models\/.{36}\/collaboration-area\/task-list\/characteristics/
);
});

Expand Down Expand Up @@ -269,7 +269,7 @@ describe('The Model Plan General Characteristics Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/participants-and-providers$/
/\/models\/.{36}\/collaboration-area\/task-list\/participants-and-providers$/
);
});

Expand Down
5 changes: 4 additions & 1 deletion cypress/e2e/collaborator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ describe('The Collaborator/Team Member Form', () => {
});

cy.get('@modelPlanURL').then(modelPlanURL => {
const taskList = modelPlanURL.replace('read-view', 'task-list');
const taskList = modelPlanURL.replace(
'read-view',
'collaboration-area/task-list'
);
cy.visit(taskList);
cy.location().should(loc => {
expect(loc.pathname).to.match(
Expand Down
32 changes: 23 additions & 9 deletions cypress/e2e/modelPlan.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ describe('The Model Plan Form', () => {
cy.contains('button', 'Next').click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/collaborators/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/collaborators/
);
});

cy.get('[data-testid="page-loading"]').should('not.exist');
Expand All @@ -29,7 +31,9 @@ describe('The Model Plan Form', () => {

// renames a model plan
cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list/
);
});

cy.contains('h1', 'Model Plan task list');
Expand All @@ -39,7 +43,9 @@ describe('The Model Plan Form', () => {
cy.contains('button', /Start$/).click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list\/basics/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list\/basics/
);
});

cy.get('[data-testid="fieldset"]').should('not.be.disabled');
Expand All @@ -52,7 +58,9 @@ describe('The Model Plan Form', () => {
cy.contains('button', 'Save and return to task list').click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list/
);
});

cy.get('[data-testid="model-plan-name"]').contains(
Expand Down Expand Up @@ -92,7 +100,7 @@ describe('The Model Plan Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/basics\/overview/
/\/models\/.{36}\/collaboration-area\/task-list\/basics\/overview/
);
});

Expand All @@ -119,7 +127,7 @@ describe('The Model Plan Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/basics\/milestones/
/\/models\/.{36}\/collaboration-area\/task-list\/basics\/milestones/
);
});

Expand Down Expand Up @@ -171,21 +179,27 @@ describe('The Model Plan Form', () => {
cy.contains('button', 'Save and return to task list').click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list/
);
});

cy.get('.model-plan-task-list__last-updated-status').should('be.visible');

cy.get('[data-testid="tasklist-tag"]').first().contains('In progress');

cy.get('[data-testid="return-to-collaboration"]').click();

// updates model plan status

cy.get('.mint-tag').contains('Draft Model Plan');

cy.contains('a', 'Update').click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/status/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/status/
);
});

cy.contains('h1', 'Update status');
Expand All @@ -204,7 +218,7 @@ describe('The Model Plan Form', () => {
.click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(/\/models\/.{36}\/collaboration-area/);
});

cy.get('.mint-tag').contains('Cleared');
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/notification.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('Notification Center', () => {
cy.clickPlanTableByName('Empty Plan');

// Add SF13 as a collaborator
cy.get('a[href*="/collaborators?view=manage"]').click();
cy.get('a[href*="/collaboration-area/collaborators?view=manage"]').click();

cy.contains('a', 'Add team member').click();

Expand Down Expand Up @@ -211,7 +211,7 @@ describe('Notification Center', () => {

cy.contains('button', 'Start collaborating').click();

cy.url().should('include', '/task-list');
cy.url().should('include', '/collaboration-area/task-list');
});

it('testing New Model Plan Notification', () => {
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('Notification Center', () => {
.should('have.value', 'Cypress Model Plan');

cy.contains('button', 'Next').click();
cy.url().should('include', '/collaborators');
cy.url().should('include', '/collaboration-area/collaborators');

// Navigate back to Notification Center
cy.get('[data-testid="navmenu__notification"]').first().click();
Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/opsEvalAndLearning.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ describe('The Model Plan Ops Eval and Learning Form', () => {
.wait(500);

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list/
);
});
});
});
6 changes: 4 additions & 2 deletions cypress/e2e/participantsAndProviders.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('The Model Plan Participants and providers Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/participants-and-providers/
/\/models\/.{36}\/collaboration-area\/task-list\/participants-and-providers/
);
});
cy.get('[data-testid="model-plan-name"]').contains('for Empty Plan');
Expand Down Expand Up @@ -267,7 +267,9 @@ describe('The Model Plan Participants and providers Form', () => {
cy.contains('button', 'Save and return to task list').click();

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list/
);
});
});
});
18 changes: 10 additions & 8 deletions cypress/e2e/payments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ describe('The Model Plan Payment Form', () => {
// Page - /payment

cy.location().should(loc => {
expect(loc.pathname).to.match(/\/models\/.{36}\/task-list\/payment/);
expect(loc.pathname).to.match(
/\/models\/.{36}\/collaboration-area\/task-list\/payment/
);
});

cy.get(
Expand Down Expand Up @@ -75,7 +77,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/claims-based-payment/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/claims-based-payment/
);
});

Expand Down Expand Up @@ -115,7 +117,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/anticipating-dependencies/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/anticipating-dependencies/
);
});

Expand All @@ -142,7 +144,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/beneficiary-cost-sharing/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/beneficiary-cost-sharing/
);
});

Expand All @@ -169,7 +171,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/non-claims-based-payment/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/non-claims-based-payment/
);
});

Expand Down Expand Up @@ -207,7 +209,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/complexity/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/complexity/
);
});

Expand Down Expand Up @@ -250,7 +252,7 @@ describe('The Model Plan Payment Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/payment\/recover-payment/
/\/models\/.{36}\/collaboration-area\/task-list\/payment\/recover-payment/
);
});

Expand Down Expand Up @@ -294,7 +296,7 @@ describe('The Model Plan Payment Form', () => {
cy.contains('button', 'Continue to operational solutions tracker').click();
cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/it-solutions$/
/\/models\/.{36}\/collaboration-area\/task-list\/it-solutions$/
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/prepareForClearance.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('The Model Plan Prepare for Clearance Form', () => {

cy.location().should(loc => {
expect(loc.pathname).to.match(
/\/models\/.{36}\/task-list\/prepare-for-clearance/
/\/models\/.{36}\/collaboration-area\/task-list\/prepare-for-clearance/
);
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/webSocket.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Web Socket Connections', () => {
modelPlanID,
section: TaskListSection.PAYMENT
});
cy.visit(`/models/${modelPlanID}/task-list/payment`);
cy.visit(`/models/${modelPlanID}/collaboration-area/task-list/payment`);
});

cy.get('[data-testid="page-locked"]').contains(
Expand Down
8 changes: 7 additions & 1 deletion cypress/support/model-plan-by-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Cypress.Commands.add('clickPlanTableByName', (planName, table) => {
cy.get(`[data-testid="${table || 'table'}"] a`)
.contains(planName)
.click();
cy.url().should('include', '/task-list');
cy.url().should('include', '/collaboration-area');

cy.get('[data-testid="page-loading"]').should('not.exist');

cy.get(`[data-testid="to-task-list"]`).click();
cy.url().should('include', '/collaboration-area/task-list');

cy.get('[data-testid="page-loading"]').should('not.exist');
});
2 changes: 1 addition & 1 deletion pkg/email/templates/added_as_collaborator_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>You&#39;ve been added as a collaborator on {{.ModelName}} in MINT.</p>
<br/>
<h2>
<a href="{{.ClientAddress}}/models/{{.ModelID}}/task-list">Start collaborating now</a>
<a href="{{.ClientAddress}}/models/{{.ModelID}}/collaboration-area">Start collaborating now</a>
</h2>
<br/>
<p>If you have not already been given access to MINT or if you cannot log in with your EUA credentials, please contact the MINT Team at
Expand Down
2 changes: 1 addition & 1 deletion pkg/email/templates/aggregated_daily_digest_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3>{{$audit.ModelName}}</h3>

<br />

<a href="{{$.ClientAddress}}/models/{{$audit.ModelPlanID}}/task-list"> View this Model Plan in MINT </a>
<a href="{{$.ClientAddress}}/models/{{$audit.ModelPlanID}}/collaboration-area/task-list"> View this Model Plan in MINT </a>

<br />
<br />
Expand Down
6 changes: 3 additions & 3 deletions pkg/email/templates/model_plan_suggested_phase_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
{{end}}
<br />
<br />
<a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/task-list?model-status={{index .SuggestedStatusesRaw 0}}">Yes, update my model’s status</a>
<a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/collaboration-area/status?model-status={{index .SuggestedStatusesRaw 0}}">Yes, update my model’s status</a>
<br/>
<br/>
<p>If you’re not ready to update your model’s status, please <a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/task-list/basics/milestones">adjust your model’s anticipated timeline</a>. If you adjust your timeline, you may receive this notification again.</p>
<p>If you’re not ready to update your model’s status, please <a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/collaboration-area/task-list/basics/milestones">adjust your model’s anticipated timeline</a>. If you adjust your timeline, you may receive this notification again.</p>
<hr />
<br />
<p>You’re receiving this notification because you are listed as the model lead for {{.ModelPlanName}}. If this is incorrect, <a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/collaborators">please update the model team</a>.</p>
<p>You’re receiving this notification because you are listed as the model lead for {{.ModelPlanName}}. If this is incorrect, <a href="{{.ClientAddress}}/models/{{.ModelPlanID}}/collaboration-area/collaborators">please update the model team</a>.</p>
2 changes: 1 addition & 1 deletion pkg/email/templates/plan_discussion_created_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Discussion</h2>
<p class="subtitle"> {{.Role}}</p>
<p>{{.DiscussionContent}}</p>
<p style="font-weight: normal">
<a href="{{.ClientAddress}}/models/{{.ModelID}}/task-list?discussionID={{.DiscussionID}}">
<a href="{{.ClientAddress}}/models/{{.ModelID}}/collaboration-area/task-list?discussionID={{.DiscussionID}}">
Respond to this discussion in MINT
</a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/AskAQuestion/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ describe('Ask a Question Component', () => {
const { getByText, getByTestId } = render(
<MemoryRouter
initialEntries={[
'/models/ce3405a0-3399-4e3a-88d7-3cfc613d2905/task-list/basics'
'/models/ce3405a0-3399-4e3a-88d7-3cfc613d2905/collaboration-area/task-list/basics'
]}
>
<Route path="/models/:modelID/task-list/basics">
<Route path="/models/:modelID/collaboration-area/task-list/basics">
<MockedProvider mocks={mocks} addTypename={false}>
<Provider store={store}>
<AskAQuestion modelID={modelID} />
Expand Down
Loading

0 comments on commit 0ee659a

Please sign in to comment.