How to test phlow views
Add "self assertObjectPhlowViewsFor: object"
to your example or a test case.
How does it work?
Object>>#assertObjectPhlowViewsFor:
instantiates a GtPhlowViewTester
which collects all views from an object, renders them as graphical elements and checks if there are any errors or exceptions in those views or graphical elements.
myObject := Object new. self assertObjectPhlowViewsFor: myObject
Examples:
self assertObjectPhlowViewsFor: GtPhlowViewWithErrorExamples new
Validating individual phlow views:
view := GtPhlowEmptyView new list title: 'View'; items: [ (1 to: 19) ]; itemText: [ :i | (i % 15) isZero ifTrue: [ i / 0 ]. (i % 10) isZero ifTrue: [ '0' + i ]. (i % 5) isZero ifTrue: [ i at: 2 ]. i / (i % 5) ]. GtPhlowViewTester new assertViewOk: view
view := GtPhlowEmptyView new list title: 'View'; items: [ (1 to: 190) ]; itemText: [ :i | i even ifTrue: [ '0' + i ] ifFalse: [ i / 0 ] ]. GtPhlowViewTester new assertViewOk: view