File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
tests/konsist/src/test/kotlin/io/element/android/tests/konsist Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,15 @@ class KonsistPreviewTest {
166
166
additionalMessage = " Functions for Preview should be named like this: <ViewUnderPreview>Preview. " +
167
167
" Exception can be added to the test, for multiple Previews of the same view" ,
168
168
) {
169
- val testedView = it.name.removeSuffix(" Preview" )
170
- it.text.contains(" $testedView (" ) ||
171
- it.text.contains(" $testedView {" ) ||
172
- it.text.contains(" ContentToPreview(" )
169
+ val testedView = if (it.name.endsWith(" RtlPreview" )) {
170
+ it.name.removeSuffix(" RtlPreview" )
171
+ } else {
172
+ it.name.removeSuffix(" Preview" )
173
+ }
174
+ it.name.endsWith(" Preview" ) &&
175
+ (it.text.contains(" $testedView (" ) ||
176
+ it.text.contains(" $testedView {" ) ||
177
+ it.text.contains(" ContentToPreview(" ))
173
178
}
174
179
}
175
180
You can’t perform that action at this time.
0 commit comments