Moving inspector utilities to Clouseau
This commit is contained in:
parent
25d4aa0c57
commit
194dbdaf14
|
@ -13,6 +13,7 @@ BaselineOfWebDriver >> baseline: spec [
|
||||||
spec
|
spec
|
||||||
package: 'WebDriver'
|
package: 'WebDriver'
|
||||||
];
|
];
|
||||||
|
baseline: 'Clouseau' with: [ spec repository: 'https://gitea.lyrion.ch/zilti/clouseau' ];
|
||||||
baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON/repository' ];
|
baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON/repository' ];
|
||||||
baseline: 'OSSubprocess' with: [ spec repository: 'github://pharo-contributions/OSSubprocess:master/repository' ]
|
baseline: 'OSSubprocess' with: [ spec repository: 'github://pharo-contributions/OSSubprocess:master/repository' ]
|
||||||
]
|
]
|
||||||
|
|
|
@ -116,21 +116,14 @@ WDElement >> element: anObject [
|
||||||
{ #category : #'private - utilities' }
|
{ #category : #'private - utilities' }
|
||||||
WDElement >> inspectionWDElement [
|
WDElement >> inspectionWDElement [
|
||||||
<inspectorPresentationOrder: 10 title: 'DOM Element'>
|
<inspectorPresentationOrder: 10 title: 'DOM Element'>
|
||||||
| presenter attrItems attrPresenter screenshotPresenter |
|
| presenter attrPresenter screenshotPresenter |
|
||||||
attrItems := OrderedCollection new.
|
|
||||||
self attributes keysAndValuesDo: [ :aKey :aValue | attrItems add: { aKey -> aValue } ].
|
|
||||||
|
|
||||||
attrPresenter := SpBoxLayout newTopToBottom
|
attrPresenter := SpBoxLayout newTopToBottom
|
||||||
add: (SpLabelPresenter new label: ('Infos about the "{1}" element:' format: {self name}); yourself)
|
add: (SpLabelPresenter new label: ('Infos about the "{1}" element:' format: {self name}); yourself)
|
||||||
expand: false
|
expand: false
|
||||||
fill: false
|
fill: false
|
||||||
padding: 5;
|
padding: 5;
|
||||||
add: (SpTablePresenter new
|
add: self attributes asStringTablePresenter
|
||||||
addColumn: (SpStringTableColumn title: 'Attribute' evaluated: [ :anObject | (anObject at: 1) key ]);
|
|
||||||
addColumn: (SpStringTableColumn title: 'Value' evaluated: [ :anObject | (anObject at: 1) value ]);
|
|
||||||
items: attrItems;
|
|
||||||
alternateRowsColor
|
|
||||||
)
|
|
||||||
expand: true
|
expand: true
|
||||||
fill: true
|
fill: true
|
||||||
padding: 5;
|
padding: 5;
|
||||||
|
|
|
@ -167,27 +167,12 @@ WebDriver >> inspectionWebDriver [
|
||||||
fill: true
|
fill: true
|
||||||
padding: 5;
|
padding: 5;
|
||||||
add: (SpLabelPresenter new label: 'Preferences'; yourself) expand: false fill: false padding: 5;
|
add: (SpLabelPresenter new label: 'Preferences'; yourself) expand: false fill: false padding: 5;
|
||||||
add: (SpTreeTablePresenter new
|
add: prefs asStringTreeTablePresenter
|
||||||
addColumn: (SpStringTableColumn title: 'Key' evaluated: [ :anObject | anObject key ]);
|
|
||||||
addColumn: (SpStringTableColumn title: 'Value' evaluated: [ :anObject | anObject value ]);
|
|
||||||
roots: prefs;
|
|
||||||
children: [ :anItem | anItem value isDictionary ifTrue: [ anItem value ] ifFalse: [ false ] ])
|
|
||||||
expand: true
|
expand: true
|
||||||
fill: true
|
fill: true
|
||||||
padding: 5;
|
padding: 5;
|
||||||
add: (SpLabelPresenter new label: 'Session Capabilities'; yourself) expand: false fill: false padding: 5;
|
add: (SpLabelPresenter new label: 'Session Capabilities'; yourself) expand: false fill: false padding: 5;
|
||||||
add: (SpTreeTablePresenter new
|
add: capabilities asStringTreeTablePresenter
|
||||||
addColumn: (SpStringTableColumn title: 'Key' evaluated: [ :anObject |
|
|
||||||
anObject isDictionary
|
|
||||||
ifTrue: [ anObject isEmpty ifTrue: [ '' ] ifFalse: [ anObject keys at: 1 ] ]
|
|
||||||
ifFalse: [ anObject key ] ]);
|
|
||||||
addColumn: (SpStringTableColumn title: 'Value' evaluated: [ :anObject |
|
|
||||||
anObject isDictionary ifTrue: [ '' ] ifFalse: [ anObject value ] ]);
|
|
||||||
roots: (capabilities ifNil: [ { } ] ifNotNil: [ capabilities ] );
|
|
||||||
children: [ :anItem |
|
|
||||||
anItem value isDictionary
|
|
||||||
ifTrue: [ anItem value isEmpty ifTrue: [ {} ] ifFalse: [ anItem value ] ]
|
|
||||||
ifFalse: [ {} ] ] )
|
|
||||||
expand: true
|
expand: true
|
||||||
fill: true
|
fill: true
|
||||||
padding: 5
|
padding: 5
|
||||||
|
|
Loading…
Reference in New Issue