Commit Graph

18 Commits

Author SHA1 Message Date
Steve Howell 84c9be45af node tests: Remove requirement to test all templates.
We have less urgency to test all templates now.  The
most common error is probably unbalanced tags, and our
python-based template checker catches those problems
pretty well.

It's still possible to create bad templates, of course,
but the node tests have never been super deep at finding
semantic errors.
2018-05-24 09:30:22 -07:00
Steve Howell 02a0ad8e2e node tests: Exempt widgets from needing template tests. 2018-05-16 15:13:33 -07:00
Tim Abbott ed299feb00 lint: Check eslint indentation for casper tests.
Now we just limit this rule for the node tests themselves.
2018-05-06 19:35:18 -07:00
Rafid Aslam 84e802422e deps: Upgrade and move `underscore.js` from `static/third` to `npm`
- Remove `underscore.js` from `static/third` and fetch it from `npm`.
- Upgrade `underscore.js` to 1.8.3.
- Bump up the `PROVISION_VERSION` to 4.2.

Part of #1709
2017-01-19 17:07:45 -08:00
Rafid Aslam 0290aeb6ab lint: Fix several no-unused-vars eslint rule violations.
These changes were extracted by tabbott from the original commit
to merge now because they have been reviewed as safe.
2016-12-03 18:43:47 -08:00
Tim Abbott 1a161c6e33 eslint: Fix comma-dangle rules in JS support files.
This was done via eslint --fix.
2016-12-03 15:00:24 -08:00
Steve Howell dae53573cb node tests: Fix make_sure_all_templates_have_been_compiled().
This now searches subdirectories.
2016-11-04 21:23:35 -07:00
Steve Howell 3d0c0e2e81 node tests: Remove retry logic for compiling templates.
We can now use template_finder.get() to find the name we need.
2016-11-04 21:23:35 -07:00
Steve Howell a2874a3fe9 node tests: Simplify compiling of templates.
Now we just have two methods of importance:

    compile_template
    render_template

The compile_template() function will automatically
(and recursively) compile any partials it depends
on and mark those as compiled.
2016-11-04 11:23:11 -07:00
Steve Howell 0085164ad9 node tests: Avoid re-compiling templates.
This is a minor optimization to avoid re-compiling templates
that have already encountered.
2016-11-04 11:23:11 -07:00
Steve Howell dd4a8eeebd node tests: Extract render.find_included_partials(). 2016-11-04 11:23:11 -07:00
Steve Howell 155f7881b2 node tests: Extact template_finder() class. 2016-11-04 11:23:11 -07:00
Steve Howell 61d88cfc13 node tests: Use template_dir() to walk templates. 2016-11-04 11:23:11 -07:00
Brock Whittaker 1432c6613b zjsunit: Remove manual need to call global.use_template.
When the render function is run now, it uses the partial_finder
function to search recursively through files for partials and add them
so that test writers don’t have to.

This means that we no longer have to do any manual work to maintain
the templates.js check that all handlebars templates are rendered by
the node tests.
2016-11-02 22:08:47 -07:00
Brock Whittaker ff3d5ca4db Separate display settings from settings_tab.handlebars.
This separates the display settings module from the
settings_table.handlebars template.

Additionally, it fixes the node tests to search in the
static/templates/settings directory and initialize any templates in there
while running tests on the settings templates.
2016-10-05 22:26:40 -07:00
Sahil Dua 058587da77 Remove extra new lines at the ends of Zulip authoried files.
Fixes #1627.

[tweaked by tabbott to avoid patching third-party modules, for now]
2016-09-26 21:05:24 -07:00
Steve Howell 4dbeb66a4c tests: Add render.init() to node tests.
This makes sure we are explicit about partials in
individual test modules.  Eventually, we should figure
out a way to make partials automatically compile as
part of the node tests.
2016-08-25 13:56:08 -07:00
Steve Howell b3bc829f61 Extracted zjsunit/render.js 2016-07-30 14:54:30 -07:00