@@ -1877,7 +1877,7 @@ context('Fap reviews tests', () => {
18771877 . find ( '[aria-label="Edit"]' )
18781878 . click ( ) ;
18791879
1880- cy . get ( '[role="tablist"] [role="tab"]' ) . should ( 'have.length' , 2 ) ;
1880+ cy . get ( '[role="tablist"] [role="tab"]' ) . should ( 'have.length' , 3 ) ;
18811881
18821882 cy . finishedLoading ( ) ;
18831883
@@ -1913,6 +1913,76 @@ context('Fap reviews tests', () => {
19131913
19141914 cy . contains ( comment1 ) . should ( 'not.exist' ) ;
19151915 } ) ;
1916+
1917+ it ( 'Fap Reviewer should be see legacy FAP proposals page' , ( ) => {
1918+ cy . createCall ( {
1919+ ...updatedCall ,
1920+ shortCode : 'legacy call' ,
1921+ esiTemplateId : createdEsiTemplateId ,
1922+ proposalWorkflowId : createdWorkflowId ,
1923+ faps : [ createdFapId ] ,
1924+ } ) . then ( ( result ) => {
1925+ createdCallId = result . createCall . id ;
1926+
1927+ cy . assignInstrumentToCall ( {
1928+ callId : createdCallId ,
1929+ instrumentFapIds : { instrumentId : newlyCreatedInstrumentId } ,
1930+ } ) ;
1931+
1932+ cy . createProposal ( { callId : createdCallId } ) . then ( ( result ) => {
1933+ const createdProposal = result . createProposal ;
1934+
1935+ if ( createdProposal ) {
1936+ secondCreatedProposalPk = createdProposal . primaryKey ;
1937+
1938+ cy . updateProposal ( {
1939+ proposalPk : createdProposal . primaryKey ,
1940+ title : proposal2 . title ,
1941+ abstract : proposal2 . abstract ,
1942+ proposerId : initialDBData . users . user1 . id ,
1943+ } ) ;
1944+
1945+ cy . submitProposal ( { proposalPk : createdProposal . primaryKey } ) ;
1946+
1947+ cy . changeProposalsStatus ( {
1948+ statusId : initialDBData . proposalStatuses . finished . id ,
1949+ proposalPks : [ secondCreatedProposalPk ] ,
1950+ } ) ;
1951+
1952+ cy . assignProposalsToInstruments ( {
1953+ instrumentIds : [ newlyCreatedInstrumentId ] ,
1954+ proposalPks : [ secondCreatedProposalPk ] ,
1955+ } ) ;
1956+ cy . assignProposalsToFaps ( {
1957+ fapInstruments : [
1958+ { instrumentId : newlyCreatedInstrumentId , fapId : createdFapId } ,
1959+ ] ,
1960+ proposalPks : [ createdProposal . primaryKey ] ,
1961+ } ) ;
1962+ }
1963+
1964+ cy . updateCall ( {
1965+ id : createdCallId ,
1966+ ...closedCall ,
1967+ shortCode : 'legacy call' ,
1968+ proposalWorkflowId : createdWorkflowId ,
1969+ esiTemplateId : createdEsiTemplateId ,
1970+ faps : [ createdFapId ] ,
1971+ callFapReviewEnded : true ,
1972+ } ) ;
1973+
1974+ cy . visit ( '/FapPage/' + createdFapId ) ;
1975+
1976+ cy . contains ( firstCreatedProposalId ) . should ( 'exist' ) ;
1977+ cy . contains ( createdProposal . proposalId ) . should ( 'not.exist' ) ;
1978+
1979+ cy . contains ( 'Legacy Proposals' ) . click ( ) ;
1980+
1981+ cy . contains ( createdProposal . proposalId ) . should ( 'exist' ) ;
1982+ cy . contains ( firstCreatedProposalId ) . should ( 'not.exist' ) ;
1983+ } ) ;
1984+ } ) ;
1985+ } ) ;
19161986 } ) ;
19171987} ) ;
19181988
0 commit comments