Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 989019 - [Calendar] Fix alarm_test.js when run in its own sandbox #17724

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/calendar/test/unit/templates/alarm_test.js
Expand Up @@ -3,6 +3,11 @@ requireLib('templates/alarm.js');

suiteGroup('Templates.Alarm', function() {
var subject;
var app;

setup(function() {
app = testSupport.calendar.app();
});

suiteSetup(function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just do Calendar.App.dateFormat = navigator.mozL10n.DateTimeFormat(); here instead of the above setup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, I think I'd rather just go the testSupport route though as that's what a bunch of other calendar unit tests are doing.

Edit - this way the test also needs to know less about the internal implementation of the app class.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got you.

subject = Calendar.Templates.Alarm;
Expand Down
1 change: 0 additions & 1 deletion tests/python/gaia-unit-tests/gaia_unit_test/disabled.json
@@ -1,6 +1,5 @@
[ "calendar/test/unit/store/busytime_test.js",
"calendar/test/unit/views/modify_event_test.js",
"calendar/test/unit/templates/alarm_test.js",
"camera/test/unit/controllers/confirm_test.js",
"camera/test/unit/lib/sounds_test.js",
"communications/contacts/test/unit/contacts_list_test.js",
Expand Down