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

Possible Earl Grey actions we would want to expose? #159

Closed
LeoNatan opened this issue Jun 8, 2017 · 3 comments
Closed

Possible Earl Grey actions we would want to expose? #159

LeoNatan opened this issue Jun 8, 2017 · 3 comments

Comments

@LeoNatan
Copy link
Contributor

LeoNatan commented Jun 8, 2017

Earl Grey has many actions which we don't yet support in Detox.

One such action, as discussed in #139, is for handling picker views.

We may want to add individual support or use invoke to create a general way of using these actions without explicit support in JS. Such a solution must have good user-facing API.

@colinramsay
Copy link

I raised the subject of pickers in #139. I guess the naive implementation is something like:

class SetPickerColumnAction extends Action {
  constructor(value) {
    super();
    if (typeof value !== 'string') throw new Error(`SetPickerColumnAction ctor argument must be a string, got ${typeof value}`);
    this._call = invoke.call(invoke.IOS.Class('GREYActions'), 'actionForSetPickerColumn:', value);
  }
}

As @LeoNatan said in #139:

However, this is a very naive approach, as picker views can have custom views.

Questions, then:

  1. Is it still useful to implement something like this, since it would be useful now?
  2. What would a less naive version look like? How would Earl Grey handle a picker with custom views?

@rotemmiz
Copy link
Member

There's a WIP PR by @DanielMSchmidt which generates JS invocations according to objC header files.
#178

The first milestone is to wrap GREYActions. We will merge it soon.

@LeoNatan
Copy link
Contributor Author

Closing old issues. If something is needed, please open a new enhancement request.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants