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

[plugin-mobile-app] Add possibility to swipe the context #1939

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

ikalinin1
Copy link
Member

@ikalinin1 ikalinin1 commented Sep 3, 2021

Closes #1933

@ikalinin1 ikalinin1 marked this pull request as draft September 3, 2021 14:52
@@ -436,6 +436,9 @@ When I clear field located `accessibilityId(username)`

Swipes to an element in either UP, DOWN, LEFT, or RIGHT direction with the specified swipe duration

[INFO]
Step takes into account current context. If you need to perform swipe on the element, swith the context to the element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Step takes into account current context. If you need to perform swipe on the element, swith the context to the element.
The step takes into account current context. If you need to perform swipe on the element, you need to switch the context to this element.

@@ -39,4 +41,7 @@
List<WebElement> getAssertingWebElements();

boolean withAssertingWebElements(List<WebElement> elements, BooleanSupplier asserter);

<R, T extends SearchContext> R calculateWhen(Class<T> expectedClazz, Function<T, R> valueCalculator,
Supplier<R> defaultValueProvider);
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like not a part of UI context

@@ -70,6 +72,7 @@
void testGetCoordsNotIOS()
{
mockScrollbarActions();
Mockito.doReturn(null).when(uiContext).getSearchContext();
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's better to use static import for consistency

Comment on lines 138 to 140
argThat(a -> {
return expectedCoords.equals(a.get());
}))).thenReturn(expectedCoords);
Copy link
Collaborator

Choose a reason for hiding this comment

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

useless change?

import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;

public class SwipeArea
Copy link
Collaborator

Choose a reason for hiding this comment

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

org.openqa.selenium.Rectangle

@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #1939 (9b11330) into master (72dd535) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1939   +/-   ##
=========================================
  Coverage     96.01%   96.01%           
- Complexity     5294     5298    +4     
=========================================
  Files           751      751           
  Lines         15107    15117   +10     
  Branches       1029     1030    +1     
=========================================
+ Hits          14505    14515   +10     
  Misses          469      469           
  Partials        133      133           
Impacted Files Coverage Δ
...rg/vividus/bdd/mobileapp/model/SwipeDirection.java 100.00% <100.00%> (ø)
...va/org/vividus/bdd/mobileapp/steps/TouchSteps.java 100.00% <100.00%> (ø)
...ava/org/vividus/mobileapp/action/TouchActions.java 98.36% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e17901c...9b11330. Read the comment docs.

Copy link
Collaborator

@valfirst valfirst left a comment

Choose a reason for hiding this comment

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

Also unit test coverage is below the threshold

@sonarcloud
Copy link

sonarcloud bot commented Sep 8, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@valfirst valfirst merged commit c6ab617 into master Sep 8, 2021
@valfirst valfirst deleted the contextual-swipe branch September 8, 2021 11:21
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.

[Mobile Native Apps] Introduce contextual swipe
3 participants