Add tests tab stub
This commit is contained in:
@@ -37,7 +37,7 @@ CarpModule >> carpCoderCommentsFor: aView [
|
|||||||
^ aView explicit
|
^ aView explicit
|
||||||
title: 'Documentation';
|
title: 'Documentation';
|
||||||
tooltip: 'Module Documentation';
|
tooltip: 'Module Documentation';
|
||||||
priority: 30;
|
priority: 1;
|
||||||
disableAsync;
|
disableAsync;
|
||||||
stencil: [
|
stencil: [
|
||||||
| snippet snippetViewModel |
|
| snippet snippetViewModel |
|
||||||
@@ -118,6 +118,60 @@ CarpModule >> carpCoderStreamingMethodsFor: aView context: aPhlowContext [
|
|||||||
stencil: [ CarpStreamingMethodsCoderElement forModule: self ]
|
stencil: [ CarpStreamingMethodsCoderElement forModule: self ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #coders }
|
||||||
|
CarpModule >> carpCoderStreamingTestsFor: aView context: aPhlowContext [
|
||||||
|
<gtModuleView>
|
||||||
|
| aMethodsCoder aMethodsCoderViewModel aNewMethodCoderHolder |
|
||||||
|
|
||||||
|
aNewMethodCoderHolder := ValueHolder new.
|
||||||
|
|
||||||
|
^ aView explicit
|
||||||
|
priority: 10;
|
||||||
|
title: 'Tests';
|
||||||
|
disableAsync;
|
||||||
|
actionDropdownButtonDo: [ :aDrodownAction |
|
||||||
|
aDrodownAction dropdown
|
||||||
|
icon: BrGlamorousVectorIcons add;
|
||||||
|
tooltip: 'Add new test suite';
|
||||||
|
content: [ :aButton |
|
||||||
|
| aNewMethodCoder aNewMethodCoderViewModel aHandler |
|
||||||
|
|
||||||
|
aNewMethodCoderHolder contents
|
||||||
|
ifNotNil: [ :aContents |
|
||||||
|
aNewMethodCoderViewModel := aContents ]
|
||||||
|
ifNil: [
|
||||||
|
|
||||||
|
aNewMethodCoder := GtCarpCoderModel new.
|
||||||
|
|
||||||
|
aNewMethodCoderViewModel := aNewMethodCoder asCoderViewModel.
|
||||||
|
aNewMethodCoderViewModel
|
||||||
|
withoutHeader;
|
||||||
|
expanded: true;
|
||||||
|
focused: true;
|
||||||
|
moveCursorAtEnd.
|
||||||
|
|
||||||
|
aNewMethodCoderHolder contents: aNewMethodCoderViewModel.
|
||||||
|
|
||||||
|
aHandler := GtPharoNewMethodCodeSavedHandler new
|
||||||
|
methodsCoderViewModel: aMethodsCoderViewModel;
|
||||||
|
element: aButton;
|
||||||
|
methodCoderHolder: aNewMethodCoderHolder.
|
||||||
|
|
||||||
|
aNewMethodCoderViewModel weak
|
||||||
|
when: GtMethodCoderSaved
|
||||||
|
send: #onAnnouncement:
|
||||||
|
to: aHandler ].
|
||||||
|
|
||||||
|
(GtExpandedOnlyCoderElement new coderViewModel: aNewMethodCoderViewModel)
|
||||||
|
hExact: 300;
|
||||||
|
vFitContent;
|
||||||
|
background: Color white;
|
||||||
|
padding: (BlInsets all: 5);
|
||||||
|
addAptitude: BrGlamorousFocusableShadowAptitude new ];
|
||||||
|
name: #'button--add-new-test-suite'];
|
||||||
|
stencil: [ (CarpStreamingMethodsCoderElement forModule: self) onTests ]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
CarpModule >> expressions [
|
CarpModule >> expressions [
|
||||||
^ expressions
|
^ expressions
|
||||||
@@ -150,6 +204,11 @@ CarpModule >> setUses: aCollectionOfStrings [
|
|||||||
uses := aCollectionOfStrings asSet
|
uses := aCollectionOfStrings asSet
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
CarpModule >> tests [
|
||||||
|
^ tests
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #converting }
|
{ #category : #converting }
|
||||||
CarpModule >> toCarp [
|
CarpModule >> toCarp [
|
||||||
|
|
||||||
|
@@ -79,6 +79,10 @@ CarpModuleCoderElement >> buildModuleLabel [
|
|||||||
|
|
||||||
aContainer addChild: aModuleNameEditor.
|
aContainer addChild: aModuleNameEditor.
|
||||||
|
|
||||||
|
aContainer addChild: (BrFrame new
|
||||||
|
vFitContent;
|
||||||
|
hMatchParent).
|
||||||
|
|
||||||
aContainer addChild: (BrButton new
|
aContainer addChild: (BrButton new
|
||||||
aptitude: BrGlamorousButtonWithIconAptitude;
|
aptitude: BrGlamorousButtonWithIconAptitude;
|
||||||
icon: BrGlamorousVectorIcons play;
|
icon: BrGlamorousVectorIcons play;
|
||||||
|
@@ -43,3 +43,8 @@ CarpStreamingMethodsCoderElement >> module: aModule [
|
|||||||
module := aModule.
|
module := aModule.
|
||||||
self initializeForModule
|
self initializeForModule
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
CarpStreamingMethodsCoderElement >> onTests [
|
||||||
|
list itemsProvider: module tests asBrItemsProvider
|
||||||
|
]
|
||||||
|
Reference in New Issue
Block a user