Skip to content

Commit 3aea8a6

Browse files
authored
ANDROID-17070 Add optional reason to IgnoreLogs and IgnoreScreenshots (#13)
1 parent 687b079 commit 3aea8a6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

android-snaptesting/src/main/java/com/telefonica/androidsnaptesting/Ignores.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ package com.telefonica.androidsnaptesting
33

44
@Retention(AnnotationRetention.RUNTIME)
55
@Target(AnnotationTarget.FUNCTION)
6-
public annotation class IgnoreLogs
6+
public annotation class IgnoreLogs(
7+
val reason: String = ""
8+
)
79

810
@Retention(AnnotationRetention.RUNTIME)
911
@Target(AnnotationTarget.FUNCTION)
10-
public annotation class IgnoreScreenshots
12+
public annotation class IgnoreScreenshots(
13+
val reason: String = ""
14+
)

app/src/androidTest/java/com/telefonica/androidsnaptesting/ExampleInstrumentedTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ExampleInstrumentedTest {
5050
}
5151

5252
@Test
53-
@IgnoreLogs
53+
@IgnoreLogs("Reason")
5454
fun testIgnoreLogsWithoutGoldenFile() {
5555
recorder.record("My log")
5656
}

0 commit comments

Comments
 (0)