The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/packages/kadira-flow-router/test/server/plugins/fast_render.js

35 lines
1.1 KiB

Tinytest.add('Server - Fast Render - fast render supported route', function (test) {
var expectedFastRenderCollData = [
[{_id: "two", aa: 20}, {_id: "one", aa: 10}]
];
var data = GetFRData('/the-fast-render-route');
test.equal(data.collectionData['fast-render-coll'], expectedFastRenderCollData);
});
Tinytest.add('Server - Fast Render - fast render supported route with params', function (test) {
var expectedFastRenderCollData = [
[{
_id: "one",
params: {id: 'the-id'},
queryParams: {aa: "20"}
}]
];
var data = GetFRData('/the-fast-render-route-params/the-id?aa=20');
test.equal(data.collectionData['fast-render-coll'], expectedFastRenderCollData);
});
Tinytest.add('Server - Fast Render - no fast render supported route', function (test) {
var data = GetFRData('/no-fast-render');
test.equal(data.collectionData, {});
});
Tinytest.add('Server - Fast Render - with group routes', function (test) {
var expectedFastRenderCollData = [
[{_id: "two", aa: 20}, {_id: "one", aa: 10}]
];
var data = GetFRData('/fr/have-fr');
test.equal(data.collectionData['fast-render-coll'], expectedFastRenderCollData);
});