Skip to content

Commit

Permalink
fix: e2e scheduling test
Browse files Browse the repository at this point in the history
- Use to new Temporal API in scheduling goal eDSL
  • Loading branch information
camargo committed Oct 5, 2022
1 parent 456374b commit 6dbeac3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/fixtures/SchedulingGoals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class SchedulingGoals {
closeButton: Locator;
confirmModal: Locator;
confirmModalDeleteButton: Locator;
goalDefinition: string = `export default (): Goal => Goal.ActivityRecurrenceGoal({ activityTemplate: ActivityTemplates.BakeBananaBread({ temperature: 325.0, tbSugar: 2, glutenFree: false }), interval: 12 * 60 * 60 * 1000 * 1000 })`;
goalDefinition: string = `export default (): Goal => Goal.ActivityRecurrenceGoal({ activityTemplate: ActivityTemplates.BakeBananaBread({ temperature: 325.0, tbSugar: 2, glutenFree: false }), interval: Temporal.Duration.from({ hours: 12 }) })`;
goalDescription: string = 'Add a BakeBananaBread activity every 12 hours';
goalName: string;
goalsNavButton: Locator;
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/tests/scheduling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ test.describe.serial('Scheduling', () => {
await plan.schedulingGoalEnabledCheckbox.check();
});

test('Running the same scheduling goal twice in a row should show +0 in that goals badge', async () => {
test('Running the same scheduling goal twice in a row should show +10 in that goals badge', async () => {
await expect(plan.schedulingGoalEnabledCheckbox).toBeChecked();
await plan.runScheduling();
await expect(plan.schedulingGoalDifferenceBadge).toHaveText('+10');
await plan.runScheduling();
await expect(plan.schedulingGoalDifferenceBadge).toHaveText('+0');
await expect(plan.schedulingGoalDifferenceBadge).toHaveText('+10');
});

test('Running analyze-only should show +0 in that goals badge', async () => {
Expand Down

0 comments on commit 6dbeac3

Please sign in to comment.