Skip to content

Commit

Permalink
Peer review accepting threshold is disabled if accepting strategy is …
Browse files Browse the repository at this point in the history
…manual review everything (#1206)

* Peer review accepting threshold is disabled if accepting strategy is manual review everything

* test fix

---------

Co-authored-by: Maija Y <[email protected]>
  • Loading branch information
Maijjay and Maija Y authored Nov 28, 2023
1 parent e50a992 commit 7f50594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions services/cms/src/components/PeerReviewEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ const PeerReviewEditor: React.FC<PeerReviewEditorProps> = ({
step="0.01"
min={0}
required
disabled={
parsedPeerReviewConfig.accepting_strategy.toString() ===
"ManualReviewEverything"
}
value={parsedPeerReviewConfig.accepting_threshold}
onChangeByValue={(value) => {
handlePeerReviewValueChange(value, "accepting_threshold")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ test("default peer review editing", async ({ page, headless }, testInfo) => {
)
.selectOption("ManualReviewEverything")

await page1.locator('input[type="number"]').nth(2).click()
// Fill input[type="number"] >> nth=2
await page1.locator('input[type="number"]').nth(2).fill("2.5")

await page1.getByRole("button", { name: "Delete" }).nth(1).click()
// Fill text=General comments
await page1.locator("text=General comments").fill("test")
Expand Down

0 comments on commit 7f50594

Please sign in to comment.