-
-
Notifications
You must be signed in to change notification settings - Fork 768
chore: Include more tests into the pipeline #1566
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3fdbb74
chore: Include more tests into the pipeline
mykola-mokhnach 1c73b4c
Split android and iOS tests
mykola-mokhnach c635ce9
Merge branch 'master' of https://github.com/mykola-mokhnach/java-clie…
mykola-mokhnach ba66c62
Add options tests
mykola-mokhnach 305e176
Address comments
mykola-mokhnach 4ec8eb9
Merge branch 'master' of https://github.com/mykola-mokhnach/java-clie…
mykola-mokhnach eada98c
Simplify config set
mykola-mokhnach a3c310f
Simplify prerun/postrun
mykola-mokhnach cca94d5
Rename the base class
mykola-mokhnach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
77 changes: 77 additions & 0 deletions
77
src/main/java/io/appium/java_client/ios/options/other/CommandTimeouts.java
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.appium.java_client.ios.options.other; | ||
|
||
import io.appium.java_client.internal.CapabilityHelpers; | ||
import io.appium.java_client.remote.options.BaseMapOptionData; | ||
|
||
import java.time.Duration; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
public class CommandTimeouts extends BaseMapOptionData<CommandTimeouts> { | ||
public static final String DEFAULT_COMMAND = "default"; | ||
|
||
public CommandTimeouts() { | ||
} | ||
|
||
public CommandTimeouts(Map<String, Object> timeouts) { | ||
super(timeouts); | ||
} | ||
|
||
public CommandTimeouts(String json) { | ||
super(json); | ||
} | ||
|
||
/** | ||
* Sets the timeout for the particular Appium command that | ||
* is proxied to WDA. | ||
* Command names you can find in logs, look for | ||
* "Executing command 'command_name'" records. | ||
* Timeout value is expected to contain max milliseconds to wait for | ||
* the given WDA command to be executed before terminating the session forcefully. | ||
* | ||
* @param commandName The command name. | ||
* @param timeout Command timeout. | ||
* @return self instance for chaining. | ||
*/ | ||
public CommandTimeouts withCommandTimeout(String commandName, Duration timeout) { | ||
return assignOptionValue(commandName, timeout.toMillis()); | ||
} | ||
|
||
/** | ||
* Sets the default timeout for all Appium commands that | ||
* are proxied to WDA. | ||
* | ||
* @param timeout Commands timeout. | ||
* @return self instance for chaining. | ||
*/ | ||
public CommandTimeouts withDefaultCommandTimeout(Duration timeout) { | ||
return withCommandTimeout(DEFAULT_COMMAND, timeout); | ||
} | ||
|
||
/** | ||
* Get the command timeout. | ||
* | ||
* @param commandName The command name | ||
* @return Timeout value. | ||
*/ | ||
public Optional<Duration> getCommandTimeout(String commandName) { | ||
Optional<Object> result = getOptionValue(commandName); | ||
return result.map(CapabilityHelpers::toDuration); | ||
} | ||
} |
This file contains hidden or 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
16 changes: 16 additions & 0 deletions
16
src/main/java/io/appium/java_client/ios/options/simulator/PasteboardSyncState.java
This file contains hidden or 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
63 changes: 63 additions & 0 deletions
63
src/main/java/io/appium/java_client/ios/options/simulator/Permissions.java
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.appium.java_client.ios.options.simulator; | ||
|
||
import io.appium.java_client.remote.options.BaseMapOptionData; | ||
|
||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
public class Permissions extends BaseMapOptionData<Permissions> { | ||
public Permissions() { | ||
} | ||
|
||
public Permissions(Map<String, Object> permissions) { | ||
super(permissions); | ||
} | ||
|
||
public Permissions(String json) { | ||
super(json); | ||
} | ||
|
||
/** | ||
* Since Xcode SDK 11.4 Apple provides native APIs to interact with | ||
* application settings. Check the output of `xcrun simctl privacy booted` | ||
* command to get the list of available permission names. Use yes, no | ||
* and unset as values in order to grant, revoke or reset the corresponding | ||
* permission. Below Xcode SDK 11.4 it is required that applesimutils package | ||
* is installed and available in PATH. The list of available service names | ||
* and statuses can be found at https://github.com/wix/AppleSimulatorUtils. | ||
* For example: {"com.apple.mobilecal": {"calendar": "YES"}} | ||
* | ||
* @param bundleId The app identifier to change permissions for. | ||
* @param mapping Permissions mapping, where keys are perm names and vales are YES/NO. | ||
* @return self instance for chaining. | ||
*/ | ||
public Permissions withAppPermissions(String bundleId, Map<String, String> mapping) { | ||
return assignOptionValue(bundleId, mapping); | ||
} | ||
|
||
/** | ||
* Get permissions mapping for the given app bundle identifier. | ||
* | ||
* @param bundleId App bundle identifier. | ||
* @return Permissions mapping. | ||
*/ | ||
public Optional<Map<String, String>> getAppPermissions(String bundleId) { | ||
return getOptionValue(bundleId); | ||
} | ||
} |
This file contains hidden or 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
Oops, something went wrong.
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.
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.
it seems exclusion of
signMavenJavaPublication
is not needed anymoreThere 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.
was not sure about this one. How do you see it's not needed?
Uh oh!
There was an error while loading. Please reload this page.
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'm running it locally without exclusion and it doesn't fail
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.
but CI could differ, so it's just my assumption
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.
Created PR to check the assumption: #1568, all builds are passed.