diff --git a/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/DumbRecurrenceGoal.java b/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/DumbRecurrenceGoal.java index 98d0687a10..7085d0f640 100644 --- a/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/DumbRecurrenceGoal.java +++ b/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/DumbRecurrenceGoal.java @@ -3,8 +3,11 @@ import gov.nasa.ammos.aerie.procedural.scheduling.plan.EditablePlan; import gov.nasa.ammos.aerie.procedural.scheduling.Goal; import gov.nasa.ammos.aerie.procedural.scheduling.annotations.SchedulingProcedure; +import gov.nasa.ammos.aerie.procedural.scheduling.plan.NewDirective; +import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.AnyDirective; import gov.nasa.jpl.aerie.merlin.protocol.types.Duration; import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.DirectiveStart; +import gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue; import org.jetbrains.annotations.NotNull; import java.util.Map; @@ -23,9 +26,12 @@ public void run(@NotNull final EditablePlan plan) { var currentTime = firstTime; for (var i = 0; i < quantity; i++) { plan.create( - "BiteBanana", - new DirectiveStart.Absolute(currentTime), - Map.of() + new NewDirective( + new AnyDirective(Map.of("biteSize", SerializedValue.of(1))), + "It's a bite banana activity", + "BiteBanana", + new DirectiveStart.Absolute(currentTime) + ) ); currentTime = currentTime.plus(step); } diff --git a/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/EdslSchedulingTests.java b/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/EdslSchedulingTests.java index 1de7c611ec..f9e384ee1a 100644 --- a/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/EdslSchedulingTests.java +++ b/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/EdslSchedulingTests.java @@ -1000,20 +1000,5 @@ void schedulingIgnoreDisabledGoals() throws IOException { } } } - /** - * Run a spec with one procedure and make sure the activity names are saved to the database - */ - @Test - void saveActivityName() throws IOException { - final var args = Json.createObjectBuilder().add("quantity", 2).build(); - hasura.updateSchedulingSpecGoalArguments(procedureId.invocationId(), args); - final var resp = hasura.awaitScheduling(specId); - - final var plan = hasura.getPlan(planId); - final var activities = plan.activityDirectives(); - - assertEquals(2, activities.size()); - assertEquals("It's a bite banana activity", activities.getFirst().name()); - } } diff --git a/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/BasicTests.java b/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/BasicTests.java index 586e29a106..71fb6aae76 100644 --- a/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/BasicTests.java +++ b/e2e-tests/src/test/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/BasicTests.java @@ -147,4 +147,21 @@ void executeEDSLAndProcedure() throws IOException { assertEquals(52, activities.size()); } + + /** + * Run a spec with one procedure and make sure the activity names are saved to the database + */ + @Test + void saveActivityName() throws IOException { + final var args = Json.createObjectBuilder().add("quantity", 2).build(); + hasura.updateSchedulingSpecGoalArguments(procedureId.invocationId(), args); + + hasura.awaitScheduling(specId); + + final var plan = hasura.getPlan(planId); + final var activities = plan.activityDirectives(); + + assertEquals(2, activities.size()); + assertEquals("It's a bite banana activity", activities.getFirst().name()); + } }