This repository has been archived by the owner on Dec 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jlipps
approved these changes
Jan 19, 2017
actualPropName = [actualPropName substringToIndex:dotPos]; | ||
NSString *suffix = [actualPropName substringFromIndex:dotPos]; | ||
NSString *actualPropName = [propName substringToIndex:dotPos]; | ||
NSString *suffix = [propName substringFromIndex:(dotPos + 1)]; | ||
return [NSExpression expressionForKeyPath:[NSString stringWithFormat:@"%@.%@", [FBElementUtils wdAttributeNameForAttributeName:actualPropName], suffix]]; |
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 please add unit test for such case? The tests container is located in UnitTests folder, NSExpressionFBFormatTests.m file.
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.
+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've updated the existing unit tests to make useful assertions.
facebook-github-bot
added
GH Review: accepted
Import Started
and removed
GH Review: review-needed
labels
Jan 23, 2017
@marekcirkos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
imurchie
referenced
this pull request
in appium/WebDriverAgent
Nov 16, 2017
* Try to reuse running WDA instance and tune WDA startup logic * Add more detailed issue description * Tune retries count * Avoid error message duplication * Tune max line lengths * Keep real device tutorial URL in a separate constant
dpgraham
pushed a commit
to dpgraham/appium-ios
that referenced
this pull request
Sep 9, 2020
Summary: This was not able to get the actual suffix, since it modified the property name as it went. Instead it should pull the substrings from the original property name. Also `substringFromIndex` is inclusive, so we need to go from one past the position of the dot. Closes facebookarchive/WebDriverAgent#456 Differential Revision: D4461673 Pulled By: marekcirkos fbshipit-source-id: ee734ef672fa8630e61a0fb73cf74cc8d5dbdb82
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was not able to get the actual suffix, since it modified the property name as it went. Instead it should pull the substrings from the original property name. Also
substringFromIndex
is inclusive, so we need to go from one past the position of the dot.