-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
82 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ign-Lite-Extensions-Tests.package/MDLPanelSwitcherButtonTest.class/instance/testSelect.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tests | ||
testSelect | ||
self deny: [ :html | MDLPanelSwitcherButton new renderContentOn: html ] generatedIncludes: 'class="panel-switcher-button__content panel-switcher-selected"'. | ||
self assert: [ :html | MDLPanelSwitcherButton new select; renderContentOn: html ] generatedIncludes: 'class="panel-switcher-button__content panel-switcher-selected"' |
Empty file.
10 changes: 10 additions & 0 deletions
10
...-Lite-Extensions-Tests.package/MDLVerticalToolbarTest.class/instance/testAddAllButtons.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tests | ||
testAddAllButtons | ||
| toolbar | | ||
toolbar := MDLVerticalToolbar new. | ||
self assert: toolbar buttons size equals: 0. | ||
toolbar | ||
addAllButtons: | ||
{(MDLFoldButton for: '#id'). | ||
MDLPanelSwitcherButton new}. | ||
self assert: toolbar buttons size equals: 2 |
7 changes: 7 additions & 0 deletions
7
...sign-Lite-Extensions-Tests.package/MDLVerticalToolbarTest.class/instance/testAddButton.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tests | ||
testAddButton | ||
| toolbar | | ||
toolbar := MDLVerticalToolbar new. | ||
self assert: toolbar buttons size equals: 0. | ||
toolbar addButton: (MDLFoldButton for: '#id'). | ||
self assert: toolbar buttons size equals: 1 |
8 changes: 8 additions & 0 deletions
8
...esign-Lite-Extensions-Tests.package/MDLVerticalToolbarTest.class/instance/testChildren.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests | ||
testChildren | ||
| toolbar buttons | | ||
toolbar := MDLVerticalToolbar new. | ||
buttons := {(MDLFoldButton for: '#id'). | ||
MDLPanelSwitcherButton new}. | ||
toolbar addAllButtons: buttons. | ||
self assertCollection: toolbar children hasSameElements: buttons |
11 changes: 11 additions & 0 deletions
11
...sign-Lite-Extensions-Tests.package/MDLVerticalToolbarTest.class/instance/testRendering.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests | ||
testRendering | ||
self | ||
assert: [ :html | | ||
html | ||
render: | ||
(MDLVerticalToolbar | ||
buttons: | ||
{(MDLFoldButton for: '#id'). | ||
MDLPanelSwitcherButton new}) ] | ||
generatedIncludes: 'class="vertical-toolbar"' |
12 changes: 12 additions & 0 deletions
12
...tensions-Tests.package/MDLVerticalToolbarTest.class/instance/testResetButtonsSelection.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
tests | ||
testResetButtonsSelection | ||
| toolbar buttons | | ||
toolbar := MDLVerticalToolbar new. | ||
buttons := {(MDLFoldButton for: '#id'). | ||
(MDLPanelSwitcherButton new | ||
select; | ||
yourself)}. | ||
toolbar addAllButtons: buttons. | ||
self assert: (toolbar children anySatisfy: #isSelected). | ||
toolbar resetButtonsSelection. | ||
self deny: (toolbar children anySatisfy: #isSelected) |
11 changes: 11 additions & 0 deletions
11
...aterial-Design-Lite-Extensions-Tests.package/MDLVerticalToolbarTest.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "MDLAbstractSeasideTestCase", | ||
"category" : "Material-Design-Lite-Extensions-Tests-Panels", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "MDLVerticalToolbarTest", | ||
"type" : "normal" | ||
} |
5 changes: 5 additions & 0 deletions
5
src/Material-Design-Lite-Extensions.package/MDLFoldButton.class/instance/isSelected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
accessing | ||
isSelected | ||
"To be polymorphic with MDLPanelSwitcherButton" | ||
|
||
^ false |
4 changes: 4 additions & 0 deletions
4
...terial-Design-Lite-Extensions.package/MDLPanelSwitcherButton.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
self isSelected: false |
2 changes: 1 addition & 1 deletion
2
...terial-Design-Lite-Extensions.package/MDLPanelSwitcherButton.class/instance/isSelected.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
accessing | ||
isSelected | ||
^ isSelected ifNil: [ isSelected := false ] | ||
^ isSelected |
8 changes: 4 additions & 4 deletions
8
...-Design-Lite-Extensions.package/MDLPanelSwitcherButton.class/instance/renderContentOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rial-Design-Lite-Extensions.package/MDLVerticalToolbar.class/instance/renderContentOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
rendering | ||
renderContentOn: html | ||
html div | ||
class: #'vertical-toolbar'; | ||
class: 'vertical-toolbar'; | ||
with: [ | ||
self buttons | ||
do: [ :button | | ||
html div | ||
class: #'vertical-toolbar__button'; | ||
class: 'vertical-toolbar__button'; | ||
with: [ html render: button ] ] ] |
3 changes: 0 additions & 3 deletions
3
...-Design-Lite-Extensions.package/MDLVerticalToolbar.class/instance/resetButtonSelection.st
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...Design-Lite-Extensions.package/MDLVerticalToolbar.class/instance/resetButtonsSelection.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
action | ||
resetButtonsSelection | ||
self buttons do: [ :each | each isSelected: false ] |