/
AbstractListCommonPropertiestTest.class.st
51 lines (37 loc) · 1.24 KB
/
AbstractListCommonPropertiestTest.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Class {
#name : #AbstractListCommonPropertiestTest,
#superclass : #AbstractWidgetAdapterTestCase,
#category : #'Spec-BackendTests'
}
{ #category : #testing }
AbstractListCommonPropertiestTest class >> isAbstract [
^ self == AbstractListCommonPropertiestTest
]
{ #category : #running }
AbstractListCommonPropertiestTest >> initializeTestedInstance [
presenter items: #(10 20 30).
]
{ #category : #running }
AbstractListCommonPropertiestTest >> testChangeListInPresenterUpdatesWidget [
self presenter items: #( '1' '2' '3').
backendForTest assertList: self widget displayItems: #('1' '2' '3')
]
{ #category : #running }
AbstractListCommonPropertiestTest >> testDoubleClickActivatesRowInDoubleClickActivationMode [
| activated |
activated := false.
self presenter activateOnDoubleClick.
self presenter whenActivatedDo: [ activated := true ].
backendForTest doubleClickFirstRowAndColumn: self widget.
self assert: activated
]
{ #category : #running }
AbstractListCommonPropertiestTest >> testSingleClickActivatesRowInSingleClickActivationMode [
| activated |
activated := false.
self presenter
activateOnSingleClick;
whenActivatedDo: [ activated := true ].
backendForTest clickFirstRowAndColumn: self widget.
self assert: activated.
]