diff --git a/classes/decision/types/RecommendDeclineInternal.php b/classes/decision/types/RecommendDeclineInternal.php index 9d4d8853f76..a1768e0d413 100644 --- a/classes/decision/types/RecommendDeclineInternal.php +++ b/classes/decision/types/RecommendDeclineInternal.php @@ -23,6 +23,6 @@ class RecommendDeclineInternal extends RecommendDecline public function getDecision(): int { - return Decision::RECOMMEND_ACCEPT_INTERNAL; + return Decision::RECOMMEND_DECLINE_INTERNAL; } } diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 01c0db19a35..9b0c67774b4 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -8,7 +8,7 @@ */ import Api from '../../lib/pkp/cypress/support/api.js'; -import '../../lib/pkp/cypress/support/commands'; +import '../../lib/pkp/cypress/support/commands_new_workflow.js'; Cypress.Commands.add('addToCatalog', function() { cy.get('button:contains("Publish")').click(); diff --git a/cypress/tests/data/60-content/AfinkelSubmission.cy.js b/cypress/tests/data/60-content/AfinkelSubmission.cy.js index 64b3708ef6e..96fd9758aea 100644 --- a/cypress/tests/data/60-content/AfinkelSubmission.cy.js +++ b/cypress/tests/data/60-content/AfinkelSubmission.cy.js @@ -330,7 +330,7 @@ describe('Data suite tests', function() { cy.get('a').contains('Create a new submission'); cy.get('a').contains('Return to your dashboard'); cy.get('a').contains('Review this submission').click(); - cy.get('h1:contains("' + submission.title + '")'); + cy.get('p:contains("' + submission.title + '")'); cy.logout(); cy.findSubmissionAsEditor('dbarnes', null, 'Finkel'); diff --git a/cypress/tests/data/60-content/BbeatySubmission.cy.js b/cypress/tests/data/60-content/BbeatySubmission.cy.js index 5de609f02be..ad7a11d6ed5 100644 --- a/cypress/tests/data/60-content/BbeatySubmission.cy.js +++ b/cypress/tests/data/60-content/BbeatySubmission.cy.js @@ -144,8 +144,7 @@ describe('Data suite tests', function() { cy.assignParticipant('Layout Editor', 'Graham Cox'); // Add a publication format with ISBNs - cy.get('button[id="publication-button"]').click(); - cy.get('button[id="publicationFormats-button"]').click(); + cy.openWorkflowMenu('Publication Formats'); cy.get('*[id^="component-grid-catalogentry-publicationformatgrid-addFormat-button-"]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[id^="name-en-"]').type('PDF', {delay: 0}); diff --git a/cypress/tests/data/60-content/CallanSubmission.cy.js b/cypress/tests/data/60-content/CallanSubmission.cy.js index 2fe6cdd979e..7b9c9aba425 100644 --- a/cypress/tests/data/60-content/CallanSubmission.cy.js +++ b/cypress/tests/data/60-content/CallanSubmission.cy.js @@ -142,8 +142,7 @@ describe('Data suite tests', function() { cy.assignParticipant('Proofreader', 'Catherine Turner'); // Add a publication format - cy.get('button[id="publication-button"]').click(); - cy.get('button[id="publicationFormats-button"]').click(); + cy.openWorkflowMenu('Publication Formats'); cy.get('*[id^="component-grid-catalogentry-publicationformatgrid-addFormat-button-"]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[id^="name-en-"]').type('PDF', {delay: 0}); @@ -180,11 +179,11 @@ describe('Data suite tests', function() { }); it('Book is not available when unpublished', function() { - cy.findSubmissionAsEditor('dbarnes', null, 'Allan'); - cy.get('#publication-button').click(); + cy.findSubmissionAsEditor('dbarnes', null, 'Allan', null, 'Published'); + cy.openWorkflowMenu('Title & Abstract'); cy.get('button').contains('Unpublish').click(); cy.contains('Are you sure you don\'t want this to be published?'); - cy.get('div[role=dialog] button').contains('Unpublish').click(); + cy.get('[data-cy="dialog"] button').contains('Unpublish').click(); cy.wait(1000); cy.visit('index.php/publicknowledge/catalog'); cy.contains('Bomb Canada and Other Unkind Remarks in the American Media').should('not.exist'); @@ -199,8 +198,8 @@ describe('Data suite tests', function() { // Re-publish it cy.findSubmissionAsEditor('dbarnes', null, 'Allan'); - cy.get('#publication-button').click(); - cy.get('.pkpPublication button').contains('Publish').click(); + cy.openWorkflowMenu('Title & Abstract'); + cy.get('button').contains('Publish').click(); cy.contains('All publication requirements have been met.'); cy.get('.pkpWorkflow__publishModal button').contains('Publish').click(); }); diff --git a/cypress/tests/data/60-content/DbernnardSubmission.cy.js b/cypress/tests/data/60-content/DbernnardSubmission.cy.js index 270421cc0dd..5cdadc40ce6 100644 --- a/cypress/tests/data/60-content/DbernnardSubmission.cy.js +++ b/cypress/tests/data/60-content/DbernnardSubmission.cy.js @@ -134,16 +134,23 @@ describe('Data suite tests', function() { cy.assignParticipant('Press editor', 'Daniel Barnes'); // Assign a recommendOnly section editor cy.assignParticipant('Series editor', 'Minoti Inoue', true); + cy.logout(); // Find the submission as the section editor cy.login('minoue', null, 'publicknowledge'), - cy.get('#myQueue').find('a').contains('View Bernnard').click({force: true}); + cy.findSubmissionAsEditor('minoue', null, 'Bernnard', null, 'Assigned to me'); + + // Recommend cy.clickDecision('Recommend Accept'); cy.recordRecommendation('Recommend Accept', ['Daniel Barnes', 'David Buskins']); cy.logout(); + // Log in as editor and see the existing recommendation cy.findSubmissionAsEditor('dbarnes', null, 'Bernnard'); - cy.get('div.pkp_workflow_recommendations:contains("Recommendations: Accept Submission")'); + cy.get('[data-cy="workflow-secondary-items"] h2').contains("Recommendation"); + // FIX ME correct label should come with + //cy.get('[data-cy="workflow-actions"] p').contains("Accept Submission"); + cy.get('[data-cy="workflow-secondary-items"] p').contains("Recommend Accept"); }); }); diff --git a/cypress/tests/data/60-content/MdawsonSubmission.cy.js b/cypress/tests/data/60-content/MdawsonSubmission.cy.js index 50ce82ca79b..5bcb77e816b 100644 --- a/cypress/tests/data/60-content/MdawsonSubmission.cy.js +++ b/cypress/tests/data/60-content/MdawsonSubmission.cy.js @@ -164,8 +164,7 @@ describe('Data suite tests', function() { cy.assignParticipant('Proofreader', 'Sabine Kumar'); // Add a publication format - cy.get('button[id="publication-button"]').click(); - cy.get('button[id="publicationFormats-button"]').click(); + cy.openWorkflowMenu('Publication Formats'); cy.get('*[id^="component-grid-catalogentry-publicationformatgrid-addFormat-button-"]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[id^="name-en-"]').type('PDF', {delay: 0}); diff --git a/cypress/tests/integration/CompetingInterests.cy.js b/cypress/tests/integration/CompetingInterests.cy.js index b9bb878b3c3..339bccf472f 100644 --- a/cypress/tests/integration/CompetingInterests.cy.js +++ b/cypress/tests/integration/CompetingInterests.cy.js @@ -25,7 +25,7 @@ describe('Data suite tests', function() { // Submit review with no competing interests cy.login('agallego', null, 'publicknowledge'); - cy.get('a:contains("View Lost Tracks")').click({force: true}); + cy.openReviewAssignment('Lost Tracks'); cy.get('form#reviewStep1Form'); cy.get('label[for="noCompetingInterests"]').should('not.exist'); @@ -44,8 +44,9 @@ describe('Data suite tests', function() { // Find and view the review cy.findSubmissionAsEditor('dbarnes', null, 'Brower'); - cy.waitJQuery(); - cy.get('span:contains("Adela Gallego")').parent().parent().find('a:contains("Read Review")').click(); + cy.contains('table tr', 'Adela Gallego').within(() => { + cy.get('button').contains("Read Review").click() + }) // There should not be a visible CI statement. cy.get('h3:contains("Reviewer Comments")'); @@ -73,7 +74,8 @@ describe('Data suite tests', function() { // Submit review with competing interests const competingInterests = 'I work for a competing company'; cy.login('alzacharia', null, 'publicknowledge'); - cy.get('a:contains("View Lost Tracks")').click({force: true}); + cy.openReviewAssignment('Lost Tracks'); + cy.get('input#hasCompetingInterests').click(); cy.wait(2000); // Give TinyMCE control time to load @@ -95,7 +97,9 @@ describe('Data suite tests', function() { // Find and view the review cy.findSubmissionAsEditor('dbarnes', null, 'Brower'); cy.waitJQuery(); - cy.get('span:contains("Al Zacharia")').parent().parent().find('a:contains("Read Review")').click(); + cy.contains('table tr', 'Al Zacharia').within(() => { + cy.get('button').contains("Read Review").click() + }) // There should be a visible CI statement. cy.get('h3:contains("Reviewer Comments")'); @@ -119,7 +123,9 @@ describe('Data suite tests', function() { // The CI statement entered previously should still be visible. cy.findSubmissionAsEditor('dbarnes', null, 'Brower'); cy.waitJQuery(); - cy.get('span:contains("Al Zacharia")').parent().parent().find('a:contains("Read Review")').click(); + cy.contains('table tr', 'Al Zacharia').within(() => { + cy.get('button').contains("Read Review").click() + }) cy.get('h3:contains("Reviewer Comments")'); cy.get('p').contains(competingInterests); }); diff --git a/cypress/tests/integration/Payments.cy.js b/cypress/tests/integration/Payments.cy.js index 11a91393f86..fcc44f53f21 100644 --- a/cypress/tests/integration/Payments.cy.js +++ b/cypress/tests/integration/Payments.cy.js @@ -26,26 +26,22 @@ describe('Payments', function() { it('Add a direct sales on Submission chapter', function () { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav').contains('Submissions').click(); - cy.get('button[id="archive-button"]').click(); - var submissionElement = cy.get('#archive .listPanel__item').contains('Bomb Canada and Other Unkind Remarks in the American Media').parents('.listPanel__item'); - submissionElement.within(() => { - cy.get('.listPanel__itemActions .pkpButton').click(); - }) - cy.get('button[id="publication-button"]').click(); + cy.get('nav').contains('Published').click(); + cy.openSubmission('Bomb Canada and Other Unkind Remarks in the American Media'); + cy.openWorkflowMenu('Title & Abstract'); cy.get('button').contains('Unpublish').click(); - cy.get('[role=dialog] button').contains('Unpublish').should('be.visible').click(); + cy.get('[data-cy="dialog"] button').contains('Unpublish').should('be.visible').click(); cy.waitJQuery(); - cy.get('#publicationFormats-button').click(); + cy.openWorkflowMenu('Publication Formats'); cy.get('.pkp_linkaction_editApprovedProof').click(); cy.wait(1000); - cy.get('[role="dialog"] #directSales').click(); - cy.get('[role="dialog"] input[type="text"][name="price"]').type('9.99'); - cy.get('[role="dialog"] .formButtons .submitFormButton').click(); - cy.get('#publication .pkpButton').contains('Publish').click(); - cy.get('[role="dialog"] .pkpButton').contains('Publish').click(); - cy.get('.pkpPublication__versionPublished').should('be.visible'); + cy.get('#directSales').click(); + cy.get('input[type="text"][name="price"]').type('9.99'); + cy.get('.formButtons .submitFormButton').click(); + cy.get('button').contains('Publish').click(); + cy.get('[data-cy="active-modal"] button').contains('Publish').click(); + cy.contains('This version has been published and can not be edited.'); cy.logout(); }); diff --git a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js index b9efe86a582..61ab49227a0 100644 --- a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js @@ -402,7 +402,7 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'chapter', 'representation', 'file']); // After configuration, go to submissions - cy.get('nav').contains('Submissions').click(); + cy.get('nav').contains('Dashboards').click(); // Create a new submission cy.getCsrfToken(); @@ -414,32 +414,33 @@ describe('Monograph View Metadata - DC Plugin', function() { return cy.submitSubmissionWithApi(submission.id, this.csrfToken); }) .then(xhr => { - cy.visit('/index.php/publicknowledge/en/workflow/index/' + submission.id + '/1'); + cy.visit('/index.php/publicknowledge/workflow/access/' + submission.id); }); // Go to publication tabs - cy.get('#publication-button').click(); + cy.openWorkflowMenu('Title & Abstract'); // Open multilanguage inputs and add data to fr_CA inputs - cy.get('div#titleAbstract button').contains('French').click(); + cy.get('.pkpFormLocales button').contains('French').click(); - cy.get('#titleAbstract input[name=prefix-en]').type(submission.prefix, {delay: 0}); - cy.get('#titleAbstract input[name=prefix-en]').click({force: true}); + cy.get('input[name=prefix-en]').type(submission.prefix, {delay: 0}); + cy.get('input[name=prefix-en]').click({force: true}); cy.setTinyMceContent('titleAbstract-subtitle-control-en', submission.subtitle); cy.setTinyMceContent('titleAbstract-title-control-fr_CA', submission.localeTitles.fr_CA.title); - cy.get('#titleAbstract input[name=prefix-fr_CA]').type(submission.localeTitles.fr_CA.prefix, {delay: 0}); + cy.get('input[name=prefix-fr_CA]').type(submission.localeTitles.fr_CA.prefix, {delay: 0}); cy.setTinyMceContent('titleAbstract-subtitle-control-fr_CA', submission.localeTitles.fr_CA.subtitle); cy.setTinyMceContent('titleAbstract-abstract-control-fr_CA', submission.localeTitles.fr_CA.abstract); cy.get('#titleAbstract-title-control-fr_CA').click({force: true}); // Ensure blur event is fired cy.get('#titleAbstract-subtitle-control-fr_CA').click({force: true}); - cy.get('#titleAbstract button').contains('Save').click(); - cy.get('#titleAbstract [role="status"]').contains('Saved'); + cy.get('button').contains('Save').click(); + cy.get('[role="status"]').contains('Saved'); // Go to metadata - cy.get('#metadata-button').click(); - cy.get('div#metadata button').contains('French').click(); + cy.openWorkflowMenu('Metadata'); + cy.wait(500); + cy.get('.pkpFormLocales button').contains('French').click(); // Add the metadata to the submission submission.localeMetadata.forEach((locale) => { @@ -461,20 +462,21 @@ describe('Monograph View Metadata - DC Plugin', function() { }); }); - cy.get('#metadata button').contains('Save').click(); - cy.get('#metadata [role="status"]').contains('Saved'); + cy.get('button').contains('Save').click(); + cy.get('[role="status"]').contains('Saved'); // Permissions & Disclosure - cy.get('#license-button').click(); - cy.get('#license [name="licenseUrl"]').type(submission.licenceUrl, {delay: 0}); - cy.get('#license button').contains('Save').click(); - cy.get('#license [role="status"]').contains('Saved'); + cy.openWorkflowMenu('Permissions & Disclosure'); + + cy.get('[name="licenseUrl"]').type(submission.licenceUrl, {delay: 0}); + cy.get('button').contains('Save').click(); + cy.get('[role="status"]').contains('Saved'); // Add a publication format submission.publicationFormats.forEach((publicationFormat) => { - cy.get('button[id="publicationFormats-button"]').click(); + cy.openWorkflowMenu('Publication Formats'); cy.wait(1500); // Wait for the form to settle - cy.get('div#representations-grid a').contains('Add publication format').click(); + cy.get('[data-cy="publication-format-manager"] a').contains('Add publication format').click(); cy.wait(1500); // Wait for the form to settle cy.get('input[id^="name-en-"]').type(publicationFormat.name, {delay: 0}); cy.get('[role="dialog"] h1:contains("Add publication format")').click(); @@ -507,21 +509,21 @@ describe('Monograph View Metadata - DC Plugin', function() { }); // Catalog Entry - cy.get('#catalogEntry-button').click(); - cy.get('#catalogEntry [name="seriesId"]').select(submission.seriesData.title); - cy.get('#catalogEntry [name="seriesPosition"]').type(submission.seriesPosition, {delay: 0}); - cy.get('#catalogEntry [name="urlPath"]').type(submission.urlPath); - cy.get('#catalogEntry button').contains('Save').click(); - cy.get('#catalogEntry [role="status"]').contains('Saved'); + cy.openWorkflowMenu('Catalog Entry') + cy.get('[name="seriesId"]').select(submission.seriesData.title); + cy.get('[name="seriesPosition"]').type(submission.seriesPosition, {delay: 0}); + cy.get('[name="urlPath"]').type(submission.urlPath); + cy.get('button').contains('Save').click(); + cy.get('[role="status"]').contains('Saved'); // Go to workflow to send the submission to Copyediting stage - cy.get('#workflow-button').click(); + cy.openWorkflowMenu('Submission') cy.clickDecision('Accept and Skip Review'); cy.recordDecision('and has been sent to the copyediting stage'); cy.isActiveStageTab('Copyediting'); // Add to catalog - Publish the submission - cy.get('#publication-button').click(); + cy.openWorkflowMenu('Title & Abstract'); cy.addToCatalog(); }); diff --git a/registry/uiLocaleKeysBackend.json b/registry/uiLocaleKeysBackend.json index 593c782fbff..295049a5212 100644 --- a/registry/uiLocaleKeysBackend.json +++ b/registry/uiLocaleKeysBackend.json @@ -1,15 +1,4 @@ [ - "acceptInvitation.modal.button", - "acceptInvitation.modal.message", - "acceptInvitation.modal.title", - "acceptInvitation.passwordField.description", - "acceptInvitation.privacyStatement.btn", - "acceptInvitation.privacyStatement.label", - "acceptInvitation.review.accountDetails", - "acceptInvitation.review.userDetails", - "acceptInvitation.skipVerifyOrcid", - "acceptInvitation.usernameField.description", - "acceptInvitation.verifyOrcid", "admin.jobs.failed.action.redispatch", "admin.jobs.failed.action.redispatch.all", "admin.version", @@ -26,40 +15,31 @@ "catalog.manage.isNotFeatured", "catalog.manage.isNotNewRelease", "catalog.manage.seriesFeatured", - "common.addCCBCC", "common.assign", "common.attachFiles", - "common.attachedFiles", - "common.back", "common.cancel", "common.clearSearch", "common.close", "common.commaListSeparator", "common.complete", "common.confirmDelete", - "common.content", "common.dateUploaded", "common.default", "common.delete", "common.description", - "common.deselect", "common.details", "common.download", "common.edit", "common.editItem", - "common.emailTemplates", "common.error", "common.fileName", "common.filter", "common.filterAdd", "common.filterRemove", "common.filtersClear", - "common.findTemplate", "common.geographic", "common.id", - "common.insert", "common.insertContent", - "common.insertContentSearch", "common.language", "common.lastActivity", "common.loaded", @@ -69,7 +49,6 @@ "common.no", "common.noItemsFound", "common.none", - "common.numberedMore", "common.ok", "common.order", "common.orderDown", @@ -80,27 +59,21 @@ "common.pagination.label", "common.pagination.next", "common.pagination.previous", - "common.payments", "common.preview", "common.publication", "common.publications", "common.remove", - "common.removeItem", "common.required", "common.reset", "common.save", "common.saving", "common.search", "common.searchPhrase", - "common.searching", "common.selectAll", "common.selectNone", "common.selectWithName", - "common.showingSteps", "common.showingXofX", "common.status", - "common.switchTo", - "common.switchToNamedItem", "common.type", "common.unknownError", "common.upload", @@ -236,6 +209,7 @@ "editor.submission.recommend.accept", "editor.submission.recommend.decline", "editor.submission.recommend.revisions", + "editor.submission.recommend.sendExternalReview", "editor.submission.recommendation", "editor.submission.recommendation.noDecidingEditors", "editor.submission.removeStageParticipant", @@ -255,11 +229,6 @@ "editor.submissionLibrary", "editor.submissionReview.editReview", "editor.submissionReview.uploadFile", - "email.bcc", - "email.cc", - "email.confirmSwitchLocale", - "email.subject", - "email.to", "form.dataHasChanged", "form.errorA11y", "form.errorGoTo", @@ -289,14 +258,6 @@ "grid.user.confirmLogInAs", "help.help", "informationCenter.informationCenter", - "invitation.orcid.acceptInvitation.message", - "invitation.role.addRole.button", - "invitation.role.dateStart", - "invitation.role.masthead", - "invitation.role.removeRole.button", - "invitation.role.selectRole", - "invitation.wizard.completeSteps", - "invitation.wizard.errors", "issue.issue", "list.collapseAll", "list.expandAll", @@ -433,10 +394,8 @@ "reviewer.submission.reviewRound.reviewDeclineDate", "reviewer.submission.reviewRound.reviewNotCompleted", "reviewer.submission.submittedOn", - "search.searchResults", "semicolon", "settings.libraryFiles.category.marketing", - "stageParticipants.notify.message", "stats.context.downloadReport.description", "stats.context.downloadReport.downloadContext", "stats.context.downloadReport.downloadContext.description", @@ -509,26 +468,8 @@ "submissions.declined", "submissions.incomplete", "todo", - "user.affiliation", "user.authorization.accessibleWorkflowStage", - "user.email", - "user.emailAddress", - "user.familyName", - "user.givenName", "user.gossip", - "user.orcid", - "user.password", - "user.username", - "userInvitation.emailField.description", - "userInvitation.modal.button", - "userInvitation.modal.message", - "userInvitation.modal.title", - "userInvitation.orcidField.description", - "userInvitation.roleTable.endDate", - "userInvitation.roleTable.journalMasthead", - "userInvitation.roleTable.role", - "userInvitation.roleTable.startDate", - "userInvitation.usernameField.description", "validator.required", "workflow.review.externalReview", "workflow.review.internalReview"