Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ Install the latest APK from [TryFox Releases](https://github.com/mozilla-mobile/
- `mozilla-central` (displayed as "central")
- `mozilla-beta` (displayed as "beta")
- `mozilla-release` (displayed as "release")
- `autoland` (displayed as "autoland")
- **Search by Revision**: Enter a full revision hash to find associated builds for the selected project.
- **Automated CI Data Fetching**:
1. Queries Treeherder API for push details using the selected project and revision.
2. Displays relevant push comment from the revision (often a Bugzilla link).
3. Fetches all jobs associated with the push.
4. Filters for relevant, signed, non-test build jobs (jobs containing "B" and "s", excluding "t" in their symbols).
4. Filters for relevant Android APK build jobs, including signed and unsigned builds, while excluding test jobs.
5. For each job, retrieves its artifacts from Taskcluster.
- **Job and Artifact Display**:
- Lists build jobs with their app icon (e.g., Fenix, Focus), job name, job symbol, and Task ID.
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ dependencies {
// Additional Compose dependencies
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.work.runtime.ktx)

// DataStore
implementation(libs.androidx.datastore.preferences)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class MainActivityDeeplinkTest {
}

@Test
fun testDeeplink_withAuthorEmail_populatesProfileScreen() {
fun testDeeplink_withAuthorEmail_populatesSearchScreen() {
val email = "tthibaud@mozilla.com"
val encodedEmail = "tthibaud%40mozilla.com"
val deeplinkUri =
Expand Down Expand Up @@ -118,7 +118,7 @@ class MainActivityDeeplinkTest {
}

@Test
fun testTryfoxScheme_withAuthorEmail_populatesProfileScreen() {
fun testTryfoxScheme_withAuthorEmail_populatesSearchScreen() {
val email = "tthibaud@mozilla.com"
val encodedEmail = "tthibaud%40mozilla.com"
val deeplinkUri =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.mozilla.tryfox.data

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.flowOf
import org.mozilla.tryfox.download.ApkDownloadCoordinator
import org.mozilla.tryfox.download.ApkDownloadRequest
import org.mozilla.tryfox.download.model.PersistedDownloadState

class FakeApkDownloadCoordinator : ApkDownloadCoordinator {
override val downloads = MutableStateFlow<Map<String, PersistedDownloadState>>(emptyMap())

override fun enqueue(request: ApkDownloadRequest): String = request.uniqueKey
override fun retry(request: ApkDownloadRequest): String = request.uniqueKey
override fun cancel(uniqueKey: String) = Unit
override fun observe(uniqueKey: String): Flow<PersistedDownloadState?> = flowOf(downloads.value[uniqueKey])
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FakeDownloadFileRepository(
override suspend fun downloadFile(
downloadUrl: String,
outputFile: File,
onProgress: (bytesDownloaded: Long, totalBytes: Long) -> Unit,
onProgress: suspend (bytesDownloaded: Long, totalBytes: Long) -> Unit,
): NetworkResult<File> {
downloadFileCalled = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package org.mozilla.tryfox.data

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import org.mozilla.tryfox.data.SearchHistory
import org.mozilla.tryfox.data.SearchHistoryEntry
import org.mozilla.tryfox.data.SearchHistoryQueryType
import org.mozilla.tryfox.data.repositories.UserDataRepository
import org.mozilla.tryfox.lan.LanReceiveIdentity

Expand All @@ -12,11 +15,22 @@ class FakeUserDataRepository : UserDataRepository {

private val _lastSearchedEmailFlow = MutableStateFlow("")
override val lastSearchedEmailFlow: Flow<String> = _lastSearchedEmailFlow
private val _searchHistoryFlow = MutableStateFlow<List<SearchHistoryEntry>>(emptyList())
override val searchHistoryFlow: Flow<List<SearchHistoryEntry>> = _searchHistoryFlow
private val _lanReceiveIdentityFlow = MutableStateFlow<LanReceiveIdentity?>(null)
override val lanReceiveIdentityFlow: Flow<LanReceiveIdentity?> = _lanReceiveIdentityFlow

override suspend fun saveLastSearchedEmail(email: String) {
_lastSearchedEmailFlow.value = email
recordSearch("try", email)
}

override suspend fun recordSearch(project: String, query: String, searchedAt: Long) {
val queryType = if ('@' in query) SearchHistoryQueryType.EMAIL else SearchHistoryQueryType.REVISION
_searchHistoryFlow.value = SearchHistory.record(
_searchHistoryFlow.value,
SearchHistoryEntry(project, query, queryType, searchedAt),
)
_lastSearchedEmailFlow.value = SearchHistory.latestEmail(_searchHistoryFlow.value)
}

override suspend fun saveLanReceiveIdentity(identity: LanReceiveIdentity) {
Expand All @@ -26,5 +40,6 @@ class FakeUserDataRepository : UserDataRepository {
// Helper method for tests to clear the stored email if needed
fun clearLastSearchedEmail() {
_lastSearchedEmailFlow.value = ""
_searchHistoryFlow.value = emptyList()
}
}
Loading
Loading