diff --git a/packages/component-fixture-manager/src/fixtures/users.js b/packages/component-fixture-manager/src/fixtures/users.js index 1a6353768eb68a4dc1d37dcb500d44cba6d41cc3..aa9463a5516d5d3a5e294340012d6d788c667669 100644 --- a/packages/component-fixture-manager/src/fixtures/users.js +++ b/packages/component-fixture-manager/src/fixtures/users.js @@ -19,15 +19,29 @@ users = keys.reduce((obj, item) => { const isHE = item === 'answerHE' || item === 'handlingEditor' let teams = [] - if (isHE) { - teams = [heTeamID] - } - if (item === 'noRecommendationHE') { - teams = [heNoRecommendationTeamID] - } - if (item === 'author') { - teams = [authorTeamID] + switch (item) { + case 'answerHE': + teams = [heTeamID] + break + case 'handlingEditor': + teams = [heTeamID] + break + case 'noRecommendationHE': + teams = [heNoRecommendationTeamID] + break + case 'author': + teams = [authorTeamID] + break + case 'reviewer1': + teams = [rev1TeamID] + break + case 'newReviewer': + teams = [revNoEditorRecommendationTeamID] + break + default: + teams = [] } + if (['reviewer', 'inactiveReviewer', 'answerReviewer'].includes(item)) { teams.push(revTeamID) } @@ -35,12 +49,6 @@ users = keys.reduce((obj, item) => { if (['reviewer', 'answerReviewer', 'recReviewer'].includes(item)) { teams.push(revRecommendationTeamID) } - if (item === 'reviewer1') { - teams = [rev1TeamID] - } - if (item === 'newReviewer') { - teams = [revNoEditorRecommendationTeamID] - } obj[item] = { ...userData,