Skip to content

Commit 2cc0511

Browse files
Fixes error in data statement validation
Issue: documentacao-e-tarefas/scielo#826 Signed-off-by: Jhon <jhon@lepidus.com.br>
1 parent c5ca249 commit 2cc0511

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

classes/dispatchers/DataStatementDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function validateSubmissionFields($hookName, $params)
216216
}
217217
}
218218

219-
if (in_array(DataStatementService::DATA_STATEMENT_TYPE_REPO_AVAILABLE, $dataStatementTypes)
219+
if (in_array(DataStatementService::DATA_STATEMENT_TYPE_PUBLICLY_UNAVAILABLE, $dataStatementTypes)
220220
&& !$dataStatementReason
221221
) {
222222
$errors['dataStatementReason'] = [__('plugins.generic.dataverse.dataStatement.publiclyUnavailable.reason.required')];

cypress/tests/Test1_submissionWizard.cy.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ describe('Dataverse Plugin - Submission wizard features', function () {
6161
cy.get('input[name="dataStatementTypes"][value=2]').click();
6262
cy.contains('Insert the URLs to the data');
6363
cy.get('#dataStatement-dataStatementUrls-control').should('be.visible');
64-
cy.get('.pkpFormLocales__locale:contains("French")').eq(1).click();
65-
cy.get('#dataStatement-dataStatementReason-control-fr_CA').should('not.be.visible');
6664
advanceNSteps(4);
6765
cy.contains('h3', 'Data statement');
6866
cy.contains('It is required to inform the URLs to the data in repositories');

0 commit comments

Comments
 (0)