-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
also filter metrics, make tag filter editor nicer
- Loading branch information
1 parent
96b41ad
commit a9cbf5b
Showing
4 changed files
with
77 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package testcases | ||
|
||
import components.* | ||
import dev.fritz2.core.RenderContext | ||
import koin | ||
import kotlinx.coroutines.flow.filterNotNull | ||
import kotlinx.coroutines.flow.map | ||
|
||
fun RenderContext.tagFilterEditor() { | ||
val testCaseSearchFilterStore = koin.get<TestCaseSearchFilterStore>() | ||
val ratedSearchesStore = koin.get<RatedSearchesStore>() | ||
|
||
testCaseSearchFilterStore.data.filterNotNull().render { filter -> | ||
leftRightRow { | ||
|
||
row { | ||
p { | ||
+"tags" | ||
} | ||
filter.tags.forEach { tag -> | ||
secondaryButton(iconSource = SvgIconSource.Delete, text = tag) { | ||
clicks.map { tag } handledBy testCaseSearchFilterStore.removeTag | ||
} | ||
} | ||
ratedSearchesStore.data.renderNotNull { testCases -> | ||
val allTags = testCases.flatMap { it.tags.orEmpty() }.toSet().sorted() | ||
allTags.filter { !filter.tags.contains(it) }.forEach { tag -> | ||
primaryButton(iconSource = SvgIconSource.Plus, text = tag) { | ||
clicks.map { tag } handledBy testCaseSearchFilterStore.addTag | ||
} | ||
} | ||
} | ||
} | ||
infoPopup( | ||
"Tag Filtering", | ||
""" | ||
Use tags to filter your test cases. You can add tags to your test cases to make it easier to | ||
find them back, group them by search feature, etc. | ||
When running metrics, the tag filter applies as well. You can usw this to group test | ||
cases and evaluate the impact of changes on particular groups of test cases. | ||
""".trimIndent() | ||
) | ||
} | ||
} | ||
} |
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