RedJocker / fix-PhotoEditor

0 stars 0 forks source link

stage6 test, actual value is the same as initial value because coroutine was not finished before capturing value #11

Closed RedJocker closed 2 years ago

RedJocker commented 2 years ago

test method testShouldCheckDefaultBitmapEdit is failing to assert change in images because it is not waiting for filter task to finish it's job and thus the actual image tested is the same as the initial image and not the image after filters being applied

placing added code we can capture values after filters applied

        slBrightness.value += slBrightness.stepSize
        Shadows.shadowOf(Looper.getMainLooper()).runToEndOfTasks()  // added 
        Thread.sleep(500)                                            //added
        Shadows.shadowOf(Looper.getMainLooper()).runToEndOfTasks()  //added
RedJocker commented 2 years ago

fixed on fixTests branch