Skip to content

Commit cede4f1

Browse files
TCMeldrumCopilotyoganandaness
authored
feat: a view to show what proposals are assigned to fap reviewers (#1496)
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Yoganandan Pandiyan <132274772+yoganandaness@users.noreply.github.com>
1 parent cb11537 commit cede4f1

18 files changed

Lines changed: 1389 additions & 453 deletions

apps/e2e/cypress/e2e/FAPs.cy.ts

Lines changed: 98 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,75 @@ context('Fap reviews tests', () => {
12351235
'1'
12361236
);
12371237
});
1238+
1239+
it('Should be able to see the Reviewers to Assignments view', () => {
1240+
cy.assignProposalsToFaps({
1241+
fapInstruments: [
1242+
{ instrumentId: newlyCreatedInstrumentId, fapId: createdFapId },
1243+
],
1244+
proposalPks: [firstCreatedProposalPk],
1245+
});
1246+
cy.assignReviewersToFap({
1247+
fapId: createdFapId,
1248+
memberIds: [fapMembers.reviewer.id],
1249+
});
1250+
cy.assignFapReviewersToProposals({
1251+
assignments: {
1252+
memberId: fapMembers.reviewer.id,
1253+
proposalPk: firstCreatedProposalPk,
1254+
},
1255+
fapId: createdFapId,
1256+
});
1257+
1258+
cy.login('officer');
1259+
cy.visit(`/FapPage/${createdFapId}?tab=4`);
1260+
cy.finishedLoading();
1261+
1262+
cy.contains(fapMembers.reviewer.lastName).should('be.visible');
1263+
1264+
cy.get('[aria-label="Detail panel visibility toggle"]').first().click();
1265+
cy.contains(firstCreatedProposalId).should('be.visible');
1266+
});
1267+
1268+
it.only('Should be able to assign proposals to reviewers in the Reviewers to Assignments view', () => {
1269+
cy.assignProposalsToFaps({
1270+
fapInstruments: [
1271+
{ instrumentId: newlyCreatedInstrumentId, fapId: createdFapId },
1272+
],
1273+
proposalPks: [firstCreatedProposalPk],
1274+
});
1275+
cy.assignReviewersToFap({
1276+
fapId: createdFapId,
1277+
memberIds: [fapMembers.reviewer.id],
1278+
});
1279+
1280+
cy.login('officer');
1281+
cy.visit(`/FapPage/${createdFapId}?tab=4`);
1282+
cy.finishedLoading();
1283+
1284+
cy.contains(fapMembers.reviewer.lastName)
1285+
.parent()
1286+
.find('input[type="checkbox"]')
1287+
.click();
1288+
1289+
cy.get('[data-cy="assign-proposals-to-member"]').click();
1290+
1291+
cy.get('[role="dialog"]').contains('Proposals to assign to reviewer');
1292+
1293+
cy.contains(firstCreatedProposalId)
1294+
.parent()
1295+
.find('input[type="checkbox"]')
1296+
.click();
1297+
1298+
cy.get('[data-cy="assign-selected-proposals"]').click();
1299+
1300+
clickConfirmOk();
1301+
1302+
cy.contains('0 / 1').should('be.visible');
1303+
1304+
cy.get('[aria-label="Detail panel visibility toggle"]').first().click();
1305+
cy.contains(firstCreatedProposalId).should('be.visible');
1306+
});
12381307
});
12391308

