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

Feature/scroll modifier #394

Merged
merged 20 commits into from
Oct 24, 2018
Merged

Feature/scroll modifier #394

merged 20 commits into from
Oct 24, 2018

Conversation

ernestosiak
Copy link
Contributor

@ernestosiak ernestosiak commented Oct 15, 2018

Description

Added new scroll modifier - user can scroll page to top/bottom or css/xpath selector

Motivation and Context

issue 386

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the AET Contributor License Agreement.

CHANGELOG.md Outdated Show resolved Hide resolved
@Jakub-Izbicki Jakub-Izbicki self-requested a review October 18, 2018 14:50
Optional<String> xpath = Optional.ofNullable(parameters.get(XPATH_PARAM_NAME))
.map(selector -> String.format(XPATH, selector));

return specificPosition.isPresent() ? specificPosition
Copy link
Contributor

Choose a reason for hiding this comment

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

You can avoid neste inline ifs, e.g.

    return Stream.of(specificPosition, css, xpath)
        .filter(Optional::isPresent)
        .findFirst()
        .orElse(Optional.empty());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice, refactored!

CHANGELOG.md Outdated Show resolved Hide resolved
ernestosiak and others added 2 commits October 23, 2018 15:15
…e/scroll-modifier

# Conflicts:
#	core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifier.java
#	integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java
@tkaik tkaik merged commit 0eb6ee6 into master Oct 24, 2018
@tkaik tkaik deleted the feature/scroll-modifier branch October 24, 2018 13:16
@tkaik tkaik mentioned this pull request Oct 24, 2018
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.

4 participants