Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generators #35

Merged
merged 6 commits into from
Aug 16, 2015
Merged

Generators #35

merged 6 commits into from
Aug 16, 2015

Conversation

juanazam
Copy link
Collaborator

Closes #32

import PageObject from '../../page-object';

function checked(selector /*, options */) {
return $(selector).prop('checked');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't assume $ is global, maybe we can import Ember

import Ember from 'ember';

let $ = Ember.$;

...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@san650
Copy link
Owner

san650 commented Jun 30, 2015

It would be great to have the list of available blueprints in the README.md

Maybe something like:


The addon includes the following blueprints

Name Description
page-object Creates a new page object under tests/pages folder
page-object-component Creates a new a component object to be used on a page object under tests/pages/components folder.
page-object-helper Creates a new a helper object to be used on a page object under tests/pages/helpers folder.

And then leave the current ember generate page-object users example. I don't think we need to add examples for the others.

return $(selector).prop('checked');
}

export default PageObject.customHelper(checked);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the name provided by the user as the name of the function:

function <%= camelizedModuleName %>(selector/*, options*/) {
  return ...;
}

export default PageObject.customHelper(<%= camelizedModuleName %>);

What do you think?

http://www.ember-cli.com/extending/#template-variables-aka-locals

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@san650
Copy link
Owner

san650 commented Jul 8, 2015

@juanazam ping

@juanazam
Copy link
Collaborator Author

@san650 pong

@san650 san650 merged commit cf2600b into master Aug 16, 2015
@san650 san650 deleted the generators branch August 26, 2015 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants