mercredi 15 juillet 2020

ListView in integration test (Flutter)

I haven't found a complex examples for testing ListViews. Example.

I have a ListView, which has three objects Person.

Person{
   String name;
   String surname;
}

In UI, Person is wrapped in Column, giving them two Text Widgets for name and surname.

I click on FAB. Clicking on FAB adds new Person with name Tom and surname Thomson to the ListView. Now there are 4 objects of Person. And I know data of the last one.

How can I validate, that item was successfully added? Is there a way to check length/count of ListView? Is there a way to validate last added item params?

Appreciate!

Aucun commentaire:

Enregistrer un commentaire