-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved design of results screens (#13)
- Loading branch information
1 parent
f36631b
commit 1840ec0
Showing
13 changed files
with
192 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...s/src/main/kotlin/net/lachlanmckee/bitrise/results/domain/entity/TestResultDetailModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package net.lachlanmckee.bitrise.results.domain.entity | ||
|
||
internal data class TestResultDetailModel( | ||
val cost: String, | ||
val testSuites: TestSuites, | ||
val matrixIds: String | ||
) |
10 changes: 7 additions & 3 deletions
10
results/src/main/kotlin/net/lachlanmckee/bitrise/results/domain/entity/TestResultModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package net.lachlanmckee.bitrise.results.domain.entity | ||
|
||
internal data class TestResultModel( | ||
val cost: String, | ||
val testSuites: TestSuites, | ||
val matrixIds: String | ||
val branch: String, | ||
val status: String, | ||
val commitHash: String, | ||
val triggeredAt: String, | ||
val finishedAt: String, | ||
val buildSlug: String, | ||
val jobName: String? | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...s/src/main/kotlin/net/lachlanmckee/bitrise/results/domain/mapper/TestResultsListMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.lachlanmckee.bitrise.results.domain.mapper | ||
|
||
import net.lachlanmckee.bitrise.core.data.entity.BuildsData | ||
import net.lachlanmckee.bitrise.results.domain.entity.TestResultModel | ||
import javax.inject.Inject | ||
|
||
internal class TestResultsListMapper @Inject constructor() { | ||
fun mapToTestResultsList(buildsData: BuildsData): List<TestResultModel> { | ||
return buildsData.branchBuilds.entries.flatMap { (branch, builds) -> | ||
builds.map { build -> | ||
TestResultModel( | ||
branch = branch, | ||
status = build.status, | ||
commitHash = build.commitHash, | ||
triggeredAt = build.triggeredAt, | ||
finishedAt = build.finishedAt, | ||
buildSlug = build.buildSlug, | ||
jobName = build.originalEnvironmentValueList | ||
.find { envValue -> envValue.name == "JOB_NAME" } | ||
?.value | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.