File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
app/src/main/kotlin/org/wordpress/aztec/demo Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,14 @@ class MainActivity : AppCompatActivity(),
120120 EMOJI +
121121 LONG_TEXT
122122
123- var testMode: Boolean = false
123+ private val isRunningTest : Boolean by lazy {
124+ try {
125+ Class .forName(" android.support.test.espresso.Espresso" )
126+ true
127+ } catch (e: ClassNotFoundException ) {
128+ false
129+ }
130+ }
124131 }
125132
126133 private val MEDIA_CAMERA_PHOTO_PERMISSION_REQUEST_CODE : Int = 1001
@@ -258,7 +265,7 @@ class MainActivity : AppCompatActivity(),
258265 aztec.setToolbar(formattingToolbar)
259266
260267 // initialize the text & HTML
261- if (! testMode ) {
268+ if (! isRunningTest ) {
262269 source.displayStyledAndFormattedHtml(EXAMPLE )
263270 }
264271
You can’t perform that action at this time.
0 commit comments