Commit Graph

13 Commits

Author SHA1 Message Date
Steve Howell 42435db492 Add run_test helper for individual tests.
This run_test helper sets up a convention that allows
us to give really short tracebacks for errors, and
eventually we can have more control over running
individual tests.  (The latter goal has some
complications, since we often intentionally leak
setup in tests.)
2018-05-15 08:24:44 -07:00
Priyank ee078c372f install-node: Upgrade node, yarn, and nvm.
node -> v8.9.4
yarn -> 1.5.1
nvm -> 0.33.8

Also updates a test in timerender.js which depends on time
provided by node which is now changed in newer release.

Some changes have been made in circeci script, we just create ~/.config
directory and chown it to circleci user so installing new version of yarn
does not cause any ci failure on circleci during provision.
2018-04-09 13:56:48 -07:00
Shubham Dhama 804a5f3306 drafts: Add timestamps showing when last modified.
Fixes: #3790.
2018-02-19 09:55:50 -08:00
Steve Howell de341e88c5 node tests: Use zrequire in timerender.js. 2017-11-08 12:24:17 -08:00
David Coleman 159064ccaa uploads: Only display year uploaded if previous year.
Modified timerender.js absolute_time() to include the year
in the returned string when the supplied timestamp is in
an older year. This included adding an optional second
argument to specify the current date to facilitate unit
tests.

Fixes #5737.
2017-07-25 23:06:58 -07:00
David Coleman 77dc5df56a uploads: Display year in attachments UI upload timestamp.
Modified timerender.js absolute_time() to include the
year in the returned time stamp string.

Fixes #5600.
2017-07-04 16:13:20 -07:00
Aditya Bansal 1e18863a98 timerender.js: Use stubbed version of i18n from zjsunit. 2017-06-29 15:18:08 -04:00
Yago González e7bd18ec09 timerender: Make get_full_time produce a ISO 8601 date string.
Having get_full_time produce a date string non-compliant with RFC2822 or
ISO 8601 caused problems when showing edition timestamps on a message's
edit history.

Now it returns an ISO 8601 date string (1978-10-31T13:37:42Z).
2017-06-21 16:46:39 -04:00
hackerkid a158676fb0 Add function to get last seen status from last active date. 2017-06-11 07:09:21 -05:00
David Coleman 13915740bb refactoring: use class attr to identify timerender date <span>.
The floating_recipient_bar is cloned from recipient_bar elements.
The cloning created elements in the DOM with duplicate id
attributes, specifically <span id="timerender{id}">, which
contains the date of the message stream. The timerender span
will now use class="timerender{id}" instead.

Fixes #4997.
Fixes #5128.
2017-06-06 20:01:21 -07:00
Steve Howell ed9eca90f2 node tests: Isolate timerender.js from i18n/jquery.
This makes the test run a lot faster, and it fixes
some leaky behavior where the test used to work only
when other tests ran before it.
2017-06-02 14:18:51 -07:00
David 43e76816ff message view: Recipient bar date stamp shows older years.
timerender.js render_now() will always include older
years when rendering the date stamp on the recipient bar
and the date rows above messages.

Fixes #4843.
2017-05-29 08:54:06 -07:00
David fcf97660db testing-coverage: add node tests for timerender.js.
Initial set of tests for the timerender.js module.

Fixes #4819.
2017-05-29 08:51:28 -07:00