-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Conversation
lib/commands/file-movement.js
Outdated
} | ||
const containerRoot = _.isFunction(containerRootSupplier) | ||
? await containerRootSupplier(bundleId, containerType) | ||
: containerRootSupplier; | ||
const resultPath = path.posix.resolve(containerRoot, match[2]); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
lib/commands/file-movement.js
Outdated
let bundleId = match[1]; | ||
let containerType = null; | ||
const typeSeparatorPos = bundleId.indexOf(CONTAINER_TYPE_SEPARATOR); | ||
if (typeSeparatorPos > 0 && typeSeparatorPos < bundleId.length - 1) { |
There was a problem hiding this comment.
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>`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
lib/commands/file-movement.js
Outdated
let bundleId = match[1]; | ||
let containerType = null; | ||
const typeSeparatorPos = bundleId.indexOf(CONTAINER_TYPE_SEPARATOR); | ||
if (typeSeparatorPos > 0 && typeSeparatorPos < bundleId.length - 1) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* Add a possibility to set container type for Simulator * Fix the returned value * make the calculation more precise * Address comments * Improve the error message
This PR depends on appium/node-simctl#57