From 34a0389ff3ffc062bda77a97a8447b3a4f7c4b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= <regis@hanol.fr> Date: Fri, 12 Jun 2015 12:40:07 +0200 Subject: [PATCH] FIX: time read column was empty in user directory --- app/assets/javascripts/discourse/templates/users.hbs | 2 +- test/javascripts/acceptance/users-test.js.es6 | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/templates/users.hbs b/app/assets/javascripts/discourse/templates/users.hbs index 3d4ba1001..bca1399a1 100644 --- a/app/assets/javascripts/discourse/templates/users.hbs +++ b/app/assets/javascripts/discourse/templates/users.hbs @@ -36,7 +36,7 @@ <td>{{number it.topics_entered}}</td> <td>{{number it.posts_read}}</td> <td>{{number it.days_visited}}</td> - {{#if showTimeRead}} + {{#if controller.parentController.showTimeRead}} <td><span class='time-read'>{{unbound it.time_read}}</span></td> {{/if}} {{/with}} diff --git a/test/javascripts/acceptance/users-test.js.es6 b/test/javascripts/acceptance/users-test.js.es6 index 8ae9cfb28..b517a8e87 100644 --- a/test/javascripts/acceptance/users-test.js.es6 +++ b/test/javascripts/acceptance/users-test.js.es6 @@ -7,3 +7,10 @@ test("Visit Page", function() { ok(exists('.directory table tr'), "has a list of users"); }); }); + +test("Visit All Time", function() { + visit("/users?period=all"); + andThen(() => { + ok(exists('.time-read'), "has time read column"); + }); +});