Mailspring/spec
jathpala 7faa9ac7bd Better support 24-hour time (#2622)
* Added support for 24-hour time to the thread list view (Issue #682)

* Add 24-hour time support to the thread list scroll tooltip (Issue #682)

* Fix for 24-hour time in the thread list scroll tooltip (#682)

Correctly imports the DateUtils module

* Add support for 24-hour time to the draft threads list (Issue #682)

* Add 24-hour time to the message sidebar

* Fix for 24-hour time in the message view so the rollover tooltip is 24hour also (#682)

* Removed unused date functions from utils

fullTimeString and shortTimeString from src/flux/models/utils.coffee were not
compatible with 24-hour time. These functions were modified and moved to
DateUtils in src/date-utils.

* Fix for display of 24-hour time in the message view (Issue #682)

* Removed unused import of Utils in a couple of files

Prompted by Travis build errors.

* Updates to handling of date/time display

Incorporates changes suggested by @bengotow.
Re-enables support for the isDetailed property in message-timestamp (if this is set
to true, a medium length date/time string will be used for display).
Re-enables additional display varieties based on when the email was received. Note
that this is implemented slightly different to the orinal version - time is now given
as an absolute time rather than "... days ago" format.
TZ guessing moved to the global scope of date-utils for performance reasons.

* Minor de-linting

* Re-enable all tests by unfocusing the test suite

A previous commit (ad04775) added an fdescribe() to one of the tests in
draft-helpers-spec. This changes that to a regular describe() so that
all tests will be run when running ./N1 --test.

* Added tests for the new DateUtils functions

Added tests for getTimeFormat, mediumTimeString and fullTimeString.
Removed no longer relevant tests from message-timestamp-spec as _formattedDate
has been removed in favour of the functions in date-utils.

To test shortTimeString, we need to be able to set a fake current time which is
possible in jasmine 2.0+ but not in 1.3 which is currently in use.

As a possible bug, when running more than 10 tests the following warning is raised:
"(node:25025) Warning: Possible EventEmitter memory leak detected.
11 on-config-reloaded listeners added. Use emitter.setMaxListeners() to increase limit",
source: internal/process/warning.js (24)

* Minor de-linting
2016-07-28 17:42:14 -07:00
..
components fix(mail-merge): Skip row in table data if its empty 2016-07-28 14:05:51 -07:00
fixtures fix(mail-merge): Skip row in table data if its empty 2016-07-28 14:05:51 -07:00
models fix(contacts): Support unicode characters in domains #1920 2016-07-18 14:25:00 -07:00
services feat(paste): Paste accepts more HTML, paste and match style now available 2015-12-07 15:34:03 -08:00
stores fix(specs): Wait longer in DraftStore specs for window close 2016-07-28 11:20:02 -07:00
tasks refactor(folders): Make folders disappear when deleted rather than graying out until confirmed 2016-07-28 12:10:54 -07:00
action-bridge-spec.coffee feat(babel6): Convert message.coffee to message.es6 2016-05-06 11:55:27 -07:00
auto-update-manager-spec.coffee fix(identity): deprecate updaterId, provide safe access to identity.id 2016-06-02 18:56:09 -07:00
buffered-process-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
component-registry-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
database-object-registry-spec.coffee feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00
date-utils-spec.es6 Better support 24-hour time (#2622) 2016-07-28 17:42:14 -07:00
dom-utils-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
extension-registry-spec.coffee feat(babel6): Detect when packages don't have a default export 2016-05-06 11:54:57 -07:00
jasmine-helper.coffee cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
jasmine.js refactor(dir): move exports to src/global and consolidate tests 2015-10-02 09:19:37 -07:00
launch-services-spec.coffee Revert "feat(mailto): Allow N1 to be default client on windows" 2016-05-03 19:04:04 -07:00
list-selection-spec.coffee feat(outbox): Sending status now appears beside drafts 2016-02-04 14:14:24 -08:00
mail-rules-processor-spec.coffee fix(mail-rules): Catch and disable mail rules building bad actions 2015-12-28 18:39:06 -08:00
mailbox-perspective-spec.es6 fix(lint): Various linter issues 2016-05-06 16:06:16 -07:00
menu-manager-spec.coffee refactor(menus): Major prune of keymaps/commands, real conditional menus 2016-04-24 12:16:25 -05:00
module-cache-spec.coffee fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -08:00
n1-spec-reporter.cjsx cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
nylas-api-spec.coffee fix(401/403): Unify error bars, query /account, improve reconnect flow 2016-05-13 14:16:54 -07:00
nylas-env-spec.es6 fix(specs): Fix specs on Linux 2016-06-15 16:30:52 -07:00
nylas-protocol-handler-spec.coffee fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -08:00
nylas-test-utils.coffee cson(cleanup): Remove imports, only used for config.cson now 2016-04-24 20:33:34 -05:00
package-manager-spec.coffee cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
package-spec.coffee cleanup(specs): Remove space-pen. Goodbye, jQuery! 2016-04-26 13:14:07 -07:00
quoted-html-transformer-spec.coffee fix(quoted-text): Don’t add <body>, <head> accidentally to text when transforming 2016-07-28 13:33:59 -07:00
quoted-plain-text-transformer-spec.coffee feat(paste): Paste accepts more HTML, paste and match style now available 2015-12-07 15:34:03 -08:00
spec-bootstrap.coffee bump(*): Electron 0.36.7, version to 0.4.6 2016-02-08 18:35:23 -08:00
spec-helper-platform.coffee fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
spec-helper.coffee fix(spec): fix config setting spy 2016-05-19 11:50:19 -07:00
spec-suite.coffee fix(quoted-text): Check that message is reply 2016-07-21 17:45:47 -07:00
spellchecker-spec.coffee fix(spellcheck): let win < 8 fallback to hunspell 2015-12-11 16:41:41 -05:00
style-manager-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
styles-element-spec.coffee rm(*): deprecated/unused Atom code, user stylesheet support 2016-05-04 14:27:46 -07:00
task-factory-spec.es6 fix(lint): Correct more linter errors 2016-05-06 14:10:28 -07:00
theme-manager-spec.coffee fix(themes): Properly set theme on the hot window 2016-06-09 14:12:44 -07:00
time-override.coffee feat(tests): add integration tests 2015-12-02 13:41:14 -08:00
time-reporter.coffee refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
undo-stack-spec.es6 fix(specs): Fix merge conflicts and some specs 2016-05-24 19:04:20 -07:00
utils-spec.coffee feat(babel6): Convert to use new es6 require syntax 2016-05-06 11:54:55 -07:00