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

Add a possibility to set container type for Simulator #770

Merged
merged 5 commits into from
Sep 14, 2018

Conversation

mykola-mokhnach
Copy link
Contributor

This PR depends on appium/node-simctl#57

}
const containerRoot = _.isFunction(containerRootSupplier)
? await containerRootSupplier(bundleId, containerType)
: containerRootSupplier;
const resultPath = path.posix.resolve(containerRoot, match[2]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could have a variable for match[2] as well, like you did with bundleId?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

let bundleId = match[1];
let containerType = null;
const typeSeparatorPos = bundleId.indexOf(CONTAINER_TYPE_SEPARATOR);
if (typeSeparatorPos > 0 && typeSeparatorPos < bundleId.length - 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a comment here that explains what this is doing and maybe even provide a small example

Something like:

// Parses bundleId and containerType from remote path string which has format `<bundleId>:<containerType>`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

let bundleId = match[1];
let containerType = null;
const typeSeparatorPos = bundleId.indexOf(CONTAINER_TYPE_SEPARATOR);
if (typeSeparatorPos > 0 && typeSeparatorPos < bundleId.length - 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like it if there were JSDocs for this method since I'm not too sure what this is supposed to do.

It should have been added already, but better late than never

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@dpgraham dpgraham merged commit 5e1ae26 into appium:master Sep 14, 2018
@mykola-mokhnach mykola-mokhnach deleted the containerType branch September 17, 2018 13:35
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
* Add a possibility to set container type for Simulator

* Fix the returned value

* make the calculation more precise

* Address comments

* Improve the error message
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