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

chore: Refactor the background endpoint implementation #1064

Merged
merged 5 commits into from
Sep 7, 2019

Conversation

mykola-mokhnach
Copy link
Contributor

I would like to keep the approach where seconds argument is passed to this endpoint like in Android to avoid unnecessary confusion for different clients.

The final rules will be:

  • seconds value can be float
  • if seconds value is greater or equal to zero then the app is minimized and restored after the timeout
  • if seconds less than zero or null then home screen is shown

const selectEndpoint = (timeoutSeconds) => {
if (!util.hasValue(timeoutSeconds)) {
endpoint = homescreen;
} if (!isNaN(timeoutSeconds)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what this line is doing...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it check if timeoutSeconds is some random string or other object, which cannot be parsed to a number

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it on that line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

where do you want to see it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there was missing else. Should look better now

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! That makes sense, then. Thanks.

@mykola-mokhnach mykola-mokhnach merged commit ce5208b into appium:master Sep 7, 2019
@mykola-mokhnach mykola-mokhnach deleted the rm_condition branch September 7, 2019 20:00
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
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.

2 participants