From 9068540315071d2aec4c0fb3d3f861f3b5856a06 Mon Sep 17 00:00:00 2001 From: Jhon Date: Tue, 30 Jul 2024 17:34:19 -0400 Subject: [PATCH 1/2] Updates integration test - New relations button display rules Issue: documentacao-e-tarefas/scielo#687 Signed-off-by: Jhon --- .gitlab-ci.yml | 2 +- cypress/tests/Test5_relations.cy.js | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0312bbc..036ff1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,4 +6,4 @@ include: ref: main file: - 'templates/groups/pkp_plugin.yml' - - 'templates/groups/ops_3_4_plugins_cypress_tests_model.yml' \ No newline at end of file + - 'templates/groups/ops/cypress_tests.yml' \ No newline at end of file diff --git a/cypress/tests/Test5_relations.cy.js b/cypress/tests/Test5_relations.cy.js index 170b202..1655539 100644 --- a/cypress/tests/Test5_relations.cy.js +++ b/cypress/tests/Test5_relations.cy.js @@ -1,6 +1,20 @@ describe('Author Version - Submission relations updating', function () { let publishedArticleDoi = 'https://doi.org/10.1234/Non-existentDoi'; + it('Changes preprint relation to "published as an article"', function () { + cy.login('zwoods', null, 'publicknowledge'); + cy.get('#myQueue-button').click(); + cy.contains('View Woods').click({force: true}); + + cy.get('button:contains("Relations")').click(); + cy.get('.pkpWorkflow__relateForm input[value="3"]').click(); + cy.get('.pkpWorkflow__relateForm input[name="vorDoi"]').clear().type(publishedArticleDoi, {delay: 0}); + cy.get('.pkpWorkflow__relateForm button:contains("Save")').click(); + + cy.reload(); + cy.get('button:contains("Relations")'); + cy.get('button:contains("Create New Version")').should('not.exist'); + }); it('Moderator posts last version of submission', function () { cy.login('dbarnes', null, 'publicknowledge'); cy.get('#newVersion-button').click(); @@ -10,17 +24,11 @@ describe('Author Version - Submission relations updating', function () { cy.get('.pkpHeader .pkpHeader__actions button:contains("Post")').click(); cy.get('.pkp_modal_panel button:contains("Post")').click(); }); - it('Changes preprint relation to "published as an article"', function () { + it('Author can not change relations or create new version anymore', function () { cy.login('zwoods', null, 'publicknowledge'); cy.get('#archive-button').click(); cy.contains('View Woods').click({force: true}); - - cy.get('button:contains("Relations")').click(); - cy.get('.pkpWorkflow__relateForm input[value="3"]').click(); - cy.get('.pkpWorkflow__relateForm input[name="vorDoi"]').clear().type(publishedArticleDoi, {delay: 0}); - cy.get('.pkpWorkflow__relateForm button:contains("Save")').click(); - cy.reload(); cy.get('button:contains("Relations")').should('not.exist'); cy.get('button:contains("Create New Version")').should('not.exist'); }); From 9dac9434955319ecdec1e44fbdebdc7c28403388 Mon Sep 17 00:00:00 2001 From: Jhon Date: Tue, 30 Jul 2024 17:41:01 -0400 Subject: [PATCH 2/2] Updates rules for displaying relations button Issue: documentacao-e-tarefas/scielo#687 Signed-off-by: Jhon --- templates/relationsButton.tpl | 2 +- version.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/relationsButton.tpl b/templates/relationsButton.tpl index eb9b22e..9c4d595 100644 --- a/templates/relationsButton.tpl +++ b/templates/relationsButton.tpl @@ -1,4 +1,4 @@ - + authorVersion plugins.generic - 2.0.0.0 - 2023-12-11 + 2.0.1.0 + 2024-07-30 1 AuthorVersionPlugin