Start human evaluation blocks without a template
This commit is contained in:
parent
fe1e6787fd
commit
a30a504c47
|
|
@ -111,10 +111,8 @@ public class HumanEvaluationBlockConfiguration extends BlockConfiguration<HumanE
|
|||
public static HumanEvaluationBlockConfiguration empty() {
|
||||
return HumanEvaluationBlockConfiguration.builder()
|
||||
.name(HumanEvaluationBlockType.TYPE)
|
||||
.target("Open ${{targetUrl}} and try the main flow")
|
||||
.taskScript(List.of())
|
||||
.criteria(List.of(new EvaluationCriterion("works", "Does the main flow complete without errors?",
|
||||
EvaluationScale.PASS_FAIL, true)))
|
||||
.criteria(List.of())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ package it.cnr.isti.workflow.manager.blocks.factories;
|
|||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -62,6 +63,19 @@ class HumanEvaluationBlockFactoryTest {
|
|||
HumanEvaluationBlockFactory.BLIND_FIELD)));
|
||||
}
|
||||
|
||||
@Test
|
||||
void startsWithoutAnEvaluationTemplate() {
|
||||
Block<HumanEvaluationBlockType> block = factory.createEmpty();
|
||||
HumanEvaluationBlockConfiguration configuration =
|
||||
(HumanEvaluationBlockConfiguration) block.getSpecificConfiguration();
|
||||
|
||||
assertNull(configuration.getTarget());
|
||||
assertTrue(configuration.getTaskScript().isEmpty());
|
||||
assertTrue(configuration.getCriteria().isEmpty());
|
||||
assertTrue(block.getInputs().isEmpty());
|
||||
assertFalse(outputNames(block).contains("works"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void evidenceLeavesAsSeveralFiles() {
|
||||
// One screenshot is the common case, but a tester who took four must not lose three.
|
||||
|
|
|
|||
Loading…
Reference in New Issue