Skip to content

Commit

Permalink
fixed Toplo-Widget-List-Tests dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
plantec committed Jan 10, 2025
1 parent 0e2f495 commit fb455f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
20 changes: 19 additions & 1 deletion src/Toplo-Widget-List-Tests/ToItemElementForTest.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
Class {
#name : #ToItemElementForTest,
#superclass : #ToLabel,
#superclass : #ToElement,
#traits : 'TToItem',
#classTraits : 'TToItem classTrait',
#instVars : [
'label'
],
#category : #'Toplo-Widget-List-Tests-ItemList'
}

{ #category : #initialization }
ToItemElementForTest >> initialize [

super initialize.
label := ToLabel new.
self addChild: label.
self fitContent
]

{ #category : #accessing }
ToItemElementForTest >> text: aText [

label text: aText
]
6 changes: 3 additions & 3 deletions src/Toplo-Widget-List-Tests/ToItemListElementTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ToItemListElementTest >> test [
self assert: l nodes size equals: l dataAccessor size.
self assert: (l nodeManager isKindOf: ToItemNodeManagerForTest).
l dataAccessor addAll:
((1 to: 10) collect: [ :i | ToItemElementForTest text: i asString ]).
((1 to: 10) collect: [ :i | ToItemElementForTest new text: i asString ]).
n := l nodes first.
self assert: (n isKindOf: ToItemNodeForTest).
self assert: (n holder isKindOf: ToBarNodeHolderForTest).
Expand All @@ -40,7 +40,7 @@ ToItemListElementTest >> testDisableItemAfterAdding [
| n item |
self skip.
self assert: l nodes size equals: 0.
item := ToItemElementForTest text: 'A'.
item := ToItemElementForTest new text: 'A'.
l dataAccessor add: item.
item disable.
n := l nodes first.
Expand All @@ -56,7 +56,7 @@ ToItemListElementTest >> testDisableItemBeforeAdding [
| n item |
self skip.
self assert: l nodes size equals: 0.
item := ToItemElementForTest text: 'A'.
item := ToItemElementForTest new text: 'A'.
item disable.
l dataAccessor add: item.
n := l nodes first.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
{ #category : #initialization }
ToItemNodeManagerForTest >> defaultFakeDataItem [

^ ToItemElementForTest text: 'X'
^ ToItemElementForTest new text: 'X'
]

{ #category : #'instance creation' }
Expand Down

0 comments on commit fb455f3

Please sign in to comment.