From 2545fb79a8eb4f48be0c3daa497a53dd38a33eca Mon Sep 17 00:00:00 2001 From: Jhon Date: Mon, 12 Aug 2024 16:38:55 -0400 Subject: [PATCH 1/4] Updates integration test - New rules relation button Issue: documentacao-e-tarefas/scielo#691 Signed-off-by: Jhon --- cypress/tests/Test5_relations.cy.js | 34 ++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/cypress/tests/Test5_relations.cy.js b/cypress/tests/Test5_relations.cy.js index 1655539..76444b6 100644 --- a/cypress/tests/Test5_relations.cy.js +++ b/cypress/tests/Test5_relations.cy.js @@ -1,7 +1,38 @@ 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 () { + it('Author can change relations on posted preprint version', function () { + cy.login('zwoods', null, 'publicknowledge'); + cy.get('#myQueue-button').click(); + cy.contains('View Woods').click({force: true}); + cy.get('button:contains("Relations")'); + cy.logout(); + + cy.login('dbarnes', null, 'publicknowledge'); + cy.get('#newVersion-button').click(); + cy.contains('View Woods').click({force: true}); + cy.get('#publication-button').click(); + cy.get('.pkpHeader .pkpHeader__actions button:contains("Post")').click(); + cy.get('.pkp_modal_panel button:contains("Post")').click(); + cy.get('.pkpPublication__statusPublished'); + cy.logout(); + + cy.login('zwoods', null, 'publicknowledge'); + cy.get('#archive-button').click(); + cy.contains('View Woods').click({force: true}); + cy.get('.pkpPublication__statusPublished'); + cy.get('button:contains("Relations")'); + cy.logout(); + + cy.login('dbarnes', null, 'publicknowledge'); + cy.get('#archive-button').click(); + cy.contains('View Woods').click({force: true}); + cy.get('#publication-button').click(); + cy.get('button:contains("Unpost")').click(); + cy.get('.modal button:contains("Unpost")').click(); + cy.get('.pkpPublication__statusUnpublished'); + }); + it('Author 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}); @@ -23,6 +54,7 @@ describe('Author Version - Submission relations updating', function () { cy.get('#publication-button').click(); cy.get('.pkpHeader .pkpHeader__actions button:contains("Post")').click(); cy.get('.pkp_modal_panel button:contains("Post")').click(); + cy.get('.pkpPublication__statusPublished'); }); it('Author can not change relations or create new version anymore', function () { cy.login('zwoods', null, 'publicknowledge'); From e0fb1432efa239e936822af225d5360a96b78aa0 Mon Sep 17 00:00:00 2001 From: Jhon Date: Mon, 12 Aug 2024 16:47:53 -0400 Subject: [PATCH 2/4] Updates rule to relation button exhibition Issue: documentacao-e-tarefas/scielo#691 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 9c4d595..7a74a88 100644 --- a/templates/relationsButton.tpl +++ b/templates/relationsButton.tpl @@ -1,4 +1,4 @@ - + authorVersion plugins.generic - 2.0.1.0 - 2024-07-30 + 2.0.2.0 + 2024-08-12 1 AuthorVersionPlugin From 7d5b2d45f4ef8351ad566975be463a09487bcd6b Mon Sep 17 00:00:00 2001 From: Jhon Date: Mon, 12 Aug 2024 16:57:53 -0400 Subject: [PATCH 3/4] Updates cypress default command timeout Issue: documentacao-e-tarefas/scielo#691 Signed-off-by: Jhon --- cypress/tests/Test5_relations.cy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress/tests/Test5_relations.cy.js b/cypress/tests/Test5_relations.cy.js index 76444b6..5f93bbd 100644 --- a/cypress/tests/Test5_relations.cy.js +++ b/cypress/tests/Test5_relations.cy.js @@ -1,6 +1,9 @@ describe('Author Version - Submission relations updating', function () { let publishedArticleDoi = 'https://doi.org/10.1234/Non-existentDoi'; + before(function() { + Cypress.config('defaultCommandTimeout', 4000); + }); it('Author can change relations on posted preprint version', function () { cy.login('zwoods', null, 'publicknowledge'); cy.get('#myQueue-button').click(); From d0240d45be62120cd27ec13838489f70d181595e Mon Sep 17 00:00:00 2001 From: Jhon Date: Mon, 12 Aug 2024 17:03:14 -0400 Subject: [PATCH 4/4] Updates command in integration test Issue: documentacao-e-tarefas/scielo#691 Signed-off-by: Jhon --- cypress/tests/Test5_relations.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/tests/Test5_relations.cy.js b/cypress/tests/Test5_relations.cy.js index 5f93bbd..50317a0 100644 --- a/cypress/tests/Test5_relations.cy.js +++ b/cypress/tests/Test5_relations.cy.js @@ -32,7 +32,7 @@ describe('Author Version - Submission relations updating', function () { cy.contains('View Woods').click({force: true}); cy.get('#publication-button').click(); cy.get('button:contains("Unpost")').click(); - cy.get('.modal button:contains("Unpost")').click(); + cy.get('.modal__panel button:contains("Unpost")').click(); cy.get('.pkpPublication__statusUnpublished'); }); it('Author changes preprint relation to "published as an article"', function () {