Pass on gemstone tests for the details view [feenkcom/gtoolkit#5059] · feenkcom/gt4gemstone@c88a98d · GitHub
Skip to content

Commit c88a98d

Browse files
committed
Pass on gemstone tests for the details view [feenkcom/gtoolkit#5059]
1 parent 5f38d39 commit c88a98d

6 files changed

Lines changed: 129 additions & 41 deletions

src/GToolkit-GemStone/GtGemStoneSemanticVersionNumber.class.st

Lines changed: 6 additions & 0 deletions

src/GToolkit-GemStone/GtGemStoneSessionFeatures.class.st

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Class {
2-
#name : 'GtGemStoneSessionFeatures',
3-
#superclass : 'Object',
2+
#name : #GtGemStoneSessionFeatures,
3+
#superclass : #Object,
44
#instVars : [
55
'featuresById'
66
],
7-
#category : 'GToolkit-GemStone'
7+
#category : #'GToolkit-GemStone'
88
}
99

10-
{ #category : 'accessing' }
10+
{ #category : #accessing }
1111
GtGemStoneSessionFeatures class >> collectFeaturesDefinitions [
1212
| featureSelectors |
1313
featureSelectors := ((Pragma
@@ -19,14 +19,14 @@ GtGemStoneSessionFeatures class >> collectFeaturesDefinitions [
1919
self perform: aSelector asSymbol ]
2020
]
2121

22-
{ #category : 'accessing' }
22+
{ #category : #accessing }
2323
GtGemStoneSessionFeatures class >> currentFeatures [
2424
^ SessionTemps current
2525
at: self featuresKeyName
2626
ifAbsentPut: [ self forCurrentDefinitions ]
2727
]
2828

29-
{ #category : 'features' }
29+
{ #category : #features }
3030
GtGemStoneSessionFeatures class >> exampleFeatureV1 [
3131
<gtGemStoneFeature>
3232

@@ -35,12 +35,12 @@ GtGemStoneSessionFeatures class >> exampleFeatureV1 [
3535
enable
3636
]
3737

38-
{ #category : 'accessing' }
38+
{ #category : #accessing }
3939
GtGemStoneSessionFeatures class >> featuresKeyName [
4040
^#GT_FEATURES_LIST_NAME
4141
]
4242

43-
{ #category : 'features' }
43+
{ #category : #features }
4444
GtGemStoneSessionFeatures class >> floatStringEncoding [
4545
"GtWireFloatPrintStringEncoder was added at the same time as this method"
4646
<gtGemStoneFeature>
@@ -50,12 +50,12 @@ GtGemStoneSessionFeatures class >> floatStringEncoding [
5050
enable
5151
]
5252

53-
{ #category : 'instance creation' }
53+
{ #category : #'instance creation' }
5454
GtGemStoneSessionFeatures class >> forCurrentDefinitions [
5555
^ self withAll: self collectFeaturesDefinitions
5656
]
5757

58-
{ #category : 'views' }
58+
{ #category : #views }
5959
GtGemStoneSessionFeatures class >> gtViewCurrentFeaturesFor: aView [
6060
<gtView>
6161
<gtClassView>
@@ -70,7 +70,7 @@ GtGemStoneSessionFeatures class >> gtViewCurrentFeaturesFor: aView [
7070
view: #gtViewFeaturesFor: ]
7171
]
7272

73-
{ #category : 'views' }
73+
{ #category : #views }
7474
GtGemStoneSessionFeatures class >> gtViewDefinedFeaturesFor: aView [
7575
<gtView>
7676
<gtClassView>
@@ -82,7 +82,7 @@ GtGemStoneSessionFeatures class >> gtViewDefinedFeaturesFor: aView [
8282
view: #gtViewFeaturesFor:
8383
]
8484

85-
{ #category : 'features' }
85+
{ #category : #features }
8686
GtGemStoneSessionFeatures class >> proxyIdentity [
8787
<gtGemStoneFeature>
8888

@@ -91,14 +91,14 @@ GtGemStoneSessionFeatures class >> proxyIdentity [
9191
enable
9292
]
9393

94-
{ #category : 'accessing' }
94+
{ #category : #accessing }
9595
GtGemStoneSessionFeatures class >> resetFeatures [
9696
^ SessionTemps current
9797
removeKey: self featuresKeyName
9898
ifAbsent: [ ]
9999
]
100100

101-
{ #category : 'features' }
101+
{ #category : #features }
102102
GtGemStoneSessionFeatures class >> spawnPrimitiveTypeAsProxyExampleFeature [
103103
<gtGemStoneFeature>
104104
"Only needed to indicate if GtRemotePhlowDeclarativeTestInspectable>>#gtColumnedListSpawnTextFor: has a column for spawning primitive types"
@@ -107,7 +107,7 @@ GtGemStoneSessionFeatures class >> spawnPrimitiveTypeAsProxyExampleFeature [
107107
enable
108108
]
109109

110-
{ #category : 'features' }
110+
{ #category : #features }
111111
GtGemStoneSessionFeatures class >> transcriptV1 [
112112
<gtGemStoneFeature>
113113

@@ -116,52 +116,52 @@ GtGemStoneSessionFeatures class >> transcriptV1 [
116116
enable
117117
]
118118

119-
{ #category : 'instance creation' }
119+
{ #category : #'instance creation' }
120120
GtGemStoneSessionFeatures class >> withAll: aCollection [
121121
^ self new
122122
initializeWithFeatures: aCollection
123123
]
124124

125-
{ #category : 'adding' }
125+
{ #category : #adding }
126126
GtGemStoneSessionFeatures >> addFeature: aFeature [
127127
featuresById at: aFeature featureId put: aFeature
128128
]
129129

130-
{ #category : 'converting' }
130+
{ #category : #converting }
131131
GtGemStoneSessionFeatures >> createSpecification [
132132
^ GtGemStoneFeaturesSpecification forFeatures: self
133133
]
134134

135-
{ #category : 'actions' }
135+
{ #category : #actions }
136136
GtGemStoneSessionFeatures >> disableFeatureWithId: aFeatureId [
137137
self
138138
featureWithId: aFeatureId
139139
ifPresent: [ :aFeature | aFeature disable ]
140140
ifAbsent: [ Error signal: 'Feature not found' ]
141141
]
142142

143-
{ #category : 'actions' }
143+
{ #category : #actions }
144144
GtGemStoneSessionFeatures >> enableFeatureWithId: aFeatureId [
145145
self
146146
featureWithId: aFeatureId
147147
ifPresent: [ :aFeature | aFeature enable ]
148148
ifAbsent: [ Error signal: 'Feature not found' ]
149149
]
150150

151-
{ #category : 'enumerating' }
151+
{ #category : #enumerating }
152152
GtGemStoneSessionFeatures >> featureWithId: aFeatureId [
153153
^ featuresById
154154
at: aFeatureId
155155
]
156156

157-
{ #category : 'enumerating' }
157+
{ #category : #enumerating }
158158
GtGemStoneSessionFeatures >> featureWithId: aFeatureId ifPresent: aPresentBlock [
159159
^ featuresById
160160
at: aFeatureId
161161
ifPresent: aPresentBlock
162162
]
163163

164-
{ #category : 'enumerating' }
164+
{ #category : #enumerating }
165165
GtGemStoneSessionFeatures >> featureWithId: aFeatureId ifPresent: aPresentBlock ifAbsent: anAbsentBlock [
166166
| feature |
167167
feature := featuresById
@@ -171,7 +171,7 @@ GtGemStoneSessionFeatures >> featureWithId: aFeatureId ifPresent: aPresentBlock
171171
^ aPresentBlock cull: feature
172172
]
173173

174-
{ #category : 'views' }
174+
{ #category : #views }
175175
GtGemStoneSessionFeatures >> gtViewFeaturesFor: aView [
176176
<gtView>
177177

@@ -188,33 +188,33 @@ GtGemStoneSessionFeatures >> gtViewFeaturesFor: aView [
188188
send: [ :assoc | assoc value ]
189189
]
190190

191-
{ #category : 'initialization' }
191+
{ #category : #initialization }
192192
GtGemStoneSessionFeatures >> initializeWithFeatures: aCollection [
193193
featuresById := Dictionary new.
194194

195195
aCollection do: [ :aFeature |
196196
self addFeature: aFeature ]
197197
]
198198

199-
{ #category : 'testing' }
199+
{ #category : #testing }
200200
GtGemStoneSessionFeatures >> isFeatureEnabledWithId: aFeatureId [
201201
^ self
202202
featureWithId: aFeatureId
203203
ifPresent: [ :aFeature | aFeature isEnabled ]
204204
ifAbsent: [ false ]
205205
]
206206

207-
{ #category : 'accessing' }
207+
{ #category : #accessing }
208208
GtGemStoneSessionFeatures >> items [
209209
^ featuresById values
210210
]
211211

212-
{ #category : 'accessing' }
212+
{ #category : #accessing }
213213
GtGemStoneSessionFeatures >> numberOfFeatures [
214214
^ featuresById size
215215
]
216216

217-
{ #category : 'printing' }
217+
{ #category : #printing }
218218
GtGemStoneSessionFeatures >> printOn: aStream [
219219
super printOn: aStream.
220220

src/GToolkit-RemoteExamples-GemStone/GtRemoteGemStoneDeclarativeViewsExamples.class.st

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,39 @@ GtRemoteGemStoneDeclarativeViewsExamples >> computeStyledTextForTreeNumber: anIn
1818
^ computedString
1919
]
2020

21+
{ #category : #'as yet unclassified' }
22+
GtRemoteGemStoneDeclarativeViewsExamples >> detailsView [
23+
<gtExample>
24+
25+
(self runningServer gt4gemstoneVersion isZero not and:
26+
[ self runningServer gt4gemstoneVersion <= GtGemStoneSemanticVersionNumber v1_1_362 ])
27+
ifTrue: [ ^ self ].
28+
29+
^ super detailsView
30+
]
31+
32+
{ #category : #'as yet unclassified' }
33+
GtRemoteGemStoneDeclarativeViewsExamples >> detailsViewWithCustomPrinting [
34+
<gtExample>
35+
36+
(self runningServer gt4gemstoneVersion isZero not and:
37+
[ self runningServer gt4gemstoneVersion <= GtGemStoneSemanticVersionNumber v1_1_362 ])
38+
ifTrue: [ ^ self ].
39+
40+
^ super detailsViewWithCustomPrinting
41+
]
42+
2143
{ #category : #'accessing - expected' }
2244
GtRemoteGemStoneDeclarativeViewsExamples >> expectedColumnedListTypedColumnsTwoItems [
45+
(self runningServer gt4gemstoneVersion isZero not and:
46+
[ self runningServer gt4gemstoneVersion <= GtGemStoneSemanticVersionNumber v1_1_362 ])
47+
ifTrue: [ ^ self expectedColumnedListTypedColumnsTwoItemsOldValue ].
48+
49+
^ ((Array new: 2) at: 1 put: ((Dictionary new) add: (#nodeValue->((Dictionary new) add: (#columnValues->((Array new: 3) at: 1 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+1.0'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); at: 2 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+2'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); at: 3 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'classIcon'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); yourself)); yourself)); add: (#nodeId->1); yourself); at: 2 put: ((Dictionary new) add: (#nodeValue->((Dictionary new) add: (#columnValues->((Array new: 3) at: 1 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+2.0'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); at: 2 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+3'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); at: 3 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'classIcon'); add: ('__typeName'->#GtRemotePhlowItemTextualValue); yourself); yourself)); yourself)); add: (#nodeId->2); yourself); yourself)
50+
]
51+
52+
{ #category : #'accessing - expected' }
53+
GtRemoteGemStoneDeclarativeViewsExamples >> expectedColumnedListTypedColumnsTwoItemsOldValue [
2354
^ ((Array new: 2) at: 1 put: ((Dictionary new) add: (#nodeValue->((Dictionary new) add: (#columnValues->((Array new: 3) at: 1 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+1.0'); yourself); at: 2 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+2'); yourself); at: 3 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->#classIcon); yourself); yourself)); yourself)); add: (#nodeId->1); yourself); at: 2 put: ((Dictionary new) add: (#nodeValue->((Dictionary new) add: (#columnValues->((Array new: 3) at: 1 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+2.0'); yourself); at: 2 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->'+3'); yourself); at: 3 put: ((Dictionary new) add: (#valueTypeName->'textualValue'); add: (#itemText->#classIcon); yourself); yourself)); yourself)); add: (#nodeId->2); yourself); yourself)
2455
]
2556

src/GToolkit-RemoteExamples-GemStone/GtRemoteGemStoneInspectionExamples.class.st

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,67 @@ GtRemoteGemStoneInspectionExamples >> metaclassInspection [
226226
inspectorTitle: 'a Metaclass3 (Object class)'
227227
]
228228
229+
{ #category : #'examples - objects' }
230+
GtRemoteGemStoneInspectionExamples >> objectWithDetailsViewInspection [
231+
<gtExample>
232+
<after: #stopServer>
233+
<return: #AssertionFailure>
234+
| scripter |
235+
236+
(self runningServer gt4gemstoneVersion isZero not and: [
237+
self runningServer gt4gemstoneVersion <= GtGemStoneSemanticVersionNumber v1_1_362 ])
238+
ifTrue: [ ^ self ].
239+
240+
scripter := self
241+
assertObjectInspectionFor: [ GtRemotePhlowDeclarativeDetailsInspectableForExamples new ]
242+
withTypeName: #GtRemotePhlowDeclarativeDetailsInspectableForExamples
243+
inspectorTitle: 'aGtRemotePhlowDeclarativeDetailsInspectableForExamples'.
244+
245+
scripter phlowCompositeToolStep
246+
label: 'Select remote inspector';
247+
clickOnToolAtIndex: 1;
248+
assertSelectedToolAtIndex: 1 withPhlowName: 'GemStone';
249+
play.
250+
251+
scripter inspectorStep
252+
assertSelectedTabWithName: 'Details (default print)';
253+
play.
254+
255+
scripter check
256+
exists;
257+
//BrLabel;
258+
@ [ :each | each text asString = 'String value' ];
259+
play.
260+
261+
scripter check
262+
exists;
263+
//BrLabel;
264+
@ [ :each | each text asString = 'hello world' ];
265+
play.
266+
267+
scripter inspectorStep
268+
clickOnTabWithName: 'Details (custom print)';
269+
play.
270+
271+
scripter check
272+
exists;
273+
//BrLabel;
274+
@ [ :each | each text asString = 'Now is the time' ];
275+
play.
276+
277+
scripter inspectorStep
278+
clickOnTabWithName: 'Details (with errors)';
279+
play.
280+
281+
scripter check
282+
exists;
283+
//BrLabel;
284+
@ [ :each | each text asString includesSubstring: 'ZeroDivide' ];
285+
play.
286+
287+
^ scripter
288+
]
289+
229290
{ #category : #'examples - objects' }
230291
GtRemoteGemStoneInspectionExamples >> orderedCollectionLargeInspection [
231292
<gtExample>

src/GToolkit-RemoteExamples-GemStone/GtRemoteGemStoneInspectorWorldExamples.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ GtRemoteGemStoneInspectorWorldExamples >> worldTabWithGemStoneInspectorOnInteger
4949
play.
5050

5151
scripter phlowCompositeToolStep
52-
onPagerPaneWithIndex: 2;
52+
onPagerToolInPaneWithIndex: 2;
5353
assertPhlowToolTabsHaveBothIconsAndLabels;
5454
assertPhlowToolTabsCount: 2;
5555
assertPhlowToolLabels: {'GemStone' . 'Proxy'}
@@ -70,7 +70,7 @@ GtRemoteGemStoneInspectorWorldExamples >> worldTabWithGemStoneInspectorOnInteger
7070

7171
scripter phlowCompositeToolStep
7272
label: 'Select Proxy tool';
73-
onPagerPaneWithIndex: 2;
73+
onPagerToolInPaneWithIndex: 2;
7474
clickOnToolAtIndex: 2;
7575
assertSelectedToolAtIndex: 2 withTabName: 'Proxy';
7676
play.

src/GToolkit-RemoteExamples-GemStone/TGtRemoteGemStoneSesionCreator.trait.st

Lines changed: 0 additions & 10 deletions

0 commit comments

Comments
 (0)