| Page 1 of 1 | [ 5 posts ] |
|
Below is an extract of the test code:
Code: <script src="/combo/lib/?/yui3/build/yui/yui.js"></script> <script> var Y = YUI({ allowRollup: false, filter: 'raw', modules: { 'edit-panel':{ fullpath: '../js/edit-panel.js', requires: ['widget','node','event', 'oop'] }, 'edit-panel-test': { fullpath: 'edit-panel-test.js', requires: ['edit-panel', 'yuitest', 'test', 'node-event-simulate', 'oop'] } }, useBrowserConsole: true }).use('edit-panel-test', 'edit-panel', 'test', 'yuitest', 'node-event-simulate', 'oop', 'console','widget','node','event', function (Y) { console.log(Y); new Y.Console().render('#log'); Y.Test.Runner.run(); }); I get an error on the following code within my widget that I am trying to test: Code: Y.extend(EditPanel, Y.Panel, { From what I can tell YUI isn't getting initialised correctly in my test and therefore isn't loading the OOP functionality required to extend a class. Does this sound right and if so can anyone know how to get around it? Thanks |
|
Looks to me like you are extending `Y.Panel` but 'panel' is not in your dependency list above, so that would likely error if your extending a class that doesn't exist.
|
|
Thanks for the reply. I changed the code to what is shown below but I still get the error that the Y.extend is not a function. It is almost as if I haven't registered some YUI modules correctly. Any ideas?
Code: var Y = YUI({ allowRollup: false, filter: 'raw', modules: { 'edit-panel':{ fullpath: '../js/edit-panel.js', requires: ['panel', 'widget','node','event', 'oop'] }, 'edit-panel-test': { fullpath: 'edit-panel-test.js', requires: ['panel', 'edit-panel', 'yuitest', 'test', 'node-event-simulate', 'oop'] } }, useBrowserConsole: true }).use('panel', 'edit-panel-test', 'edit-panel', 'test', 'yuitest', 'node-event-simulate', 'oop', 'console','widget','node','event', function (Y) { console.log(Y); new Y.Console().render('#log'); Y.Test.Runner.run(); }); |
|
|
|
You were right I had overlooked having a reference to the panel in my code (build.properties - component.requires).
Thanks for the help |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group