hatepoint / phrases-hyperskill-tests

0 stars 1 forks source link

TimePickerDialog #3

Closed hatepoint closed 1 year ago

hatepoint commented 1 year ago

I'm having troubles with testing a TImePickerDialog. I need tests to just click 'OK' in the dialog that pops up, but I can't seem to understand how to find that button. Before that, I tried to select time, but still no luck (I used this as an example: https://github.com/robolectric/robolectric/blob/master/robolectric/src/test/java/org/robolectric/shadows/ShadowTimePickerDialogTest.java)

Any suggestions? @RedJocker

RedJocker commented 1 year ago

I will take a look.

Can you write me a descriptive name for the @Test function that you are trying to make?

RedJocker commented 1 year ago

I can't see any use of TimePickerDialog on your solution for stage2. You probably need to update the solution to be the expected solution for stage2

hatepoint commented 1 year ago

@RedJocker it's not for the stage 2, it's for the stage 3. I need to test whether reminders are issued correctly when the time is selected

RedJocker commented 1 year ago

ok, then please include what you have for stage3 here.

RedJocker commented 1 year ago

I have written a new example for TimePickerDialog on the examples repository.

But this is brand new, it was not tested before.

https://github.com/RedJocker/hyperskillRoboletricExample/blob/main/Project%20Name/TimePickerDialogExample/src/test/java/org/hyperskill/projectname/Stage1UnitTest.kt