Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

fix broken UTs in mojit skeletons #395

Merged
merged 2 commits into from
Aug 15, 2012
Merged

fix broken UTs in mojit skeletons #395

merged 2 commits into from
Aug 15, 2012

Conversation

FabianFrank
Copy link
Contributor

the renamed tests require the DOM and therefore need to have set the client archetype until mojito provides them a DOM on the server. today mojito creates apps that crash during mojito test. a lot of people reported this during the open hack day in bangalore, after they started playing with mojito.

the renamed tests require the DOM and therefore need to have set the client archetype until mojito provides them a DOM on the server. today mojito creates apps that crash during mojito test. a lot of people reported this during the open hack day in bangalore, after they started playing with mojito.
@mridgway
Copy link
Collaborator

Why do the binders even have an affinity? Aren't they always client? Most apps that I've seen don't have an affinity on the binders.

@FabianFrank
Copy link
Contributor Author

The binders don't have an affinity, but the tests have. IMHO this makes sense, because it makes sense to run binder tests on the server (for convenience, faster builds).

@mridgway
Copy link
Collaborator

Binder tests inherently require the DOM. I agree they should be able to run on the server using something like PhantomJS and we plan on addressing this with Arrow, but the affinity should still be client. I'm going to merge this since it's a no brainer.

mridgway added a commit that referenced this pull request Aug 15, 2012
fix broken UTs in mojit skeletons
@mridgway mridgway merged commit ebaf86f into YahooArchive:develop Aug 15, 2012
@FabianFrank
Copy link
Contributor Author

Thanks @mridgway. FYI, we are running them on the server in Axis today, by injecting the dom dependency into YUI as explained on http://yuilibrary.com/yui/docs/yui/nodejs-dom.html.

@ghost ghost assigned mridgway Aug 17, 2012
@ramses0
Copy link

ramses0 commented Aug 17, 2012

Pulling yahoo:develop and re-running stuff worked well.

INFO mojito-dispatcher: Dispatching an instance of 'hello/index' with the modules: [HelloMojitModelFoo, mojito-perf, mojito, HelloMojit, mojito-config-addon, yui-base, json-stringify, oop, event-custom-base, mojito-view-renderer, array-extras, mojito-util, mojito-output-adapter-addon, querystring-parse, querystring-stringify, querystring-stringify-simple, mojito-route-maker, mojito-url-addon, mojito-assets-addon, mojito-http-addon, mojito-cookie-addon, mojito-params-addon, mojito-composite-addon, mojito-action-context, mojito-controller-context, mojito-resource-store-adapter, intl-base, event-custom-complex, intl, mojito-dispatcher, mojito-hb, mojito-mu]

status
Mojito is working.

data
some: data

The old error message for posterity (after changing affinity from server to client):

INFO mojito-dispatcher: Creating controller context
WARN Server OutputHandler: Error 404: Mojit controller prototype is not an object! (mojit id: 'hello')
Error: Mojit controller prototype is not an object! (mojit id: 'hello')
at Object.YUI.add.ControllerContext.init (/usr/local/lib/node_modules/mojito/lib/app/autoload/controller-context.common.js:46:25)
at Object.ControllerContext (/usr/local/lib/node_modules/mojito/lib/app/autoload/controller-context.common.js:21:14)
at YUI.add.store.expandInstance.groups (/usr/local/lib/node_modules/mojito/lib/app/autoload/dispatch.common.js:247:30)
at proto._notify (/usr/local/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:836:17)
at proto.use (/usr/local/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:807:19)
at runMojit (/usr/local/lib/node_modules/mojito/lib/app/autoload/dispatch.common.js:287:45)
at modulesLoaded (/usr/local/lib/node_modules/mojito/lib/app/autoload/dispatch.common.js:338:21)
at YUI.add.Y.namespace.Dispatcher.init.store (/usr/local/lib/node_modules/mojito/lib/app/autoload/dispatch.common.js:366:25)
at Object.YUI.add.Loader.load (/usr/local/lib/node_modules/mojito/lib/app/autoload/loader.common.js:34:17)
at YUI.add.Y.namespace.Dispatcher.init.store (/usr/local/lib/node_modules/mojito/lib/app/autoload/dispatch.common.js:360:28)

@FabianFrank
Copy link
Contributor Author

Sounds like you might have changed the affinity of the controller instead of the test. Only change the test's affinity!

@ramses0
Copy link

ramses0 commented Aug 22, 2012

Thanks for the note... I did change the controller affinity when I was "messing around trying to fix what I didn't know was broken". But this pull request fixed everything so I wasn't getting any error messages. I just wanted to share what was the error message I had gotten before as I didn't include the details in the previous issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants