-
Notifications
You must be signed in to change notification settings - Fork 996
MBL-2851: Re-enable support for Discover deep links #2456
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ import com.kickstarter.libs.utils.extensions.isDiscoverCategoriesPath | |
| import com.kickstarter.libs.utils.extensions.isDiscoverPlacesPath | ||
| import com.kickstarter.libs.utils.extensions.isDiscoverScopePath | ||
| import com.kickstarter.libs.utils.extensions.isDiscoverSortParam | ||
| import com.kickstarter.libs.utils.extensions.isDiscoverUri | ||
| import com.kickstarter.libs.utils.extensions.isEmailDomain | ||
| import com.kickstarter.libs.utils.extensions.isKSFavIcon | ||
| import com.kickstarter.libs.utils.extensions.isKickstarterUri | ||
|
|
@@ -118,6 +119,23 @@ class UriExtTest : KSRobolectricTestCase() { | |
| assertFalse(uri.isKickstarterUri(webEndpoint)) | ||
| } | ||
|
|
||
| @Test | ||
| fun testUri_isDiscoverUri() { | ||
| val discoverBaseUri1 = Uri.parse("https://www.ksr.com/discover") | ||
| val discoverBaseUri2 = Uri.parse("https://www.ksr.com/discover/") | ||
| val discoverScopeUri = Uri.parse("https://www.ksr.com/discover/ending-soon") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question about the url of these tests π€ , in which scenario do we see something like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great question. For flexibility, |
||
| val discoverSortUri = Uri.parse("https://www.ksr.com/discover/advanced?sort=ending-soon") | ||
| val discoverMalformedUri = Uri.parse("https://www.ksr.com/discovery/advanced?sort=popularity") | ||
| assertTrue(discoverBaseUri1.isDiscoverUri(webEndpoint)) | ||
| assertTrue(discoverBaseUri2.isDiscoverUri(webEndpoint)) | ||
| assertTrue(discoverScopeUri.isDiscoverUri(webEndpoint)) | ||
| assertTrue(discoverSortUri.isDiscoverUri(webEndpoint)) | ||
| assertTrue(discoverCategoriesUri.isDiscoverUri(webEndpoint)) | ||
| assertTrue(discoverPlacesUri.isDiscoverUri(webEndpoint)) | ||
| assertFalse(discoverMalformedUri.isDiscoverUri(webEndpoint)) | ||
| assertFalse(projectUri.isDiscoverUri(webEndpoint)) | ||
| } | ||
|
|
||
| @Test | ||
| fun testUri_isWebViewUri() { | ||
| val ksrUri = Uri.parse("https://www.ksr.com/project") | ||
|
|
||

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.
π