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

Espresso test explore feed #5130

Open
wants to merge 17 commits into
base: espresso-test-main
Choose a base branch
from

Conversation

Williamrai
Copy link
Collaborator

What does this do?

This refactors the scroll function for Feed recycler view and adds the QTE test flow.

Phabricator:
https://phabricator.wikimedia.org/T378651

- the function scrolls based on title of the card, removes position as the scroll factor
- adds two   scrollToViewMainPageAndClick and scrollToCardWithTitleAndClick function
- the function can also take viewId
@Williamrai Williamrai added the WIP Work in progress label Nov 15, 2024
- fixes scroll to View with title by adding an offset which would allow espresso to click effectively
- adds the flow for espresso test from the QTE document
- refactors scroll and click function
- adds all the flow for Explore Feed from QTE doc
- adds try catch for conditional execution
@Williamrai Williamrai added Ready to merge PR passed design signoff and ready to be merged. and removed WIP Work in progress labels Nov 19, 2024
Copy link
Collaborator

@cooltey cooltey left a comment

Choose a reason for hiding this comment

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

I got the error on the notification icon:

11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.wikipedia.base.BaseRobot.clickOnDisplayedViewWithIdAnContentDescription(BaseRobot.kt:77)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.wikipedia.robots.screen.HomeScreenRobot.navigateToNotifications(HomeScreenRobot.kt:27)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.wikipedia.test.loggedoutuser.ExploreFeedTest.startExploreFeedTest(ExploreFeedTest.kt:134)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at java.lang.reflect.Method.invoke(Native Method)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
11-21 00:30:37.308 14880 14982 E TestRunner: 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

@Williamrai Williamrai changed the base branch from main to espresso-test-main November 21, 2024 14:52
@Williamrai Williamrai removed the Ready to merge PR passed design signoff and ready to be merged. label Nov 21, 2024
# Conflicts:
#	app/src/androidTest/java/org/wikipedia/tests/ExploreFeedTest.kt
#	app/src/androidTest/java/org/wikipedia/tests/SuggestedEditCardTest.kt
#	app/src/androidTest/java/org/wikipedia/tests/WatchListTest.kt
@Williamrai Williamrai added the Ready to merge PR passed design signoff and ready to be merged. label Nov 21, 2024
@cooltey
Copy link
Collaborator

cooltey commented Nov 22, 2024

Hi @Williamrai

I see this error messages:

11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.wikipedia.base.BaseRobot.clickOnDisplayedViewWithIdAnContentDescription(BaseRobot.kt:77)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.wikipedia.robots.screen.HomeScreenRobot.navigateToNotifications(HomeScreenRobot.kt:27)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.wikipedia.tests.ExploreFeedTest.startExploreFeedTest(ExploreFeedTest.kt:135)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at java.lang.reflect.Method.invoke(Native Method)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
11-22 03:12:02.567 17592 17681 E TestRunner: 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge PR passed design signoff and ready to be merged.
Development

Successfully merging this pull request may close these issues.

2 participants