-
Notifications
You must be signed in to change notification settings - Fork 90
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
Custom properties #453
Comments
@yratanov you could this without defining a property
If you are still feeling strong about using a property, I would import |
@juanazam But it will break chaining, isn't it? |
As shown it will, but:
And using |
@juanazam not sure what you mean by "properly". I tried as you showed in your example, and it doesn't wait. |
@yratanov I don't have time to do it right now and test, but I'm pretty sure it's doable using await on the |
OK, so here what helped: import { getExecutionContext } from 'ember-cli-page-object/-private/execution_context';
export function powerSelect(selector) {
return {
isDescriptor: true,
get(_) {
return function(text) {
let executionContext = getExecutionContext(this);
return executionContext.runAsync(() => {
return selectChoose(selector, text);
});
};
}
};
} I think it would be very nice to expose |
@yratanov totally agree! We miss a recommended way to define custom actions. The problem with You can see a very initial piece of the effort at #447, but this PR is incomplete and it's going to be extended soon. |
Hi,
I am using Ember 3.3 +
"ember-cli-page-object": "^1.15.2"
.I'm trying to add new property to be used in page object like this:
But it doesn't work properly.
selectChoose
does not finish, while submit is already clicked.I looked in the code and it seems that my helper return value should be wrapped in
runAsync
fromrfs268.js
, but it is a private api....So in genearal I have these questions:
runAsync
for all contexts is private?The text was updated successfully, but these errors were encountered: