rackerlabs/encore-ui — pull request #62 by Droogans (2014-02-24 21:57:59+00:00)
Title: Root element everywhere

This is a bad branch name. Oh well.

So the fixes mean that the output of the new templates will look like this:

> .page.js

```js
/*jshint node:true*/
var Page = require('astrolabe').Page;

var page = {

};

exports.rxTesting = {

initialize: function (rxTestingElement) {
page.rootElement = {
get: function () { return rxTestingElement; }
};
return Page.create(page);
}

};
```

> .midway.js

```js
var demoPage = require('../../../utils/demo.page.js');
var rxTestingPage = require('../rxTesting.page.js');
var expect = require('chai').use(require('chai-as-promised')).expect;

// Add midway tests to run
describe('rxTesting', function () {
var ptor = protractor.getInstance();
var rxTesting = rxTestingPage.initialize(ptor.findElement(protractor.By.css('#rxTesting')));

before(function () {
demoPage.go();
});

it('should show element', function () {
expect(rxTesting.rootElement.isDisplayed()).to.eventually.eq.true;
});
});
```

And finally, a missing semicolon was added to prevent syntax errors on rendering new templates.