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

fix: do nothing for an empty array in w3c actions #308

Merged
merged 8 commits into from
Jul 21, 2024

Conversation

KazuCocoa
Copy link
Member

appium/WebDriverAgent#919 for mac2 driver

@KazuCocoa KazuCocoa marked this pull request as ready for review July 18, 2024 07:11
@mykola-mokhnach
Copy link
Contributor

Would it make more sense to apply it after #309 is merged?

@KazuCocoa
Copy link
Member Author

KazuCocoa commented Jul 18, 2024

sounds good. Yea, I'll take a look at the key actions first

@KazuCocoa KazuCocoa marked this pull request as draft July 18, 2024 16:34
@KazuCocoa KazuCocoa marked this pull request as ready for review July 19, 2024 05:25
@KazuCocoa
Copy link
Member Author

@mykola-mokhnach can you review this? I have updated all.

@@ -792,14 +792,6 @@ @implementation FBW3CActionsSynthesizer
});

NSArray<NSDictionary<NSString *, id> *> *actionItems = [actionDescription objectForKey:FB_KEY_ACTIONS];
if (nil == actionItems || 0 == actionItems.count) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we short circuit here if this condition is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, let me keep them in case we use them in another place without guard in this PR

@@ -873,14 +865,6 @@ @implementation FBW3CActionsSynthesizer
}

NSArray<NSDictionary<NSString *, id> *> *actionItems = [actionDescription objectForKey:FB_KEY_ACTIONS];
if (nil == actionItems || 0 == actionItems.count) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@@ -874,7 +874,7 @@ @implementation FBW3CActionsSynthesizer

NSArray<NSDictionary<NSString *, id> *> *actionItems = [actionDescription objectForKey:FB_KEY_ACTIONS];
if (nil == actionItems || 0 == actionItems.count) {
NSString *description = [NSString stringWithFormat:@"It is mandatory to have at least one gesture item defined for each action. Action with id '%@' contains none", actionId];
NSString *description = [NSString stringWithFormat:@"It is mandatory to have at least one gesture item defined for each action. Action with id '%@' contains none", actionId];
Copy link
Member Author

Choose a reason for hiding this comment

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

Here is to make 4 spaces from 3

@KazuCocoa KazuCocoa merged commit a1aa636 into master Jul 21, 2024
13 of 14 checks passed
@KazuCocoa KazuCocoa deleted the actions-empty-array branch July 21, 2024 00:42
github-actions bot pushed a commit that referenced this pull request Jul 21, 2024
## [1.18.2](v1.18.1...v1.18.2) (2024-07-21)

### Bug Fixes

* do nothing for an empty array in w3c actions ([#308](#308)) ([a1aa636](a1aa636))
Copy link

🎉 This issue has been resolved in version 1.18.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants