Shorter screenshot filename.

This commit is contained in:
Benoit Marty
2023-07-11 12:51:41 +02:00
parent 43f85e41cd
commit e762e44cd5

View File

@@ -28,4 +28,15 @@ class ComponentTestPreview(
override val name: String = showkaseBrowserComponent.componentName
override fun toString(): String = showkaseBrowserComponent.componentKey
// Strip common package beginning
.replace("io.element.android.features.", "f.")
.replace("io.element.android.libraries.", "l.")
.replace("io.element.android.", "")
// Reduce default group (if present)
.replace("_DefaultGroup_", "_")
// No need to include `Preview` suffix of function name
.replace("Preview_", "_")
// Also for preview annotated with @ElementPreview
.replace("Preview-", "-")
}