Skip to content

Commit

Permalink
pkp/pkp-lib#7495 Migrating e2e tests for new workflow&submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Oct 17, 2024
1 parent ef7b950 commit a1b3a13
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<GridWrapper
:key="`${submissionId} - ${publicationId}`"
grid-component="grid.catalogEntry.PublicationFormatGridHandler"
:params="params"
></GridWrapper>
<div data-cy="publication-format-manager">
<GridWrapper
:key="`${submissionId} - ${publicationId}`"
grid-component="grid.catalogEntry.PublicationFormatGridHandler"
:params="params"
></GridWrapper>
</div>
</template>
<script setup>
import GridWrapper from '@/components/GridWrapper/GridWrapper.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/managers/ReviewerManager/ReviewerManager.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div data-cy="reviewer-manager">
<PkpTable
aria-label="Example for basic table"
:aria-describedby="headingId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,18 @@ const props = defineProps({
});
const RecommendOnlyDecisions = [
// EXTERNAL REVIEW
pkp.const.DECISION_RECOMMEND_ACCEPT,
pkp.const.DECISION_RECOMMEND_DECLINE,
pkp.const.DECISION_RECOMMEND_PENDING_REVISIONS,
pkp.const.DECISION_RECOMMEND_RESUBMIT,
// INTERNAL REVIEW
pkp.const.DECISION_RECOMMEND_ACCEPT_INTERNAL,
pkp.const.DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL,
pkp.const.RECOMMEND_RESUBMIT_INTERNAL,
pkp.const.RECOMMEND_DECLINE_INTERNAL,
pkp.const.RECOMMEND_EXTERNAL_REVIEW,
];
const explicitelyShowRecommendationActions = ref(false);
Expand Down Expand Up @@ -93,20 +101,42 @@ function showActions() {
function getRecommendationActions() {
const actions = [];
actions.push({
label: t('editor.submission.recommend.revisions'),
action: WorkflowActions.WORKFLOW_RECOMMEND_REVISION,
});
actions.push({
label: t('editor.submission.recommend.accept'),
action: DecisionActions.DECISION_RECOMMEND_ACCEPT,
});
actions.push({
label: t('editor.submission.recommend.decline'),
action: DecisionActions.DECISION_RECOMMEND_DECLINE,
});
if (props.stageId === pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) {
actions.push({
label: t('editor.submission.recommend.revisions'),
action: WorkflowActions.WORKFLOW_RECOMMEND_REVISION,
});
actions.push({
label: t('editor.submission.recommend.accept'),
action: DecisionActions.DECISION_RECOMMEND_ACCEPT,
});
actions.push({
label: t('editor.submission.recommend.decline'),
action: DecisionActions.DECISION_RECOMMEND_DECLINE,
});
} else if (props.stageId === pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW) {
actions.push({
label: t('editor.submission.recommend.revisions'),
action: DecisionActions.DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL,
});
actions.push({
label: t('editor.submission.recommend.accept'),
action: DecisionActions.DECISION_RECOMMEND_ACCEPT_INTERNAL,
});
actions.push({
label: t('editor.submission.recommend.decline'),
action: DecisionActions.DECISION_RECOMMEND_DECLINE_INTERNAL,
});
actions.push({
label: t('editor.submission.recommend.sendExternalReview'),
action: DecisionActions.DECISION_RECOMMEND_EXTERNAL_REVIEW,
});
}
return actions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ const props = defineProps({
});
const RecommendOnlyDecisions = [
// EXTERNAL REVIEW
pkp.const.DECISION_RECOMMEND_ACCEPT,
pkp.const.DECISION_RECOMMEND_DECLINE,
pkp.const.DECISION_RECOMMEND_PENDING_REVISIONS,
pkp.const.DECISION_RECOMMEND_RESUBMIT,
// INTERNAL REVIEW
pkp.const.DECISION_RECOMMEND_ACCEPT_INTERNAL,
pkp.const.DECISION_RECOMMEND_PENDING_REVISIONS_INTERNAL,
pkp.const.RECOMMEND_RESUBMIT_INTERNAL,
pkp.const.RECOMMEND_DECLINE_INTERNAL,
pkp.const.RECOMMEND_EXTERNAL_REVIEW,
];
const {apiUrl: recommendationApiUrl} = useUrl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const WorkflowConfig = {
props: {
label: t('editor.submission.decision.sendExternalReview'),
isPrimary: true,
action: DecisionActions.DECISION_SKIP_EXTERNAL_REVIEW,
action: DecisionActions.DECISION_SKIP_INTERNAL_REVIEW,
},
});

Expand Down Expand Up @@ -233,7 +233,7 @@ export const WorkflowConfig = {
component: 'WorkflowRecommendOnlyListingRecommendations',
props: {
submission: submission,
stageId: pkp.const.WORKFLOW_STAGE_ID_EXTERNAL_REVIEW,
stageId: pkp.const.WORKFLOW_STAGE_ID_INTERNAL_REVIEW,
reviewRoundId: selectedReviewRound.id,
},
});
Expand Down Expand Up @@ -468,10 +468,7 @@ export const PublicationConfig = {
props: {
// {{ submission.status === getConstant('STATUS_PUBLISHED') ? publishLabel : schedulePublicationLabel }}

label:
submission.status === pkp.const.STATUS_PUBLISHED
? t('publication.publish')
: t('editor.submission.schedulePublication'),
label: t('publication.publish'),
isSecondary: true,
action:
Actions.WORKFLOW_ASSIGN_TO_ISSUE_AND_SCHEDULE_FOR_PUBLICATION,
Expand Down

0 comments on commit a1b3a13

Please sign in to comment.