Multiple json calls - fullcalendar

I can retrieve resources but I can't do the same with it's events.
$(document).ready(function() {
...
defaultView: 'resourceDay',
resources: 'LDAPRetornarSalesEdifici?edifici=' + $('#edifici').val(),
events: 'SQLRetornarHorariEdificiJSON?edifici=' + $('#edifici').val(),
viewRender: function(view, element) {
$("#calendar").fullCalendar('refetchEvents');
}
...
Both LDAPRetornarSalesEdifici and SQLRetornarSalesEdifici are servlets. The first one load my resources (meeting rooms) and the second one doesn't work.
This is the output of LDAPRetornarSalesEdifici:
[{"id":"3PB.C21","name":"Aula Félix Serratosa"},{"id":"3PB.C31","name":"Terrassa Administració"}]
This is the output of SQLRetornarSalesEdifici:
[{"id":"65985","title":"Seminari Dep. Quimica-NO ES FA (Eva Poca) - Seminari Quimica","start": {"year":2014,"month":9,"dayOfMonth":30,"hourOfDay":9,"minute":30,"second":0},"end":{"year":2014,"month":9,"dayOfMonth":30,"hourOfDay":10,"minute":30,"second":0},"allDay":false,"url":"ReservaModificarMostrarResultat?id\u003d65985","resourceId":"3PB.C21"},{"id":"63098","title":"Programa Oncologia (Cristina Méndez) - Seminari","start":{"year":2014,"month":9,"dayOfMonth":30,"hourOfDay":15,"minute":30,"second":0},"end":{"year":2014,"month":9,"dayOfMonth":30,"hourOfDay":17,"minute":30,"second":0},"allDay":false,"url":"ReservaModificarMostrarResultat?id\u003d63098","resourceId":"3PB.C21"}]
Firebug returns this error from jquery-1.9.1.min.js after receive event data:
TypeError: invalid 'in' operand e
...===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={}...

Related

Karate : headless chromedriver not working ,giving error as "chrome server returned empty list"

detailed Error i am getting is as below :
` [2.1:58] test.feature:58 - evaluation of 'karate-config.js' failed: javascript function call failed: com.intuit.karate.exception.KarateException:
Create.feature:21 - driver config / start failed: chrome server returned empty list from http://localhost:59435, options: {type=chrome, headless=true, showDriverLog=true, addOptions=["--no-sandbox","--windows-size=1080,1920","--disable-web-security","--credentials_enable_service=false","--profile.password_manager_enabled=false"], pollInterval=1000, pollAttempts=60, port=59435, target=null}
src.smoke.java.com..test: [1.1:30] test.feature:30 - evaluation of 'karate-config.js' failed: javascript function call failed: com.intuit.karate.exception.KarateException:
`
Below is chrome driver options setup, interestingly scripts get executed successfully when headless:false
function configureChromeForUITests(){
var chromePort = parseInt( Math.floor(50000 + Math.random() * Math.floor(15534)),10);
var IntegerType = Java.type('java.lang.Integer');
var chromePortIntObj = new IntegerType(chromePort);
var chromeDriverObject = {
type: 'chrome',
//executable: '/opt/homebrew/bin/chromedriver',
headless:true,
showDriverLog: true,
addOptions: [
'--no-sandbox',
'--windows-size=1080,1920',
'--disable-web-security',
'--credentials_enable_service=false',
'--profile.password_manager_enabled=false'
],
// webDriverSession: chromeSession,
pollInterval:1000,
pollAttempts: 60,
port: chromePortIntObj,
};
Tried giving executable path as executable: '/opt/homebrew/bin/chromedriver'

JSON DDL request failed - pipeline rowset is missing

Objective
Refresh a partition using a query (override). Using these as a guide:
https://www.sqlbi.com/articles/using-process-add-in-tabular-models/
https://gist.github.com/dgosbell/a7bc9fe9ff5a99fdb4df5819b8760217#file-refresh-with-override-example-txt
Apparently the MS example is not correct: https://learn.microsoft.com/en-us/bi-reference/tmsl/refresh-command-tmsl#examples
TMSL Script
{
"refresh" : {
"type" : "add",
"objects" : [{
"database" : "dbname",
"table" : "tblname"
}
],
"overrides" : [{
"partitions" : [
{
"originalObject" : {
"database" : "dbname",
"table" : "tblname",
"partition" : "partname"
},
"source" : {
"query" :
"SELECT * FROM source.view WHERE date_field = '2014-12-06'"
}
}
]
}
]
}
}
Error Message
The JSON DDL request failed with the following error: Failed to execute XMLA. Error returned: 'The Process command for partition 'partname' in table 'tblname' cannot be executed because the pipeline rowset is missing.
'..
Technical Details:
RootActivityId: 89a6f9ac-e5d4-4eaa-b049-455190039b4b
Date (UTC): 6/28/2019 3:20:36 PM
0: PFError::SetLastError() line 2158 + 0x0 (sql\picasso\engine\src\pf\eh\pferror.cpp)
1: PFSetLastError() line 2906 + 0x0 (sql\picasso\engine\src\pf\eh\pferror.cpp)
2: ConvertExceptionsToPFResult<<lambda_764f81a97ea803a6bb1663c7971ce151> >() line 424 + 0x34 (sql\picasso\engine\src\pf\kernel\shared\pfshmacros.inl)
3: PFSetLastErrorExTag() line 3461 + 0x2e (sql\picasso\engine\src\pf\eh\pferror.cpp)
4: 0x00007FFAB599CC7E (symbolic name unavailable)
Other Info
Executed on SSMS directly and in Powershell (via Runbook) with same error message.
Question
What does this error message mean exactly? (It is very hard to find
helpful documentation.) Or, is there an alternative solution to refreshing
a partition using a query override?
You can only use either a Query or M partition sources
If you are using an M partition source the syntax is:
"source":{
"type":"m",
"expression":"…"
}
And if you are using a Query partition source the syntax is:
"source":{
"type":"query",
"query":"…",
"dataSource":"…"
}

NoSuchElementError: no such element: Unable to locate element for protractor

element(By.xpath(("/html/body/div[2]/div[3]/md-content/md-card/md-card-content/div/div/div/div/md-custom-table/div/md-table-container/table/thead/tr/th[3]/span"))).click();
This is the code I want to make it work.
This isxpath path of where I want to be clicked
/html/body/div[2]/div[3]/md-content/md-card/md-card-content/div/div/div/div/md-custom-table/div/md-table-container/table/thead/tr/th[3]/span
This is the error
Message:
Failed: No element found using locator: By(xpath, /html/body/div[2]/div[3]/md-content/md-card/md-card-content/div/div/div/div/md-custom-table/div/md-table-container/table/thead/tr/th[3]/span) Stack:
NoSuchElementError: No element found using locator:
By(xpath, /html/body/div[2]/div[3]/md-content/md-card/md-card-content/div/div/div/div/md-custom-table/div/md-table-container/table/thead/tr/th[3]/span)
at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:26:26)
at NoSuchElementError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:241:26)
at /usr/lib/node_modules/protractor/built/element.js:717:27
at ManagedPromise.invokeCallback_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1379:14)
at TaskQueue.execute_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2775:27
at /usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)Error
at ElementArrayFinder.applyAction_ (/usr/lib/node_modules/protractor/built/element.js:403:27)
at ElementArrayFinder._this.(anonymous function) [as click] (/usr/lib/node_modules/protractor/built/element.js:101:30)
at ElementFinder.(anonymous function) [as click] (/usr/lib/node_modules/protractor/built/element.js:740:22)
at Object.<anonymous> (/home/vegan/hb-productupload/gateway/src/test/javascript/e2e/account/productDashboard/productDashboardControllerSpec.js:36:47)
at /usr/lib/node_modules/protractor/node_modules/jasminewd2/index.js:94:23
at new ManagedPromise (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1082:7)
at controlFlowExecute (/usr/lib/node_modules/protractor/node_modules/jasminewd2/index.js:80:18)
at TaskQueue.execute_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
From: Task: Run it("should be able to check product dashboard as a cta") in control flow
at Object.<anonymous> (/usr/lib/node_modules/protractor/node_modules/jasminewd2/index.js:79:14)
at /usr/lib/node_modules/protractor/node_modules/jasminewd2/index.js:16:5
at ManagedPromise.invokeCallback_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1379:14)
at TaskQueue.execute_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2775:27
From asynchronous test:
Error
at Suite.<anonymous> (/home/vegan/hb-productupload/gateway/src/test/javascript/e2e/account/productDashboard/productDashboardControllerSpec.js:33:9)
at Object.<anonymous> (/home/vegan/hb-productupload/gateway/src/test/javascript/e2e/account/productDashboard/productDashboardControllerSpec.js:8:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
1 spec, 1 failure Finished in 13.16 seconds
[15:19:25] I/launcher - 0 instance(s) of WebDriver still running
[15:19:25] I/launcher - chrome #01 failed 1 test(s)
[15:19:25] I/launcher - overall: 1 failed spec(s)
[15:19:25] E/launcher - Process exited with error code 1
So for same place, this is html:
<span translate="" class="ng-scope ng-binding">Number of Products</span>
This is the selector
body > div.site-content > div.layout-column.flex > md-content > md-card > md-card-content > div > div > div > div > md-custom-table > div > md-table-container > table > thead > tr > th.md-column.ng-scope.ng-isolate-scope.flex.md-sort.md-active > span
For same span, this can click
dashboardPageObject.element.all(by.css('[md-order-by="count"]')).get(1);.click();
browser.driver.sleep(28);
dashboardPageObject.element.all(by.css('[md-order-by="count"]')).get(1);.click();
It clicks 2 times but it does not wait 28 seconds.
I don't care selector for the xpath or css. For example for another
/html/body/div[2]/div[3]/header/md-content/md-tabs/md-tabs-wrapper/md-tabs-canvas/md-pagination-wrapper/md-tab-item[5]/span
This works
element(by.xpath('/html/body/div[2]/div[3]/header/md-content/md-tabs/md-tabs-wrapper/md-tabs-canvas/md-pagination-wrapper/md-tab-item[5]/span'));
First, as I mentioned above in the comments, the sleep() timer takes milliseconds, not seconds. So you are only waiting 0.28 seconds with that command. Extend it to 28000 if you really want to sleep for 28 seconds.
However, that's not the best approach. You should use implicit waits in the form of Expected Conditions so your tests are efficient and execute in a consistent manner.
You'll have to decide which method works best for you depending on the nature of that element you are trying to click, but you probably will end up using presenceOf() or visibilityOf().
presenceOf() waits for something to be appended to the DOM
visibilityOf() takes an existing element and waits for it to be visible.
Finally, xpath is not a great locator. It may work now in your current test, but xpath is very brittle as it's subject to easily change as development continues. I'd advise you to find another way to locate that element, since there aren't many attributes on that particular element I would probably choose cssContainingText()
So combining the above:
var el = element(by.cssContainingText('span', 'Number of Products'));
var EC = protractor.ExpectedConditions;
browser.wait(EC.presenceOf(el), 5000); // maximum wait of 5 seconds
expect(something).toEqual(your expected result);
This is po file
import { element, by, ElementArrayFinder, ElementFinder } from 'protractor';
export class scopePos {
greet() {
element(by.xpath("//scope-setup-panel/mat-expansion-panel/div/div/div/div[1]/div[2]/div[2]")).click()// click is not working here
}
}
Step definition file
export default function () {
this.When(/^I verified the event scope card$/, function (next) {
//z created an object of po file and calling
z.greet()
next();
});
}

How to add an item to a collection in RacerJs DerbyJs?

I want to add an item to a collection using RacerJs/DerbyJs, but it just doesn't work. I must be really overlooking something...
What I tried
model.set('news', [
{ text: "something" }
]);
And that does set a news-item. However, when I do this another time, it will just overwrite the existing item, and not add a new one. How to do that?
model.push('news', {text:"someText"}) also fails with "Object is not an array".
Basically, I just want the most basic version of a "post an update and show on 'wall' app", without any rooms nor making use of Arrays. Just one collection, and that's it.
Stacktrace of the .push() variant:
Wed May 22 2013 09:35:24 GMT+0200 (W. Europe Daylight Time) (23168) d7564d2d-f23
8-4ce0-a0a2-6e376e9b5cb1 ? ver: 0 - push 'news', { text: 'adsf' }
C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\
Memory.js:185
throw new TypeError(arr + ' is not an Array');
^
TypeError: [object Object] is not an Array
at Object.arrayLookupSet [as _arrayLookupSet] (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Memory.js:185:11)
at Object.applyArrayMethod [as _applyArrayMethod] (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Memory.js:145:18)
at Object.push (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Memory.js:118:15)
at applyTxn (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\transaction.js:114:32)
at Object.exports.applyTxnToDoc (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\transaction.js:126:3)
at Function.QueryInterface.publish (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\pubsub-memory\channel-interface-query.js:25:24)
at PubSub.publish (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\pubSub\PubSub.js:63:10)
at Store.module.exports.proto.publish (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\pubSub\pubSub.Store.js:174:20)
at publish (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:230:15)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:7:26)
at module.exports.events.middleware.txn (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:220:11)
at Store._sendToDb.lockingDone (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Store.js:294:12)
at mergeAll.setupRoutes (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\db-memory\index.js:70:13)
at DbMemory.mergeAll.get (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\db-memory\index.js:44:5)
at mergeAll.setupRoutes (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\db-memory\index.js:62:16)
at DbMemory.mergeAll.get (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\db-memory\index.js:44:5)
at mergeAll.setupRoutes (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\adapters\db-memory\index.js:60:14)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Store.js:321:15)
at Store._sendToDb (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\Store.js:324:10)
at writeToDb (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:216:15)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:7:26)
at serialEmitPrep (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:125:9)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:7:26)
at incrVer (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\modes\lww.js:18:12)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:7:26)
at Object.module.exports.events.init.store.eachContext.context.guardWrite (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\accessControl\accessControl.Store.js:54:51)
at accessController (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:103:17)
at next (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:7:26)
at Object.run (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\middleware.js:10:12)
at Socket.module.exports.events.socket (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\txns\txns.Store.js:267:26)
at Socket.racer.log.sockets.sockets.on.socket.on (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\lib\log.server.js:150:20)
at Socket.EventEmitter.emit [as $emit] (events.js:91:17)
at SocketNamespace.handlePacket (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\manager.js:488:38)
at WebSocket.Transport.onMessage (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transport.js:387:20)
at Parser. (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:39:10)
at Parser.EventEmitter.emit (events.js:88:17)
at opcodeHandlers.1.finish (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:288:16)
at Parser.opcodeHandlers.1.expectData [as expectHandler] (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:299:15)
at Parser.add (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:466:24)
at Parser.expect (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:499:10)
at Parser.opcodeHandlers.1.expectData (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:298:18)
at Parser.add (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:466:24)
at Parser.expect (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:499:10)
at opcodeHandlers.1.expectData (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:296:16)
at opcodeHandlers.1 (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:313:9)
at Parser.processPacket (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:533:8)
at Parser.add (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:466:24)
at Socket.WebSocket.onSocketConnect (C:\xampp\htdocs\Derbyjs\KnowEdge\app1\node_modules\derby\node_modules\racer\node_modules\socket.io\lib\transports\websocket\hybi-16.js:141:17)
at Socket.EventEmitter.emit (events.js:88:17)
at TCP.onread (net.js:396:14)
If you are trying to add a document to a collection you can also call model.add
model.add('news', {
text: "Something"
})
Which will add a new document to the news collection and generate the id for you.
More documentation can be found under http://derbyjs.com/#getters_and_setters
To create an item in the collection you can call model.set with explicitly specified path containing document ID, for example:
model.set('news.' + model.id(), {
text: "something"
})
model.id method will generate unique ID on each call to it.

How to create a file by registerMultiTask (gruntjs)

I want gruntjs to create a file on each build that contains some PHP code to define a version number.
the following code fragments are in my grunt.initConfig:
1st some meta
meta: {
versionfile: '<?php \n' +
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhii") =%>\'); \n' +
'?>'
}
2nd the configuration
versionfile: {
'lib/define-version.php': '<%= meta.versionfile %>'
}
and then the multitask definition
grunt.registerMultiTask('versionfile', 'create version file.', function() {
grunt.file.write(this.target, this.data);
});
when I run the job the following error comes up and the file is not written:
Running "versionfile:lib/define-version.php" (versionfile) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
I am thankful for every hint on what exactly this error means.
Maybe there is another way to write a file containing the php-code?
I found the error. The correct configuration has a = too much.
Instead of
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhii") =%>\'); \n' +
it must be
'define(\'VERSION\', \'<%= grunt.template.today("yyyymmddhhMM") %>\'); \n' +
(ignore the ii>MM, that's just another error ;)

Resources