-
Notifications
You must be signed in to change notification settings - Fork 226
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
End of Year: Generate stories with dummy data + support dynamic lengths #495
Conversation
Also removed fake delay
@@ -109,6 +112,48 @@ class StoriesViewModelTest { | |||
assertEquals(state.currentStory, story1) | |||
} | |||
|
|||
@OptIn(ExperimentalCoroutinesApi::class) | |||
@Test | |||
fun `when next is invoked, then story skips to correct position`() = runTest { |
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.
Tests to check progress position seem to be flaky. They're failing in PR: #498. I'll timebox and investigate tomorrow or remove them.
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 got the tests to pass in PR: #498. Looks like I needed to add story lengths to mock stories in one of the tests. I'll monitor and address flakiness if they fail again.
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.
This is coming along nicely.
The only issue I ran into is that the list items in the list of podcasts is capturing the tap events, which can make it tricky to go to the previous/next story. This can be addressed in a follow-up PR if you'd like, though. I'll hold off on merging in case you want to do that here and for the flaky tests you wanted to look into.
device-2022-10-26-163551.mp4
@Query("SELECT * FROM podcasts LIMIT 5") | ||
abstract fun findRandomPodcasts(): Flow<List<Podcast>> |
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.
Are these database "random" methods just for testing purposes, or is it really supposed to return podcasts randomly?
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.
These are just for testing purposes and will be converted to return actual top podcasts and the longest episode. Thanks for highlighting it though!
Two additional things I noticed when testing your follow-up PR: On a few occasions when I was playing around with landscape, the story view got messed up where it had "extra" stories, and the gaps in the top-of-the-screen indicator would change position (and not line up with the actual story changes consistently). I know that description is hard to follow, you've got to watch the video because it's pretty weird. I reproduced this 4 times, but it was very hard to reproduce and I don't know how I reproduced it other than that it seemed to occur when I was testing landscape and switching orientations. FWIW, once I got the phone into this weird state, it would display that state in both landscape and vertical orientation. device-2022-10-26-173009.mp4I also noticed that the swipe down motion to close the end of year screen is too sensitive to me. Touching the screen with the slightest downward movement seems to swipe the screen away for me. Certianly not something that has to be addressed in this PR. device-2022-10-26-172648.mp4 |
Thanks for testing it, @mchowning!
Yep, these were not in the scope of this PR, I'll address them in future PRs.
I wasn't able to reproduce it at all. Tried switching between portrait and landscape as well. Most probably we'll lock the screen to portrait just like in iOS. So I'll hold off going into this rabbit hole and I'll also discuss with you how exactly you got into this state. EDIT: I got into this state by rapidly letting the app go into background and foreground states with the stories screen open. It is hard to reproduce and doesn't happen consistently as you noted but I'll have it fixed in a future PR. I added these items to the main task, I'll go ahead and merge this PR. |
iOS PR: Automattic/pocket-casts-ios#397
Creates "dummy" stories based on randomly generated podcasts and episode. This PR also adds support for dynamic story lengths.
Same as the previous tasks, the designs here are not final and are mainly placeholders.
Testing Instructions
END_OF_YEAR_ENABLED
feature flag totrue
inbase.gradle
¶ If you don't see any podcasts, tap some podcasts on Discover or login.
Screenshots or Screencast
dummy_stories_dynamic-lengths.mp4
Checklist
N/A as only fake story views are added
modules/services/localization/src/main/res/values/strings.xml
I have tested any UI changes...