Skip to content

Commit

Permalink
[#13147] Didn't Account for the Timezone in Session Edit Form compone…
Browse files Browse the repository at this point in the history
…nt tests (#13148)
  • Loading branch information
Respirayson authored Jul 26, 2024
1 parent 6b7912c commit 9181467
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ describe('SessionEditFormComponent', () => {
it('should not adjust the session visibility date and time if submission opening date and time are later', () => {
const date: DateFormat = component.minDateForSubmissionStart;
const time: TimeFormat = component.minTimeForSubmissionStart;
component.model.customSessionVisibleDate = dateTimeService.getDateInstance(moment().subtract(1, 'days'));
component.model.customSessionVisibleTime = dateTimeService.getTimeInstance(moment().subtract(1, 'hours'));
component.model.customSessionVisibleDate = dateTimeService
.getDateInstance(moment().tz(component.model.timeZone).subtract(1, 'days'));
component.model.customSessionVisibleTime = dateTimeService
.getTimeInstance(moment().tz(component.model.timeZone).subtract(1, 'hours'));
component.configureSessionVisibleDateTime(date, time);
expect(component.model.customSessionVisibleDate).not.toEqual(date);
expect(component.model.customSessionVisibleTime).not.toEqual(time);
Expand Down

0 comments on commit 9181467

Please sign in to comment.