@@ -43,10 +43,12 @@ describe('Dataverse Plugin - Submission wizard features', function () {
4343
4444 it ( 'Begins submission. Checks for data statement fields' , function ( ) {
4545 cy . login ( 'eostrom' , null , 'publicknowledge' ) ;
46-
46+
4747 cy . get ( 'div#myQueue a:contains("New Submission")' ) . click ( ) ;
4848 beginSubmission ( submissionData ) ;
4949
50+ cy . intercept ( "POST" , / s u b m i s s i o n s \/ \d + \/ s u b m i t / ) . as ( 'submissionValidation' ) ;
51+
5052 cy . setTinyMceContent ( 'titleAbstract-abstract-control-en' , submissionData . abstract ) ;
5153 submissionData . keywords . forEach ( keyword => {
5254 cy . get ( '#titleAbstract-keywords-control-en' ) . type ( keyword , { delay : 0 } ) ;
@@ -62,6 +64,11 @@ describe('Dataverse Plugin - Submission wizard features', function () {
6264 cy . contains ( 'Insert the URLs to the data' ) ;
6365 cy . get ( '#dataStatement-dataStatementUrls-control' ) . should ( 'be.visible' ) ;
6466 advanceNSteps ( 4 ) ;
67+ cy . wait ( '@submissionValidation' ) . then ( ( interception ) => {
68+ assert . equal ( interception . response . statusCode , 400 ) ;
69+ assert . property ( interception . response . body , 'dataStatementUrls' ) ;
70+ assert . notProperty ( interception . response . body , 'dataStatementReason' ) ;
71+ } ) ;
6572 cy . contains ( 'h3' , 'Data statement' ) ;
6673 cy . contains ( 'It is required to inform the URLs to the data in repositories' ) ;
6774
0 commit comments