Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adapter tests, that should access the widget via the adapter, not directly. #1599

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ SpMorphicTextInputFieldAdapter >> isPassword [
^ self widget font isKindOf: FixedFaceFont
]

{ #category : 'accessing' }
SpMorphicTextInputFieldAdapter >> maxLength [

^ widget maxLength
]

{ #category : 'private' }
SpMorphicTextInputFieldAdapter >> setEditable: aBoolean to: aWidget [

Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Backend-Tests/SpCheckboxAdapterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SpCheckboxAdapterTest >> testChangeDeactivatedAfterOpenCheckboxDectivatesIt [
SpCheckboxAdapterTest >> testChangingLabelAffectTheWidget [

presenter label: 'ALabel'.
self assert: self widget label equals: 'ALabel'
self assert: self adapter label equals: 'ALabel'
]

{ #category : 'tests' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Backend-Tests/SpRadioButtonAdapterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SpRadioButtonAdapterTest >> classToTest [
SpRadioButtonAdapterTest >> testChangingLabelAffectTheWidget [

presenter label: 'ALabel'.
self assert: self widget label equals: 'ALabel'
self assert: self adapter label equals: 'ALabel'
]

{ #category : 'tests' }
Expand Down
4 changes: 2 additions & 2 deletions src/Spec2-Backend-Tests/SpTextInputFieldAdapterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SpTextInputFieldAdapterTest >> testChangeWidgetTextUpdatesPresenter [
SpTextInputFieldAdapterTest >> testMaxLengthIsSetInWidget [

presenter maxLength: 10.
self assert: self widget maxLength equals: 10
self assert: self adapter maxLength equals: 10
]

{ #category : 'tests' }
Expand All @@ -44,5 +44,5 @@ SpTextInputFieldAdapterTest >> testPasswordIsSetInWidget [
SpTextInputFieldAdapterTest >> testPresenterTextIsSetInWidget [

presenter text: 'something'.
self assert: self widget text equals: 'something'
self assert: self adapter getText equals: 'something'
]
Loading