@@ -9,7 +9,7 @@ function advanceNSteps(n) {
99
1010function assertAdditionalInstructionsDisplay ( ) {
1111 cy . contains ( '1. Submit under "Research Data" any files that have been collected' ) ;
12- cy . contains ( '2. It is mandatory to include a file named "Readme"' ) ;
12+ cy . contains ( '2. It is mandatory to include a file named "Readme"/"Leiame"/"Leame" ' ) ;
1313 cy . contains ( 'For additional guidance on creating the file, consult the suggested references below' ) ;
1414 cy . contains ( '3. The files deposited in "Research Data" will form a dataset' ) ;
1515}
@@ -197,7 +197,7 @@ describe('Dataverse Plugin - Submission wizard features', function () {
197197 cy . fixture ( '../../plugins/generic/dataverse/cypress/fixtures/README.pdf' , 'base64' ) . then ( ( fileContent ) => {
198198 cy . get ( '#datasetFileForm-datasetFile-hiddenFileId' ) . attachFile ( {
199199 fileContent,
200- fileName : 'README .pdf' ,
200+ fileName : 'LEIAME .pdf' ,
201201 mimeType : 'application/pdf' ,
202202 encoding : 'base64' ,
203203 } ) ;
@@ -206,12 +206,35 @@ describe('Dataverse Plugin - Submission wizard features', function () {
206206 cy . get ( 'input[name="termsOfUse"]' ) . check ( ) ;
207207 cy . get ( 'form:visible button:contains("Save")' ) . click ( ) ;
208208 cy . get ( '#datasetFiles' ) . contains ( 'a' , 'Planilha_de_dados_ÇÕÔÁÀÃ.json' ) ;
209+ cy . get ( '#datasetFiles' ) . contains ( 'a' , 'LEIAME.pdf' ) ;
210+
211+ advanceNSteps ( 3 ) ;
212+ cy . get ( 'div:contains("It is mandatory to send a README file, in PDF, MD or TXT format, to accompany the research data files")' ) . should ( 'not.exist' ) ;
213+ cy . contains ( 'a' , 'LEIAME.pdf' ) ;
214+ cy . contains ( 'a' , 'Planilha_de_dados_ÇÕÔÁÀÃ.json' ) ;
215+
216+ cy . get ( '.pkpSteps__step__label:contains("Upload Files")' ) . click ( ) ;
217+ cy . get ( '.listPanel__item:contains(LEIAME.pdf) button:contains(Delete)' ) . click ( ) ;
218+ cy . get ( '.modal__panel--dialog button:contains("Delete File")' ) . click ( ) ;
219+ cy . waitJQuery ( ) ;
220+
221+ cy . contains ( 'button' , 'Add research data' ) . click ( ) ;
222+ cy . fixture ( '../../plugins/generic/dataverse/cypress/fixtures/README.pdf' , 'base64' ) . then ( ( fileContent ) => {
223+ cy . get ( '#datasetFileForm-datasetFile-hiddenFileId' ) . attachFile ( {
224+ fileContent,
225+ fileName : 'README.pdf' ,
226+ mimeType : 'application/pdf' ,
227+ encoding : 'base64' ,
228+ } ) ;
229+ } ) ;
230+ cy . wait ( 1000 ) ;
231+ cy . get ( 'input[name="termsOfUse"]' ) . check ( ) ;
232+ cy . get ( 'form:visible button:contains("Save")' ) . click ( ) ;
209233 cy . get ( '#datasetFiles' ) . contains ( 'a' , 'README.pdf' ) ;
210234
211235 advanceNSteps ( 3 ) ;
212236 cy . get ( 'div:contains("It is mandatory to send a README file, in PDF, MD or TXT format, to accompany the research data files")' ) . should ( 'not.exist' ) ;
213237 cy . contains ( 'a' , 'README.pdf' ) ;
214- cy . contains ( 'a' , 'Planilha_de_dados_ÇÕÔÁÀÃ.json' ) ;
215238 } ) ;
216239 it ( 'Adds dataset metadata' , function ( ) {
217240 cy . login ( 'eostrom' , null , 'publicknowledge' ) ;
0 commit comments