Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: e2e scheduling test #169

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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