12401309
describe('Fap Chair role', () => {
@@ -2260,7 +2329,7 @@ context('Fap meeting components tests', () => {
22602329
describe('User Officer role', () => {
22612330
it('Officer should be able to assign proposal to instrument and instrument to call to see it in meeting components', () => {
22622331
cy.login('officer');
2263-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2332+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
22642333

22652334
cy.finishedLoading();
22662335

@@ -2289,7 +2358,7 @@ context('Fap meeting components tests', () => {
22892358

22902359
it('Officer should not be able to submit an instrument if all proposals are not submitted in Fap meetings', () => {
22912360
cy.login('officer');
2292-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2361+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
22932362

22942363
cy.finishedLoading();
22952364

@@ -2357,7 +2426,7 @@ context('Fap meeting components tests', () => {
23572426
});
23582427

23592428
cy.login('officer');
2360-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2429+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
23612430

23622431
cy.finishedLoading();
23632432

@@ -2415,7 +2484,7 @@ context('Fap meeting components tests', () => {
24152484
}
24162485
});
24172486
cy.login('officer');
2418-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2487+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
24192488

24202489
cy.finishedLoading();
24212490

@@ -2570,7 +2639,7 @@ context('Fap meeting components tests', () => {
25702639
}
25712640
});
25722641
cy.login('officer');
2573-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2642+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
25742643

25752644
cy.finishedLoading();
25762645

@@ -2590,7 +2659,7 @@ context('Fap meeting components tests', () => {
25902659

25912660
it('Officer should be able to see proposals that are marked red if they do not fit in availability time', () => {
25922661
cy.login('officer');
2593-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2662+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
25942663

25952664
cy.finishedLoading();
25962665

@@ -2602,7 +2671,7 @@ context('Fap meeting components tests', () => {
26022671

26032672
it('Officer should be able to update avaliblity time', () => {
26042673
cy.login('officer');
2605-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2674+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
26062675

26072676
cy.finishedLoading();
26082677

@@ -2616,7 +2685,7 @@ context('Fap meeting components tests', () => {
26162685

26172686
it('Officer should be able to edit Fap Meeting form', () => {
26182687
cy.login('officer');
2619-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2688+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
26202689

26212690
cy.finishedLoading();
26222691

@@ -2682,7 +2751,7 @@ context('Fap meeting components tests', () => {
26822751
);
26832752

26842753
cy.login('officer');
2685-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2754+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
26862755

26872756
cy.finishedLoading();
26882757

@@ -2787,7 +2856,7 @@ context('Fap meeting components tests', () => {
27872856
});
27882857

27892858
cy.login('officer');
2790-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2859+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
27912860

27922861
cy.finishedLoading();
27932862

@@ -2848,7 +2917,7 @@ context('Fap meeting components tests', () => {
28482917
});
28492918

28502919
cy.login('officer');
2851-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2920+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
28522921

28532922
cy.finishedLoading();
28542923

@@ -2912,7 +2981,7 @@ context('Fap meeting components tests', () => {
29122981
});
29132982

29142983
cy.login('officer');
2915-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
2984+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
29162985

29172986
cy.finishedLoading();
29182987

@@ -2948,7 +3017,7 @@ context('Fap meeting components tests', () => {
29483017

29493018
it('Officer should be able to set Fap time allocation', () => {
29503019
cy.login('officer');
2951-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3020+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
29523021

29533022
cy.finishedLoading();
29543023

@@ -3000,7 +3069,7 @@ context('Fap meeting components tests', () => {
30003069
it('should use Fap time allocation (if set) when calculating if they fit in available time', () => {
30013070
const newFapTimeAllocation = 15;
30023071
cy.login('officer');
3003-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3072+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
30043073

30053074
cy.finishedLoading();
30063075

@@ -3152,7 +3221,7 @@ context('Fap meeting components tests', () => {
31523221
});
31533222

31543223
cy.login('officer');
3155-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3224+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
31563225

31573226
cy.finishedLoading();
31583227

@@ -3185,7 +3254,7 @@ context('Fap meeting components tests', () => {
31853254

31863255
it('Officer should be able to submit an instrument if all proposals Fap meetings are submitted in existing Fap', () => {
31873256
cy.login('officer');
3188-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3257+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
31893258

31903259
cy.finishedLoading();
31913260

@@ -3301,7 +3370,7 @@ context('Fap meeting components tests', () => {
33013370
fapId: createdFapId,
33023371
});
33033372
cy.login('officer');
3304-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3373+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
33053374

33063375
cy.finishedLoading();
33073376

@@ -3319,7 +3388,7 @@ context('Fap meeting components tests', () => {
33193388

33203389
it('Download Fap is working with dialog window showing up', () => {
33213390
cy.login('officer');
3322-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3391+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
33233392

33243393
cy.finishedLoading();
33253394

@@ -3556,7 +3625,7 @@ context('Fap meeting components tests', () => {
35563625
cy.changeActiveRole(initialDBData.roles.fapChair);
35573626
});
35583627
it('Fap Chair should be able to edit Fap Meeting form', () => {
3559-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3628+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
35603629

35613630
cy.finishedLoading();
35623631

@@ -3584,7 +3653,7 @@ context('Fap meeting components tests', () => {
35843653
instrumentId: createdInstrumentId,
35853654
fapId: createdFapId,
35863655
});
3587-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3656+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
35883657

35893658
cy.finishedLoading();
35903659
cy.get('button[aria-label="Submit instrument"]').should('not.exist');
@@ -3619,7 +3688,7 @@ context('Fap meeting components tests', () => {
36193688

36203689
it('Fap Chair should be able to update avalibabity time', () => {
36213690
cy.login('officer');
3622-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3691+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
36233692

36243693
cy.finishedLoading();
36253694

@@ -3751,7 +3820,7 @@ context('Fap meeting components tests', () => {
37513820

37523821
cy.login(fapMembers.chair);
37533822
cy.changeActiveRole(initialDBData.roles.fapChair);
3754-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3823+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
37553824

37563825
cy.finishedLoading();
37573826

@@ -3790,7 +3859,7 @@ context('Fap meeting components tests', () => {
37903859
});
37913860

37923861
it('Fap Secretary should be able to edit Fap Meeting form', () => {
3793-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3862+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
37943863

37953864
cy.finishedLoading();
37963865

@@ -3818,7 +3887,7 @@ context('Fap meeting components tests', () => {
38183887
instrumentId: createdInstrumentId,
38193888
fapId: createdFapId,
38203889
});
3821-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3890+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
38223891

38233892
cy.finishedLoading();
38243893
cy.get('button[aria-label="Submit instrument"]').should('not.exist');
@@ -3853,7 +3922,7 @@ context('Fap meeting components tests', () => {
38533922

38543923
it('Fap Secretary should be able to update avalibabity time', () => {
38553924
cy.login('officer');
3856-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
3925+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
38573926

38583927
cy.finishedLoading();
38593928

@@ -3985,7 +4054,7 @@ context('Fap meeting components tests', () => {
39854054

39864055
cy.login(fapMembers.secretary);
39874056
cy.changeActiveRole(initialDBData.roles.fapSecretary);
3988-
cy.visit(`/FapPage/${createdFapId}?tab=4`);
4057+
cy.visit(`/FapPage/${createdFapId}?tab=5`);
39894058

39904059
cy.finishedLoading();
39914060

@@ -4731,7 +4800,7 @@ context('Fap meeting exports test', () => {
47314800
});
47324801

47334802
cy.login('officer');
4734-
cy.visit('/FapPage/2?tab=4&call=1');
4803+
cy.visit('/FapPage/2?tab=5&call=1');
47354804

47364805
cy.get('button[aria-label="Export in Excel"]').click();
47374806
cy.get('[data-cy=preparing-download-dialog').should('not.exist');
@@ -4798,7 +4867,7 @@ context('Fap meeting exports test', () => {
47984867
}
47994868
});
48004869
cy.login('officer');
4801-
cy.visit('/FapPage/2?tab=4&call=1');
4870+
cy.visit('/FapPage/2?tab=5&call=1');
48024871

48034872
cy.get('button[aria-label="Export in Excel"]').click();
48044873
cy.get('[data-cy=preparing-download-dialog').should('not.exist');
@@ -4873,7 +4942,7 @@ context('Fap meeting exports test', () => {
48734942
});
48744943

48754944
cy.login('officer');
4876-
cy.visit('/FapPage/2?tab=4&call=1');
4945+
cy.visit('/FapPage/2?tab=5&call=1');
48774946

48784947
cy.get('button[aria-label="Export in Excel"]').click();
48794948
cy.get('[data-cy=preparing-download-dialog').should('not.exist');

apps/e2e/cypress/e2e/eventLogs.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ context('Event log tests', () => {
129129
cy.get('[data-cy="add-participant-button"]').click();
130130
cy.get('input[type="checkbox"]').eq(0).check();
131131
cy.get('[data-cy="assign-selected-users"]').click();
132-
cy.get('.MuiTabs-flexContainer > #horizontal-tab-7').click();
132+
cy.get('.MuiTabs-flexContainer > #horizontal-tab-8').click();
133133
cy.contains('userId:2 impersonating userId:1');
134134
});
135135
});

apps/e2e/cypress/e2e/generalFaps.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ context('General facility access panel tests', () => {
713713
const fileName1 = 'pdf_5_pages.pdf';
714714
const fileName2 = 'pdf_3_pages.pdf';
715715
cy.login('officer');
716-
cy.visit(`/FapPage/1?tab=6`);
716+
cy.visit(`/FapPage/1?tab=7`);
717717

718718
cy.intercept({
719719
method: 'POST',
@@ -746,7 +746,7 @@ context('General facility access panel tests', () => {
746746
cy.contains(fileName2).should('exist');
747747

748748
// Files persist after reload
749-
cy.visit(`/FapPage/1?tab=6`);
749+
cy.visit(`/FapPage/1?tab=7`);
750750

751751
cy.contains(fileName1).should('exist');
752752
cy.contains(fileName2).should('exist');
@@ -757,7 +757,7 @@ context('General facility access panel tests', () => {
757757
cy.contains(fileName2).should('not.exist');
758758

759759
// Files removed after reload
760-
cy.visit(`/FapPage/1?tab=6`);
760+
cy.visit(`/FapPage/1?tab=7`);
761761

762762
cy.contains(fileName1).should('not.exist');
763763
cy.contains(fileName2).should('not.exist');
@@ -782,7 +782,7 @@ context('General facility access panel tests', () => {
782782
const fileName1 = 'pdf_5_pages.pdf';
783783

784784
cy.login('officer');
785-
cy.visit(`/FapPage/1?tab=6`);
785+
cy.visit(`/FapPage/1?tab=7`);
786786

787787
cy.intercept({
788788
method: 'POST',
@@ -827,7 +827,7 @@ context('General facility access panel tests', () => {
827827
const fileName1 = 'pdf_5_pages.pdf';
828828

829829
cy.login('officer');
830-
cy.visit(`/FapPage/1?tab=6`);
830+
cy.visit(`/FapPage/1?tab=7`);
831831

832832
cy.intercept({
833833
method: 'POST',
@@ -869,7 +869,7 @@ context('General facility access panel tests', () => {
869869
const fileName1 = 'pdf_5_pages.pdf';
870870

871871
cy.login('officer');
872-
cy.visit(`/FapPage/1?tab=6`);
872+
cy.visit(`/FapPage/1?tab=7`);
873873

874874
cy.intercept({
875875
method: 'POST',

0 commit comments

Comments
 (0)