From 2a387a153fc0409475b89dcfa9ce97c9f193130c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 14:47:36 +0200 Subject: [PATCH 01/11] Adding some dull tests --- src/Spec2-Core/SpApplication.class.st | 16 ++++--- src/Spec2-Core/SpNotificationCenter.class.st | 42 +++++++++++++++++++ src/Spec2-Core/SpNotificationItem.class.st | 27 ++++++++++++ src/Spec2-Core/SpPresenter.class.st | 6 +++ .../SpNotificationCenterTest.class.st | 15 +++++++ src/Spec2-Tests/SpNotificationTest.class.st | 17 ++++++++ 6 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 src/Spec2-Core/SpNotificationCenter.class.st create mode 100644 src/Spec2-Core/SpNotificationItem.class.st create mode 100644 src/Spec2-Tests/SpNotificationCenterTest.class.st create mode 100644 src/Spec2-Tests/SpNotificationTest.class.st diff --git a/src/Spec2-Core/SpApplication.class.st b/src/Spec2-Core/SpApplication.class.st index 08bdd9749..b36428631 100644 --- a/src/Spec2-Core/SpApplication.class.st +++ b/src/Spec2-Core/SpApplication.class.st @@ -50,7 +50,8 @@ Class { 'properties', 'configuration', 'iconManager', - 'iconProvider' + 'iconProvider', + 'notificationCenter' ], #classVars : [ 'DefaultApplication' @@ -273,11 +274,16 @@ SpApplication >> newPresenter: aPresenterClass [ ^ aPresenterClass newApplication: self ] -{ #category : #'ui - notifying' } -SpApplication >> notify: aSpecNotification [ - "how notifications are handled depends on the backend" +{ #category : #'ui - dialogs' } +SpApplication >> notificationClass [ + + ^ SpNotificationItem +] - aSpecNotification dispatchTo: self backend +{ #category : #'ui - dialogs' } +SpApplication >> notify: aString [ + self halt. + notificationCenter add: (self notificationClass with: aString) ] { #category : #'accessing - properties' } diff --git a/src/Spec2-Core/SpNotificationCenter.class.st b/src/Spec2-Core/SpNotificationCenter.class.st new file mode 100644 index 000000000..be3cf6950 --- /dev/null +++ b/src/Spec2-Core/SpNotificationCenter.class.st @@ -0,0 +1,42 @@ +" +I'm a simple object holding a limited list of notification items. +" +Class { + #name : #SpNotificationCenter, + #superclass : #Object, + #instVars : [ + 'items', + 'limit' + ], + #category : #'Spec2-Core-Notification' +} + +{ #category : #adding } +SpNotificationCenter >> add: aSpNotificationItem [ + items size > limit + ifTrue: [ items removeLast: self bulkSize ]. + items addFirst: aSpNotificationItem +] + +{ #category : #adding } +SpNotificationCenter >> bulkSize [ + "Returns the number of itesm that should be removed when the limit is reached. + Pay attention that the limit MUST always be larger than bulkSize" + + ^ 5 +] + +{ #category : #initialization } +SpNotificationCenter >> initialize [ + + super initialize. + "Pay attention limit must not smaller than bulkSize because else + we will try to remove more elements than the number we have." + limit := 30. + items := OrderedCollection new. +] + +{ #category : #accessing } +SpNotificationCenter >> items [ + ^ items +] diff --git a/src/Spec2-Core/SpNotificationItem.class.st b/src/Spec2-Core/SpNotificationItem.class.st new file mode 100644 index 000000000..3c369893d --- /dev/null +++ b/src/Spec2-Core/SpNotificationItem.class.st @@ -0,0 +1,27 @@ +" +I'm a simple object representing a notification. +" +Class { + #name : #SpNotificationItem, + #superclass : #Object, + #instVars : [ + 'text' + ], + #category : #'Spec2-Core-Notification' +} + +{ #category : #'instance creation' } +SpNotificationItem class >> with: aString [ + + ^ self new text: aString ; yourself +] + +{ #category : #accessing } +SpNotificationItem >> text [ + ^ text +] + +{ #category : #accessing } +SpNotificationItem >> text: aString [ + text := aString +] diff --git a/src/Spec2-Core/SpPresenter.class.st b/src/Spec2-Core/SpPresenter.class.st index 10710754e..b38d595eb 100644 --- a/src/Spec2-Core/SpPresenter.class.st +++ b/src/Spec2-Core/SpPresenter.class.st @@ -729,6 +729,12 @@ SpPresenter >> localeChanged [ ] +{ #category : #'simple dialog helpers' } +SpPresenter >> notify: aString [ + self halt. + self application notify: aString +] + { #category : #private } SpPresenter >> okToChange [ diff --git a/src/Spec2-Tests/SpNotificationCenterTest.class.st b/src/Spec2-Tests/SpNotificationCenterTest.class.st new file mode 100644 index 000000000..c00cf045f --- /dev/null +++ b/src/Spec2-Tests/SpNotificationCenterTest.class.st @@ -0,0 +1,15 @@ +Class { + #name : #SpNotificationCenterTest, + #superclass : #TestCase, + #category : #'Spec2-Tests-Notifications' +} + +{ #category : #tests } +SpNotificationCenterTest >> testAddAnItemAddsIt [ + + | f center | + f := SpNotificationItem with: 'first'. + center := SpNotificationCenter new. + center add: f. + self assert: center items first text equals: 'first' +] diff --git a/src/Spec2-Tests/SpNotificationTest.class.st b/src/Spec2-Tests/SpNotificationTest.class.st new file mode 100644 index 000000000..e71eec6b9 --- /dev/null +++ b/src/Spec2-Tests/SpNotificationTest.class.st @@ -0,0 +1,17 @@ +Class { + #name : #SpNotificationTest, + #superclass : #TestCase, + #category : #'Spec2-Tests-Notifications' +} + +{ #category : #tests } +SpNotificationTest >> testNotificationIsKeptAround [ + + | pres app | + app := SpApplication new. + pres := SpPresenter newApplication: app. + pres notify: 'You should see this notification'. + self + assert: app notificationCenter items first text + equals: 'You should see this notification' +] From 6aa07bf5b0f08a736018c819576f21467e9b8399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 14:52:18 +0200 Subject: [PATCH 02/11] lifo --- src/Spec2-Tests/SpNotificationCenterTest.class.st | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Spec2-Tests/SpNotificationCenterTest.class.st b/src/Spec2-Tests/SpNotificationCenterTest.class.st index c00cf045f..7ff70dd14 100644 --- a/src/Spec2-Tests/SpNotificationCenterTest.class.st +++ b/src/Spec2-Tests/SpNotificationCenterTest.class.st @@ -13,3 +13,15 @@ SpNotificationCenterTest >> testAddAnItemAddsIt [ center add: f. self assert: center items first text equals: 'first' ] + +{ #category : #tests } +SpNotificationCenterTest >> testItemsAreOrderedLIFO [ + + | f center f2 | + f := SpNotificationItem with: 'first'. + center := SpNotificationCenter new. + center add: f. + f2 := SpNotificationItem with: 'second'. + center add: f2. + self assert: center items first text equals: 'second' +] From ec823c16742679c19f2f1078f825d3d0e3c0dc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 14:56:40 +0200 Subject: [PATCH 03/11] adding cutoff tests --- src/Spec2-Core/SpNotificationCenter.class.st | 5 ++++ .../SpNotificationCenterTest.class.st | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/Spec2-Core/SpNotificationCenter.class.st b/src/Spec2-Core/SpNotificationCenter.class.st index be3cf6950..82a84ace7 100644 --- a/src/Spec2-Core/SpNotificationCenter.class.st +++ b/src/Spec2-Core/SpNotificationCenter.class.st @@ -40,3 +40,8 @@ SpNotificationCenter >> initialize [ SpNotificationCenter >> items [ ^ items ] + +{ #category : #accessing } +SpNotificationCenter >> limit [ + ^ limit +] diff --git a/src/Spec2-Tests/SpNotificationCenterTest.class.st b/src/Spec2-Tests/SpNotificationCenterTest.class.st index 7ff70dd14..8e8405b79 100644 --- a/src/Spec2-Tests/SpNotificationCenterTest.class.st +++ b/src/Spec2-Tests/SpNotificationCenterTest.class.st @@ -14,6 +14,31 @@ SpNotificationCenterTest >> testAddAnItemAddsIt [ self assert: center items first text equals: 'first' ] +{ #category : #tests } +SpNotificationCenterTest >> testAddingOverTheLimitCutFirst [ + + | f center | + center := SpNotificationCenter new. + 1 to: 35 do: [ :each | + f := SpNotificationItem with: each printString. + center add: f ] . + + self assert: center items size equals: center limit +] + +{ #category : #tests } +SpNotificationCenterTest >> testAddingOverTheLimitRemoveBuldElements [ + + | f center | + center := SpNotificationCenter new. + 1 to: 32 do: [ :each | + f := SpNotificationItem with: each printString. + center add: f ] . + + "when we added 31 we removed buld elements (5) and added 31 and 32 so we have 27 elements" + self assert: center items size equals: center limit - center bulkSize + (32 - center limit) +] + { #category : #tests } SpNotificationCenterTest >> testItemsAreOrderedLIFO [ From 5a377cb38a38497ce2f02362ab364b760f58a863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 16:50:06 +0200 Subject: [PATCH 04/11] Continued to see how far I can get. --- src/Spec2-Core/SpApplication.class.st | 8 ++- src/Spec2-Core/SpNotificationCenter.class.st | 25 +++++++- .../SpNotificationCenterPresenter.class.st | 64 +++++++++++++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st diff --git a/src/Spec2-Core/SpApplication.class.st b/src/Spec2-Core/SpApplication.class.st index b36428631..12b3031e3 100644 --- a/src/Spec2-Core/SpApplication.class.st +++ b/src/Spec2-Core/SpApplication.class.st @@ -274,6 +274,12 @@ SpApplication >> newPresenter: aPresenterClass [ ^ aPresenterClass newApplication: self ] +{ #category : #accessing } +SpApplication >> notificationCenter [ + "should be placed in initialize." + ^ notificationCenter ifNil: [ notificationCenter := SpNotificationCenter new forApplication: self; yourself ] +] + { #category : #'ui - dialogs' } SpApplication >> notificationClass [ @@ -282,7 +288,7 @@ SpApplication >> notificationClass [ { #category : #'ui - dialogs' } SpApplication >> notify: aString [ - self halt. + notificationCenter add: (self notificationClass with: aString) ] diff --git a/src/Spec2-Core/SpNotificationCenter.class.st b/src/Spec2-Core/SpNotificationCenter.class.st index 82a84ace7..fe9f4b1f7 100644 --- a/src/Spec2-Core/SpNotificationCenter.class.st +++ b/src/Spec2-Core/SpNotificationCenter.class.st @@ -6,7 +6,8 @@ Class { #superclass : #Object, #instVars : [ 'items', - 'limit' + 'limit', + 'application' ], #category : #'Spec2-Core-Notification' } @@ -15,7 +16,13 @@ Class { SpNotificationCenter >> add: aSpNotificationItem [ items size > limit ifTrue: [ items removeLast: self bulkSize ]. - items addFirst: aSpNotificationItem + items addFirst: aSpNotificationItem. + self updateIfNecessary. +] + +{ #category : #accessing } +SpNotificationCenter >> application [ + ^ application ] { #category : #adding } @@ -26,6 +33,12 @@ SpNotificationCenter >> bulkSize [ ^ 5 ] +{ #category : #adding } +SpNotificationCenter >> forApplication: app [ + + application := app +] + { #category : #initialization } SpNotificationCenter >> initialize [ @@ -45,3 +58,11 @@ SpNotificationCenter >> items [ SpNotificationCenter >> limit [ ^ limit ] + +{ #category : #adding } +SpNotificationCenter >> updateIfNecessary [ + + | notifs | + notifs := self application windows select: [ :each | each title = 'Notifications' ]. + notifs do: [ :each | each updatePresenter ] +] diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st new file mode 100644 index 000000000..55afc9779 --- /dev/null +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -0,0 +1,64 @@ +Class { + #name : #SpNotificationCenterPresenter, + #superclass : #SpPresenterWithModel, + #instVars : [ + 'itemList', + 'descriptionText' + ], + #category : #'Spec2-Dialogs' +} + +{ #category : #examples } +SpNotificationCenterPresenter class >> example2 [ + + + | app notificationPresenter | + app := SpApplication new. + notificationPresenter := SpNotificationCenterPresenter + newApplication: app model: app notificationCenter. + notificationPresenter open. + ^ app inspect + + "1 to: 10 do: [ :each | app notify: each printString ]" +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> connectPresenters [ + + itemList whenSelectedItemChangedDo: [ :each | descriptionText text: each text]. + +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> defaultLayout [ + + ^ SpBoxLayout newTopToBottom + add: itemList; + add: descriptionText; + yourself +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> initializePresenters [ + + itemList := self newList. + descriptionText := self newText +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> initializeWindow: aWindowPresenter [ + + aWindowPresenter title: 'Notifications' +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> modelChanged [ + + itemList items: announcingObject items +] + +{ #category : #initialization } +SpNotificationCenterPresenter >> updatePresenter [ + + itemList items: announcingObject value items +] From 76aaafbbcbdf8aa31a6503f3f3d19a63391579a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 17:09:03 +0200 Subject: [PATCH 05/11] No idea why I get a bug but I have to work on the lecture now. --- .../SpNotificationCenterPresenter.class.st | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index 55afc9779..f23304a2c 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -14,8 +14,7 @@ SpNotificationCenterPresenter class >> example2 [ | app notificationPresenter | app := SpApplication new. - notificationPresenter := SpNotificationCenterPresenter - newApplication: app model: app notificationCenter. + notificationPresenter := self newApplication: app model: app notificationCenter. notificationPresenter open. ^ app inspect @@ -25,7 +24,10 @@ SpNotificationCenterPresenter class >> example2 [ { #category : #initialization } SpNotificationCenterPresenter >> connectPresenters [ - itemList whenSelectedItemChangedDo: [ :each | descriptionText text: each text]. + "Why this is not working + itemList whenSelectedItemChangedDo: [ :each | descriptionText text: each text]." + + itemList whenSelectedItemChangedDo: [ :each | each ifNotNil: [descriptionText text: each text]] ] @@ -42,7 +44,7 @@ SpNotificationCenterPresenter >> defaultLayout [ SpNotificationCenterPresenter >> initializePresenters [ itemList := self newList. - descriptionText := self newText + itemList display: [ :each | each text contractTo: 20 ] ] { #category : #initialization } @@ -54,7 +56,7 @@ SpNotificationCenterPresenter >> initializeWindow: aWindowPresenter [ { #category : #initialization } SpNotificationCenterPresenter >> modelChanged [ - itemList items: announcingObject items + itemList items: announcingObject value items ] { #category : #initialization } From 399b814c0cfb5f395dd2ca84d8f76686da76771f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sat, 9 Sep 2023 17:26:39 +0200 Subject: [PATCH 06/11] --- src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index f23304a2c..1443c3ea7 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -27,7 +27,7 @@ SpNotificationCenterPresenter >> connectPresenters [ "Why this is not working itemList whenSelectedItemChangedDo: [ :each | descriptionText text: each text]." - itemList whenSelectedItemChangedDo: [ :each | each ifNotNil: [descriptionText text: each text]] + itemList whenSelectedDo: [ :each | each ifNotNil: [descriptionText text: each text]] ] From 3e468de2878238711b6d53febe4139cfaa2a6957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Tue, 12 Sep 2023 11:46:59 +0200 Subject: [PATCH 07/11] Fixing some lost method. --- src/Spec2-Core/SpApplication.class.st | 2 +- src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Spec2-Core/SpApplication.class.st b/src/Spec2-Core/SpApplication.class.st index 12b3031e3..af7238349 100644 --- a/src/Spec2-Core/SpApplication.class.st +++ b/src/Spec2-Core/SpApplication.class.st @@ -289,7 +289,7 @@ SpApplication >> notificationClass [ { #category : #'ui - dialogs' } SpApplication >> notify: aString [ - notificationCenter add: (self notificationClass with: aString) + self notificationCenter add: (self notificationClass with: aString) ] { #category : #'accessing - properties' } diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index 1443c3ea7..f371f092d 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -14,8 +14,7 @@ SpNotificationCenterPresenter class >> example2 [ | app notificationPresenter | app := SpApplication new. - notificationPresenter := self newApplication: app model: app notificationCenter. - notificationPresenter open. + notificationPresenter := self newApplication: app model: app notificationCenter. notificationPresenter open. ^ app inspect "1 to: 10 do: [ :each | app notify: each printString ]" @@ -44,7 +43,8 @@ SpNotificationCenterPresenter >> defaultLayout [ SpNotificationCenterPresenter >> initializePresenters [ itemList := self newList. - itemList display: [ :each | each text contractTo: 20 ] + itemList display: [ :each | each text contractTo: 20 ]. + descriptionText := self newText ] { #category : #initialization } From 89957083fafe8c2739da434017ebd7876e06c8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Tue, 12 Sep 2023 11:56:10 +0200 Subject: [PATCH 08/11] Fixing the notification --- src/Spec2-Core/SpNotificationCenter.class.st | 4 ++-- src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Spec2-Core/SpNotificationCenter.class.st b/src/Spec2-Core/SpNotificationCenter.class.st index fe9f4b1f7..666432b39 100644 --- a/src/Spec2-Core/SpNotificationCenter.class.st +++ b/src/Spec2-Core/SpNotificationCenter.class.st @@ -63,6 +63,6 @@ SpNotificationCenter >> limit [ SpNotificationCenter >> updateIfNecessary [ | notifs | - notifs := self application windows select: [ :each | each title = 'Notifications' ]. - notifs do: [ :each | each updatePresenter ] + notifs := self application windows select: [ :each | each presenter class = SpNotificationCenterPresenter ]. + notifs do: [ :each | each presenter updatePresenter ] ] diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index f371f092d..14cea3703 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -61,6 +61,6 @@ SpNotificationCenterPresenter >> modelChanged [ { #category : #initialization } SpNotificationCenterPresenter >> updatePresenter [ - + itemList items: announcingObject value items ] From 862ec2faa30f259dfc4c3474286d4a75b938a995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Tue, 12 Sep 2023 12:25:42 +0200 Subject: [PATCH 09/11] Better button --- .../SpNotificationCenterPresenter.class.st | 55 +++++++++++++------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index 14cea3703..bcd9362f2 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -3,23 +3,31 @@ Class { #superclass : #SpPresenterWithModel, #instVars : [ 'itemList', - 'descriptionText' + 'descriptionText', + 'clearButton' ], #category : #'Spec2-Dialogs' } { #category : #examples } SpNotificationCenterPresenter class >> example2 [ + - | app notificationPresenter | - app := SpApplication new. - notificationPresenter := self newApplication: app model: app notificationCenter. notificationPresenter open. + app := SpApplication new. + notificationPresenter := self newApplication: app model: app notificationCenter. + notificationPresenter open. ^ app inspect - "1 to: 10 do: [ :each | app notify: each printString ]" ] +{ #category : #initialization } +SpNotificationCenterPresenter >> clearNotificationsAction [ + + itemList items: OrderedCollection new. + descriptionText text: ' No notification ' +] + { #category : #initialization } SpNotificationCenterPresenter >> connectPresenters [ @@ -30,21 +38,35 @@ SpNotificationCenterPresenter >> connectPresenters [ ] -{ #category : #initialization } +{ #category : #layout } SpNotificationCenterPresenter >> defaultLayout [ - - ^ SpBoxLayout newTopToBottom + + | upperLayout lowerLayout | + upperLayout := SpBoxLayout newLeftToRight + addLast: clearButton; + yourself. + lowerLayout := SpPanedLayout newTopToBottom + positionOfSlider: 0.8; add: itemList; add: descriptionText; - yourself + yourself. + ^ SpBoxLayout newTopToBottom + add: upperLayout expand: false; + add: lowerLayout; + yourself ] { #category : #initialization } SpNotificationCenterPresenter >> initializePresenters [ - itemList := self newList. - itemList display: [ :each | each text contractTo: 20 ]. - descriptionText := self newText + itemList := self newList + display: [ :each | ' ' , each text contractTo: 20 ]; + yourself. + descriptionText := self newText. + clearButton := self newButton + icon: (self iconNamed: #smallUpdate); + action: [ self clearNotificationsAction ]; + yourself ] { #category : #initialization } @@ -55,12 +77,13 @@ SpNotificationCenterPresenter >> initializeWindow: aWindowPresenter [ { #category : #initialization } SpNotificationCenterPresenter >> modelChanged [ - - itemList items: announcingObject value items + + itemList items: announcingObject value items. + itemList selectFirst ] -{ #category : #initialization } +{ #category : #updating } SpNotificationCenterPresenter >> updatePresenter [ - itemList items: announcingObject value items + self modelChanged ] From ef944e6db8bb206f2e9bae15589d4a5d5d205b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Tue, 12 Sep 2023 19:27:37 +0200 Subject: [PATCH 10/11] Adding a label --- src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st index bcd9362f2..b0b9d5f50 100644 --- a/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st +++ b/src/Spec2-Dialogs/SpNotificationCenterPresenter.class.st @@ -65,6 +65,7 @@ SpNotificationCenterPresenter >> initializePresenters [ descriptionText := self newText. clearButton := self newButton icon: (self iconNamed: #smallUpdate); + label: 'Clear notifications'; action: [ self clearNotificationsAction ]; yourself ] From d9a33ebe621c4d265fe77626d451579e12fd2b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Tue, 19 Sep 2023 14:00:40 +0200 Subject: [PATCH 11/11] Fixing the tests --- src/Spec2-Tests/ManifestSpec2Tests.class.st | 10 +- .../SpAbstractButtonPresenterTest.class.st | 16 ++- .../SpAbstractListPresenterTest.class.st | 46 +++---- .../SpAbstractSelectionModeTest.class.st | 18 +-- .../SpAbstractTextPresenterTest.class.st | 34 ++--- .../SpAbstractTreePresenterTest.class.st | 36 +++--- .../SpAbstractWidgetLayoutTest.class.st | 16 ++- ...idgetPresenterDeferringActionTest.class.st | 12 +- src/Spec2-Tests/SpApplicationTest.class.st | 26 ++-- .../SpApplicationWithToolbarTest.class.st | 10 +- src/Spec2-Tests/SpBaseTest.class.st | 50 +++---- src/Spec2-Tests/SpBoxLayoutTest.class.st | 26 ++-- .../SpButtonPresenterTest.class.st | 28 ++-- .../SpCheckBoxExampleTest.class.st | 10 +- .../SpCheckboxPresenterTest.class.st | 38 +++--- .../SpClassMethodBrowserTest.class.st | 10 +- .../SpCodeCommandContextMock.class.st | 12 +- src/Spec2-Tests/SpCodeCommandTest.class.st | 20 +-- .../SpComponentListPresenterTest.class.st | 44 ++++--- ...erWithAdditionalSubpresentersTest.class.st | 12 +- ...pComposablePresenterWithModelTest.class.st | 28 ++-- src/Spec2-Tests/SpDemoTest.class.st | 12 +- .../SpDropListPresenterTest.class.st | 22 ++-- .../SpDynamicWidgetChangeTest.class.st | 10 +- .../SpEditableListPresenterTest.class.st | 22 ++-- src/Spec2-Tests/SpEmptyPresenter.class.st | 10 +- src/Spec2-Tests/SpEventHandlerTest.class.st | 16 ++- src/Spec2-Tests/SpGridLayout.extension.st | 4 +- .../SpGridLayoutBuilderTest.class.st | 16 ++- src/Spec2-Tests/SpGridLayoutTest.class.st | 10 +- .../SpHorizontalBoxLayoutTest.class.st | 18 +-- .../SpHorizontalPanedLayoutTest.class.st | 10 +- src/Spec2-Tests/SpImagePresenterTest.class.st | 18 +-- src/Spec2-Tests/SpLabelPresenterTest.class.st | 16 ++- src/Spec2-Tests/SpLayoutTest.class.st | 16 ++- ...istPresenterMultipleSelectionTest.class.st | 120 ++++++++--------- ...pListPresenterSingleSelectionTest.class.st | 84 ++++++------ src/Spec2-Tests/SpListPresenterTest.class.st | 20 +-- .../SpListSelectionPresenterTest.class.st | 10 +- .../SpMenuBarPresenterTest.class.st | 8 +- .../SpMenuButtonPresenterTest.class.st | 12 +- .../SpMenuItemPresenterTest.class.st | 14 +- src/Spec2-Tests/SpMenuPresenterTest.class.st | 12 +- .../SpMillerColumnPresenterTest.class.st | 30 +++-- src/Spec2-Tests/SpMockApplication.class.st | 10 +- src/Spec2-Tests/SpMockBackend.class.st | 14 +- src/Spec2-Tests/SpMockConfiguration.class.st | 8 +- .../SpMockMillerPresenter.class.st | 12 +- .../SpMockPesenterWithoutGetter.class.st | 12 +- .../SpMultipleSelectionModeTest.class.st | 16 ++- .../SpNotebookPresenterTest.class.st | 36 +++--- .../SpNotificationCenterTest.class.st | 24 ++-- src/Spec2-Tests/SpNotificationTest.class.st | 10 +- .../SpNumberInputFieldPresenterTest.class.st | 22 ++-- .../SpOpenOnIntExampleTest.class.st | 10 +- .../SpOpenOnNilExampleTest.class.st | 10 +- .../SpOpenOnStringExampleTest.class.st | 10 +- .../SpOptionListPresenterTest.class.st | 36 +++--- .../SpOptionPresenterTest.class.st | 14 +- src/Spec2-Tests/SpOverlayLayoutTest.class.st | 20 +-- src/Spec2-Tests/SpPanedLayoutTest.class.st | 38 +++--- .../SpPopoverPresenterTest.class.st | 18 +-- src/Spec2-Tests/SpPresenterTest.class.st | 24 ++-- .../SpRadioButtonExampleTest.class.st | 10 +- .../SpRadioButtonPresenterTest.class.st | 10 +- .../SpRequiredFieldValidationTest.class.st | 16 ++- .../SpSingleSelectionModeTest.class.st | 20 +-- .../SpSliderInputPresenterTest.class.st | 10 +- .../SpSliderPresenterTest.class.st | 20 +-- src/Spec2-Tests/SpSmokeTest.class.st | 16 ++- src/Spec2-Tests/SpSpecTest.class.st | 10 +- .../SpStringTableColumnTest.class.st | 10 +- src/Spec2-Tests/SpTablePresenterTest.class.st | 30 +++-- .../SpTestApplicationWithLocale.class.st | 14 +- .../SpTestLocalizedString.class.st | 24 ++-- .../SpTestPresenterWithToolbar.class.st | 14 +- src/Spec2-Tests/SpTestingPointModel.class.st | 20 +-- src/Spec2-Tests/SpTestingPresenter.class.st | 18 +-- ...PresenterWithAdditionalPresenters.class.st | 14 +- .../SpTestingPresenterWithModel.class.st | 26 ++-- .../SpTextFieldExampleTest.class.st | 10 +- .../SpTextInputFieldPresenterTest.class.st | 36 +++--- ...tFieldWithValidationPresenterTest.class.st | 18 +-- src/Spec2-Tests/SpTextPresenterTest.class.st | 24 ++-- .../SpToolbarPresenterTest.class.st | 22 ++-- ...pToolbarToggleButtonPresenterTest.class.st | 26 ++-- src/Spec2-Tests/SpTreePresenterTest.class.st | 10 +- ...blePresenterMultipleSelectionTest.class.st | 122 +++++++++--------- ...TablePresenterSingleSelectionTest.class.st | 76 +++++------ .../SpTreeTablePresenterTest.class.st | 10 +- .../SpValidationReportTest.class.st | 12 +- .../SpVerticalBoxLayoutTest.class.st | 18 +-- .../SpVerticalPanedLayoutTest.class.st | 10 +- .../SpWindowPresenterTest.class.st | 34 ++--- src/Spec2-Tests/SpWindowTest.class.st | 18 +-- src/Spec2-Tests/package.st | 2 +- 96 files changed, 1137 insertions(+), 949 deletions(-) diff --git a/src/Spec2-Tests/ManifestSpec2Tests.class.st b/src/Spec2-Tests/ManifestSpec2Tests.class.st index b16b14d07..e8450227d 100644 --- a/src/Spec2-Tests/ManifestSpec2Tests.class.st +++ b/src/Spec2-Tests/ManifestSpec2Tests.class.st @@ -6,12 +6,14 @@ Spec is a framework in Pharo for describing user interfaces. It allows for the c I contain the tests of Spec2-Core. Those are the tests of Presenters that are independant of the backend used by the user. " Class { - #name : #ManifestSpec2Tests, - #superclass : #PackageManifest, - #category : #'Spec2-Tests-Manifest' + #name : 'ManifestSpec2Tests', + #superclass : 'PackageManifest', + #category : 'Spec2-Tests-Manifest', + #package : 'Spec2-Tests', + #tag : 'Manifest' } -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestSpec2Tests class >> ruleRBSentNotImplementedRuleV1FalsePositive [ ^ #(#(#(#RGClassDefinition #(#SpUIThemeDecoratorTest)) #'2018-10-10T14:57:43.139752+02:00') #(#(#RGMethodDefinition #(#RadioButtonGroupPresenterTest #testRebuildWidget #false)) #'2018-10-10T14:59:58.802602+02:00') ) ] diff --git a/src/Spec2-Tests/SpAbstractButtonPresenterTest.class.st b/src/Spec2-Tests/SpAbstractButtonPresenterTest.class.st index b9d988ee1..91afc0336 100644 --- a/src/Spec2-Tests/SpAbstractButtonPresenterTest.class.st +++ b/src/Spec2-Tests/SpAbstractButtonPresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpAbstractButtonPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpAbstractButtonPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #testing } +{ #category : 'testing' } SpAbstractButtonPresenterTest class >> isAbstract [ ^ super isAbstract or: [ self = SpAbstractButtonPresenterTest ] ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractButtonPresenterTest >> testWhenHelpChanged [ presenter help: 'label1'. presenter @@ -23,7 +25,7 @@ SpAbstractButtonPresenterTest >> testWhenHelpChanged [ self assert: presenter help equals: 'label2' ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractButtonPresenterTest >> testWhenIconChangedDo [ presenter iconName: #glamorousCancel. @@ -41,7 +43,7 @@ SpAbstractButtonPresenterTest >> testWhenIconChangedDo [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractButtonPresenterTest >> testWhenLabelChangedDo [ presenter label: 'label1'. diff --git a/src/Spec2-Tests/SpAbstractListPresenterTest.class.st b/src/Spec2-Tests/SpAbstractListPresenterTest.class.st index 41ba2e548..b4a6f9f93 100644 --- a/src/Spec2-Tests/SpAbstractListPresenterTest.class.st +++ b/src/Spec2-Tests/SpAbstractListPresenterTest.class.st @@ -2,25 +2,27 @@ testing ListComposablePresenter " Class { - #name : #SpAbstractListPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpAbstractListPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #testing } +{ #category : 'testing' } SpAbstractListPresenterTest class >> isAbstract [ ^ self == SpAbstractListPresenterTest ] -{ #category : #running } +{ #category : 'running' } SpAbstractListPresenterTest >> setUp [ super setUp. presenter items: #(10 20 30). ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpAbstractListPresenterTest >> testActivationOnDoubleClickShouldActivateOnDoubleClick [ | activatedItem | @@ -34,7 +36,7 @@ SpAbstractListPresenterTest >> testActivationOnDoubleClickShouldActivateOnDouble self assert: activatedItem equals: 10. ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpAbstractListPresenterTest >> testActivationOnDoubleClickShouldNotActivateOnClick [ | activatedItem | @@ -48,7 +50,7 @@ SpAbstractListPresenterTest >> testActivationOnDoubleClickShouldNotActivateOnCli self assert: activatedItem equals: nil. ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpAbstractListPresenterTest >> testActivationOnSingleClickShouldActivateOnClick [ | activatedItem | @@ -62,7 +64,7 @@ SpAbstractListPresenterTest >> testActivationOnSingleClickShouldActivateOnClick self assert: activatedItem equals: 10. ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpAbstractListPresenterTest >> testActivationOnSingleClickShouldNotActivateOnClickOutside [ | activatedItem | @@ -76,7 +78,7 @@ SpAbstractListPresenterTest >> testActivationOnSingleClickShouldNotActivateOnCli self assert: activatedItem equals: nil ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testActivationWithTransformation [ | activatedItem | @@ -92,7 +94,7 @@ SpAbstractListPresenterTest >> testActivationWithTransformation [ self assert: activatedItem equals: 100 ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpAbstractListPresenterTest >> testActivationWithoutActivationBlockDoesNothing [ | activatedItem | @@ -104,7 +106,7 @@ SpAbstractListPresenterTest >> testActivationWithoutActivationBlockDoesNothing [ self assert: activatedItem equals: nil ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testContextMenu [ | menu changed | @@ -118,7 +120,7 @@ SpAbstractListPresenterTest >> testContextMenu [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testDisableActivationDuring [ | activated | @@ -131,7 +133,7 @@ SpAbstractListPresenterTest >> testDisableActivationDuring [ self assert: presenter selectedItem equals: 20 "but the selection changed!" ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testReplaceItemList [ | changed | @@ -145,7 +147,7 @@ SpAbstractListPresenterTest >> testReplaceItemList [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testSelectAll [ presenter beSingleSelection. @@ -160,7 +162,7 @@ SpAbstractListPresenterTest >> testSelectAll [ equals: #(10 20 30) ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testSelectedItemsSortedByIndex [ presenter beMultipleSelection. @@ -175,7 +177,7 @@ SpAbstractListPresenterTest >> testSelectedItemsSortedByIndex [ equals: #(10 30) ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpAbstractListPresenterTest >> testSetSortingBlockBeforeItems [ | count | count := 0. @@ -186,13 +188,13 @@ SpAbstractListPresenterTest >> testSetSortingBlockBeforeItems [ self assert: (presenter model at: 1) equals: 0 ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpAbstractListPresenterTest >> testSmokeOpenEmptyPresenter [ window := presenter open ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpAbstractListPresenterTest >> testSmokeOpenPresenterWithItems [ window := presenter @@ -200,7 +202,7 @@ SpAbstractListPresenterTest >> testSmokeOpenPresenterWithItems [ open ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpAbstractListPresenterTest >> testSortingBlock [ | count | count := 0. @@ -211,7 +213,7 @@ SpAbstractListPresenterTest >> testSortingBlock [ self assert: (presenter model at: 1) equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testUnselectAll [ presenter beMultipleSelection. @@ -223,7 +225,7 @@ SpAbstractListPresenterTest >> testUnselectAll [ self assertEmpty: presenter selection selectedItems ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractListPresenterTest >> testUpdateItemsKeepingSelection [ presenter items: #($a $b $c). diff --git a/src/Spec2-Tests/SpAbstractSelectionModeTest.class.st b/src/Spec2-Tests/SpAbstractSelectionModeTest.class.st index 01e7cca2c..39bc4b9d2 100644 --- a/src/Spec2-Tests/SpAbstractSelectionModeTest.class.st +++ b/src/Spec2-Tests/SpAbstractSelectionModeTest.class.st @@ -1,37 +1,39 @@ Class { - #name : #SpAbstractSelectionModeTest, - #superclass : #TestCase, + #name : 'SpAbstractSelectionModeTest', + #superclass : 'TestCase', #instVars : [ 'presenter' ], - #category : #'Spec2-Tests-Layout' + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #testing } +{ #category : 'testing' } SpAbstractSelectionModeTest class >> isAbstract [ ^ self = SpAbstractSelectionModeTest ] -{ #category : #testing } +{ #category : 'testing' } SpAbstractSelectionModeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #running } +{ #category : 'running' } SpAbstractSelectionModeTest >> setUp [ super setUp. presenter := SpListPresenter new. presenter items: (1 to: 10) ] -{ #category : #running } +{ #category : 'running' } SpAbstractSelectionModeTest >> tearDown [ presenter delete. super tearDown ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractSelectionModeTest >> testSubscriptionsAreTransfered [ self subclassResponsibility ] diff --git a/src/Spec2-Tests/SpAbstractTextPresenterTest.class.st b/src/Spec2-Tests/SpAbstractTextPresenterTest.class.st index 0a61321ba..431655757 100644 --- a/src/Spec2-Tests/SpAbstractTextPresenterTest.class.st +++ b/src/Spec2-Tests/SpAbstractTextPresenterTest.class.st @@ -1,25 +1,27 @@ Class { - #name : #SpAbstractTextPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpAbstractTextPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #testing } +{ #category : 'testing' } SpAbstractTextPresenterTest class >> isAbstract [ ^ self = SpAbstractTextPresenterTest ] -{ #category : #accessing } +{ #category : 'accessing' } SpAbstractTextPresenterTest >> classToTest [ ^ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } SpAbstractTextPresenterTest >> initializationText [ presenter text: 'Text for tests.' ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testClearContent [ self initializationText. self denyEmpty: presenter text. @@ -27,7 +29,7 @@ SpAbstractTextPresenterTest >> testClearContent [ self assertEmpty: presenter text ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testClearSelection [ self initializationText. self openInstance. @@ -37,7 +39,7 @@ SpAbstractTextPresenterTest >> testClearSelection [ self assert: presenter selectionInterval isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testContextMenu [ | menu changed | @@ -51,7 +53,7 @@ SpAbstractTextPresenterTest >> testContextMenu [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testCursorPositionIndex [ presenter text: (String loremIpsum: 80). @@ -67,7 +69,7 @@ SpAbstractTextPresenterTest >> testCursorPositionIndex [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testPlaceholderIsSet [ presenter placeholder: 'enter something...'. @@ -75,7 +77,7 @@ SpAbstractTextPresenterTest >> testPlaceholderIsSet [ self assert: presenter placeholder equals: 'enter something...' ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testSelectAll [ self initializationText. self openInstance. @@ -83,7 +85,7 @@ SpAbstractTextPresenterTest >> testSelectAll [ self assert: presenter selectionInterval equals: (1 to: 15) ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testWhenResetDo [ | reseted | @@ -102,7 +104,7 @@ SpAbstractTextPresenterTest >> testWhenResetDo [ self assert: reseted ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testWhenSubmitDo [ | submitted | @@ -121,7 +123,7 @@ SpAbstractTextPresenterTest >> testWhenSubmitDo [ self assert: submitted ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTextPresenterTest >> testWhenSubmitDoReceivesAString [ | submitted | @@ -142,7 +144,7 @@ SpAbstractTextPresenterTest >> testWhenSubmitDoReceivesAString [ self assert: submitted equals: 'abc' ] -{ #category : #private } +{ #category : 'private' } SpAbstractTextPresenterTest >> textInputAdapter [ ^ presenter adapter diff --git a/src/Spec2-Tests/SpAbstractTreePresenterTest.class.st b/src/Spec2-Tests/SpAbstractTreePresenterTest.class.st index 89fe5b39f..d21b9dade 100644 --- a/src/Spec2-Tests/SpAbstractTreePresenterTest.class.st +++ b/src/Spec2-Tests/SpAbstractTreePresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpAbstractTreePresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpAbstractTreePresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #testing } +{ #category : 'testing' } SpAbstractTreePresenterTest class >> isAbstract [ ^ super isAbstract or: [ self = SpAbstractTreePresenterTest ] ] -{ #category : #running } +{ #category : 'running' } SpAbstractTreePresenterTest >> setUp [ super setUp. @@ -23,7 +25,7 @@ SpAbstractTreePresenterTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testActivationOnDoubleClickShouldActivateOnDoubleClick [ | activatedItem | presenter @@ -35,7 +37,7 @@ SpAbstractTreePresenterTest >> testActivationOnDoubleClickShouldActivateOnDouble self assert: activatedItem equals: 110 ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testActivationOnDoubleClickShouldNotActivateOnClick [ | activatedItem | presenter @@ -47,7 +49,7 @@ SpAbstractTreePresenterTest >> testActivationOnDoubleClickShouldNotActivateOnCli self assert: activatedItem isNil ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testActivationOnSingleClickShouldActivateOnClick [ | activatedItem | presenter @@ -59,7 +61,7 @@ SpAbstractTreePresenterTest >> testActivationOnSingleClickShouldActivateOnClick self assert: activatedItem equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testActivationOnSingleClickShouldNotActivateOnClickOutside [ | activatedItem | presenter @@ -71,7 +73,7 @@ SpAbstractTreePresenterTest >> testActivationOnSingleClickShouldNotActivateOnCli self assert: activatedItem isNil ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testContextMenu [ | menu changed | self assert: presenter contextMenu isNil. @@ -84,7 +86,7 @@ SpAbstractTreePresenterTest >> testContextMenu [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testDisableActivationDuring [ | activated | @@ -97,7 +99,7 @@ SpAbstractTreePresenterTest >> testDisableActivationDuring [ self assert: presenter selectedItem equals: 2 "but the selection changed!" ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testExpandAtPathExpandsTheNode [ self openInstance. @@ -114,7 +116,7 @@ SpAbstractTreePresenterTest >> testExpandAtPathExpandsTheNode [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testPathIndexOf [ presenter @@ -128,7 +130,7 @@ SpAbstractTreePresenterTest >> testPathIndexOf [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testPathItemOf [ presenter @@ -142,7 +144,7 @@ SpAbstractTreePresenterTest >> testPathItemOf [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testUnselectAll [ presenter beMultipleSelection. @@ -156,7 +158,7 @@ SpAbstractTreePresenterTest >> testUnselectAll [ ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testUpdateRootsKeepingSelection [ presenter roots: #($a $b $c). @@ -165,7 +167,7 @@ SpAbstractTreePresenterTest >> testUpdateRootsKeepingSelection [ self assert: presenter selectedItem equals: $c ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractTreePresenterTest >> testWhenSelectedItemChangedDo [ | selectedItem | diff --git a/src/Spec2-Tests/SpAbstractWidgetLayoutTest.class.st b/src/Spec2-Tests/SpAbstractWidgetLayoutTest.class.st index feb72c6af..0d3f9f6c3 100644 --- a/src/Spec2-Tests/SpAbstractWidgetLayoutTest.class.st +++ b/src/Spec2-Tests/SpAbstractWidgetLayoutTest.class.st @@ -2,33 +2,35 @@ A SpecAbstractWidgetLayoutTest is a test class for testing the behavior of SpecAbstractWidgetLayout " Class { - #name : #SpAbstractWidgetLayoutTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Layout' + #name : 'SpAbstractWidgetLayoutTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetLayoutTest >> testAdapterForBindings [ | layout | layout := SpAbstractWidgetLayout for: #ListAdapter. self assert: (layout adapterFor: SpListPresenter new bindings: SpStubAdapterBindings new) class equals: SpStubListAdapter ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetLayoutTest >> testAdapterForBindingsRaiseErrorIfNoBinding [ | layout | layout := SpAbstractWidgetLayout for: #NonExistingAdapter. self should: [ layout adapterFor: SpListPresenter new bindings: SpStubAdapterBindings new ] raise: Error ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetLayoutTest >> testBuildAdapterForBindings [ | layout | layout := SpAbstractWidgetLayout for: #ListAdapter. self assert: (layout buildAdapterFor: SpListPresenter new bindings: SpStubAdapterBindings new) widget class equals: SpStubListView ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetLayoutTest >> testDynamicBuild [ "Cyril: This is currently a duplicated of a test in SpecInterpreter, but this test is useful for more that the SpecInterpreter and since we plan to remove the interpreter I want to ensure we do not lose this test. This comment can be removed once the SpecInterpreter will be removed." diff --git a/src/Spec2-Tests/SpAbstractWidgetPresenterDeferringActionTest.class.st b/src/Spec2-Tests/SpAbstractWidgetPresenterDeferringActionTest.class.st index fc6206920..f31945e62 100644 --- a/src/Spec2-Tests/SpAbstractWidgetPresenterDeferringActionTest.class.st +++ b/src/Spec2-Tests/SpAbstractWidgetPresenterDeferringActionTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpAbstractWidgetPresenterDeferringActionTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Core' + #name : 'SpAbstractWidgetPresenterDeferringActionTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Core', + #package : 'Spec2-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetPresenterDeferringActionTest >> testWithAdapterPerformOrDeferDoesNotExecuteWhenNoAdapter [ | presenter executed | @@ -15,7 +17,7 @@ SpAbstractWidgetPresenterDeferringActionTest >> testWithAdapterPerformOrDeferDoe self deny: executed ] -{ #category : #tests } +{ #category : 'tests' } SpAbstractWidgetPresenterDeferringActionTest >> testWithAdapterPerformOrDeferExecutesWhenAdapter [ | presenter executed | diff --git a/src/Spec2-Tests/SpApplicationTest.class.st b/src/Spec2-Tests/SpApplicationTest.class.st index 86dc92860..8d487901b 100644 --- a/src/Spec2-Tests/SpApplicationTest.class.st +++ b/src/Spec2-Tests/SpApplicationTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #SpApplicationTest, - #superclass : #TestCase, + #name : 'SpApplicationTest', + #superclass : 'TestCase', #instVars : [ 'application' ], - #category : #'Spec2-Tests-Core-Base' + #category : 'Spec2-Tests-Core-Base', + #package : 'Spec2-Tests', + #tag : 'Core-Base' } -{ #category : #running } +{ #category : 'running' } SpApplicationTest >> setUp [ super setUp. application := SpMockApplication new ] -{ #category : #running } +{ #category : 'running' } SpApplicationTest >> tearDown [ application closeAllWindows. super tearDown ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testCloseDialogWindowRemovesItFromWindowCollection [ | window | @@ -31,7 +33,7 @@ SpApplicationTest >> testCloseDialogWindowRemovesItFromWindowCollection [ self deny: (application windows includes: window) ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testCloseWindowRemovesItFromWindowCollection [ | window | @@ -41,13 +43,13 @@ SpApplicationTest >> testCloseWindowRemovesItFromWindowCollection [ self deny: (application windows includes: window) ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testIsPresenter [ self deny: application isPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testNewPresenter [ | presenter | @@ -55,7 +57,7 @@ SpApplicationTest >> testNewPresenter [ self assert: presenter application equals: application ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testOpenDialogWindowAddsItToWindowCollection [ | window | @@ -64,7 +66,7 @@ SpApplicationTest >> testOpenDialogWindowAddsItToWindowCollection [ self assert: (application windows includes: window) ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testOpenWindowAddsItToWindowCollection [ | window | @@ -73,7 +75,7 @@ SpApplicationTest >> testOpenWindowAddsItToWindowCollection [ self assert: (application windows includes: window) ] -{ #category : #tests } +{ #category : 'tests' } SpApplicationTest >> testUseBackend [ self assert: application backend name equals: #Mock. diff --git a/src/Spec2-Tests/SpApplicationWithToolbarTest.class.st b/src/Spec2-Tests/SpApplicationWithToolbarTest.class.st index efcaeae71..ad23b9723 100644 --- a/src/Spec2-Tests/SpApplicationWithToolbarTest.class.st +++ b/src/Spec2-Tests/SpApplicationWithToolbarTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpApplicationWithToolbarTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpApplicationWithToolbarTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpApplicationWithToolbarTest >> classToTest [ ^ SpApplicationWithToolbar ] diff --git a/src/Spec2-Tests/SpBaseTest.class.st b/src/Spec2-Tests/SpBaseTest.class.st index c36ddfdbc..339a063f8 100644 --- a/src/Spec2-Tests/SpBaseTest.class.st +++ b/src/Spec2-Tests/SpBaseTest.class.st @@ -1,26 +1,28 @@ Class { - #name : #SpBaseTest, - #superclass : #TestCase, + #name : 'SpBaseTest', + #superclass : 'TestCase', #instVars : [ 'presenter', 'window' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #testing } +{ #category : 'testing' } SpBaseTest class >> isAbstract [ ^ self = SpBaseTest ] -{ #category : #accessing } +{ #category : 'accessing' } SpBaseTest >> adapter [ ^ self subclassResponsibility ] -{ #category : #assertions } +{ #category : 'assertions' } SpBaseTest >> assertEvent: anEventName isRaisedInPresenter: aPresenter whenDoing: aBlock [ self @@ -30,7 +32,7 @@ SpBaseTest >> assertEvent: anEventName isRaisedInPresenter: aPresenter whenDoing whenDoing: aBlock ] -{ #category : #assertions } +{ #category : 'assertions' } SpBaseTest >> assertWith: assertionBlock timesRaisedEvent: anEventName inPresenter: aPresenter whenDoing: actionBlock [ | timesCalled | @@ -40,12 +42,12 @@ SpBaseTest >> assertWith: assertionBlock timesRaisedEvent: anEventName inPresent assertionBlock value: timesCalled ] -{ #category : #accessing } +{ #category : 'accessing' } SpBaseTest >> classToTest [ self subclassResponsibility ] -{ #category : #assertions } +{ #category : 'assertions' } SpBaseTest >> denyEvent: anEventName isRaisedInPresenter: aPresenter whenDoing: aBlock [ self @@ -55,45 +57,45 @@ SpBaseTest >> denyEvent: anEventName isRaisedInPresenter: aPresenter whenDoing: whenDoing: aBlock ] -{ #category : #initialization } +{ #category : 'initialization' } SpBaseTest >> initializeTestedInstance [ ] -{ #category : #utilities } +{ #category : 'utilities' } SpBaseTest >> openInstance [ window ifNil: [ window := presenter open ] ] -{ #category : #accessing } +{ #category : 'accessing' } SpBaseTest >> presenter [ ^ presenter ] -{ #category : #running } +{ #category : 'running' } SpBaseTest >> setUp [ super setUp. presenter := self classToTest new. self initializeTestedInstance ] -{ #category : #running } +{ #category : 'running' } SpBaseTest >> tearDown [ window ifNotNil: [ window delete ]. super tearDown ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testNewPresenterIsNotBuilt [ self deny: presenter isBuilt ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testNewPresenterIsNotDisplayed [ self deny: presenter isDisplayed ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testNonOpenPresenterDoesNotRaiseBuiltEvent [ | built | built := false. @@ -101,7 +103,7 @@ SpBaseTest >> testNonOpenPresenterDoesNotRaiseBuiltEvent [ self deny: built ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testNonOpenPresenterDoesNotRaiseDisplayedEvent [ | displayed | displayed := false. @@ -109,19 +111,19 @@ SpBaseTest >> testNonOpenPresenterDoesNotRaiseDisplayedEvent [ self deny: displayed ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testOpenPresenterIsBuilt [ self openInstance. self assert: presenter isBuilt ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testOpenPresenterIsDisplayed [ self openInstance. self assert: presenter isDisplayed ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testOpenPresenterRaisesBuiltEvent [ | built | built := false. @@ -130,7 +132,7 @@ SpBaseTest >> testOpenPresenterRaisesBuiltEvent [ self assert: built ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testOpenPresenterRaisesDisplayEvent [ | displayed | displayed := false. @@ -139,7 +141,7 @@ SpBaseTest >> testOpenPresenterRaisesDisplayEvent [ self assert: displayed ] -{ #category : #tests } +{ #category : 'tests' } SpBaseTest >> testRebuildPresenterDoNotLetReferencesInAnnouncer [ | oldSize newSize | @@ -152,7 +154,7 @@ SpBaseTest >> testRebuildPresenterDoNotLetReferencesInAnnouncer [ self assert: oldSize equals: newSize ] -{ #category : #accessing } +{ #category : 'accessing' } SpBaseTest >> widget [ ^ self adapter widget diff --git a/src/Spec2-Tests/SpBoxLayoutTest.class.st b/src/Spec2-Tests/SpBoxLayoutTest.class.st index adbd96e94..599a2dca7 100644 --- a/src/Spec2-Tests/SpBoxLayoutTest.class.st +++ b/src/Spec2-Tests/SpBoxLayoutTest.class.st @@ -1,28 +1,30 @@ Class { - #name : #SpBoxLayoutTest, - #superclass : #SpLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpBoxLayoutTest', + #superclass : 'SpLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #testing } +{ #category : 'testing' } SpBoxLayoutTest class >> isAbstract [ ^ self == SpBoxLayoutTest ] -{ #category : #private } +{ #category : 'private' } SpBoxLayoutTest >> extentOf: aPresenter [ ^ aPresenter adapter widget bounds extent ] -{ #category : #private } +{ #category : 'private' } SpBoxLayoutTest >> heightOf: aPresenter [ ^ (self extentOf: aPresenter) y ] -{ #category : #running } +{ #category : 'running' } SpBoxLayoutTest >> testElementsAreAddedInOrder [ | second | @@ -31,14 +33,14 @@ SpBoxLayoutTest >> testElementsAreAddedInOrder [ self assert: layout children last equals: second ] -{ #category : #running } +{ #category : 'running' } SpBoxLayoutTest >> testLayoutWithOneElementIsNotEmpty [ layout add: SpButtonPresenter new. self deny: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpBoxLayoutTest >> testRemoveElementFromLayoutTakesItOut [ | element | @@ -47,7 +49,7 @@ SpBoxLayoutTest >> testRemoveElementFromLayoutTakesItOut [ self assert: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpBoxLayoutTest >> testReplaceAtindexWith [ | p1 toReplace p3 replacement | @@ -65,7 +67,7 @@ SpBoxLayoutTest >> testReplaceAtindexWith [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #running } +{ #category : 'running' } SpBoxLayoutTest >> testReplaceWith [ | p1 toReplace p3 replacement | @@ -83,7 +85,7 @@ SpBoxLayoutTest >> testReplaceWith [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #private } +{ #category : 'private' } SpBoxLayoutTest >> widthOf: aPresenter [ ^ (self extentOf: aPresenter) x diff --git a/src/Spec2-Tests/SpButtonPresenterTest.class.st b/src/Spec2-Tests/SpButtonPresenterTest.class.st index 3e58bcc9c..f5f134280 100644 --- a/src/Spec2-Tests/SpButtonPresenterTest.class.st +++ b/src/Spec2-Tests/SpButtonPresenterTest.class.st @@ -2,24 +2,26 @@ SUnit tests for Button model " Class { - #name : #SpButtonPresenterTest, - #superclass : #SpAbstractButtonPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpButtonPresenterTest', + #superclass : 'SpAbstractButtonPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpButtonPresenterTest >> classToTest [ ^ SpButtonPresenter ] -{ #category : #accessing } +{ #category : 'accessing' } SpButtonPresenterTest >> morph [ ^ presenter adapter widget ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testAction [ | actionExecuted | @@ -34,7 +36,7 @@ SpButtonPresenterTest >> testAction [ self assert: actionExecuted equals: true ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testAskBeforeChanging [ | state | @@ -48,7 +50,7 @@ SpButtonPresenterTest >> testAskBeforeChanging [ self assert: state ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testContextMenu [ | menu changed | @@ -62,7 +64,7 @@ SpButtonPresenterTest >> testContextMenu [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testEnabled [ self assert: presenter isEnabled. self openInstance. @@ -71,7 +73,7 @@ SpButtonPresenterTest >> testEnabled [ self deny: self morph enabled ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testWhenActionChangedDo [ | actionModified newBlock oldBlock | @@ -96,7 +98,7 @@ SpButtonPresenterTest >> testWhenActionChangedDo [ self assert: actionModified equals: true ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testWhenActionPerformedDo [ | actionExecuted actionPerformed | @@ -122,7 +124,7 @@ SpButtonPresenterTest >> testWhenActionPerformedDo [ ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testWhenActionPerformedDoAfterAction [ | actionExecuted actionPerformed | @@ -146,7 +148,7 @@ SpButtonPresenterTest >> testWhenActionPerformedDoAfterAction [ self assert: actionExecuted < actionPerformed. ] -{ #category : #tests } +{ #category : 'tests' } SpButtonPresenterTest >> testWhenStateChangedDo [ presenter whenStateChangedDo: [ :new :old | self deny: old. self assert: new ]. diff --git a/src/Spec2-Tests/SpCheckBoxExampleTest.class.st b/src/Spec2-Tests/SpCheckBoxExampleTest.class.st index 9c7980865..41a192fc8 100644 --- a/src/Spec2-Tests/SpCheckBoxExampleTest.class.st +++ b/src/Spec2-Tests/SpCheckBoxExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpCheckBoxExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpCheckBoxExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpCheckBoxExampleTest >> classToTest [ ^ SpCheckBoxExample ] diff --git a/src/Spec2-Tests/SpCheckboxPresenterTest.class.st b/src/Spec2-Tests/SpCheckboxPresenterTest.class.st index 6bceb5610..9c2759e92 100644 --- a/src/Spec2-Tests/SpCheckboxPresenterTest.class.st +++ b/src/Spec2-Tests/SpCheckboxPresenterTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #SpCheckboxPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpCheckboxPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpCheckboxPresenterTest >> classToTest [ ^ SpCheckBoxPresenter ] -{ #category : #accessing } +{ #category : 'accessing' } SpCheckboxPresenterTest >> morph [ ^ presenter adapter widget ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testActivateDoesNotRaiseDeactivateEvent [ presenter state: false. @@ -27,14 +29,14 @@ SpCheckboxPresenterTest >> testActivateDoesNotRaiseDeactivateEvent [ whenDoing: [ presenter state: true ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testActivatePresenterIsActive [ presenter state: true. self assert: presenter state ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testActivateRaisesActivatedEvent [ presenter state: false. @@ -44,7 +46,7 @@ SpCheckboxPresenterTest >> testActivateRaisesActivatedEvent [ whenDoing: [ presenter state: true ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testActivateRaisesChangedEvent [ presenter state: false. @@ -54,7 +56,7 @@ SpCheckboxPresenterTest >> testActivateRaisesChangedEvent [ whenDoing: [ presenter state: true ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testActivateRaisesChangedEventOnce [ presenter state: false. @@ -65,7 +67,7 @@ SpCheckboxPresenterTest >> testActivateRaisesChangedEventOnce [ whenDoing: [ presenter state: true ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testDeactivateDoesNotRaiseActivateEvent [ presenter state: true. @@ -76,14 +78,14 @@ SpCheckboxPresenterTest >> testDeactivateDoesNotRaiseActivateEvent [ whenDoing: [ presenter state: false ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testDeactivatePresenterIsNotActive [ presenter state: false. self deny: presenter state ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testDeactivateRaisesChangedEvent [ presenter state: true. @@ -93,7 +95,7 @@ SpCheckboxPresenterTest >> testDeactivateRaisesChangedEvent [ whenDoing: [ presenter state: false ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testDeactivateRaisesChangedEventOnce [ presenter state: true. @@ -104,7 +106,7 @@ SpCheckboxPresenterTest >> testDeactivateRaisesChangedEventOnce [ whenDoing: [ presenter state: false ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testDeactivateRaisesDeactivatedEvent [ presenter state: true. @@ -114,14 +116,14 @@ SpCheckboxPresenterTest >> testDeactivateRaisesDeactivatedEvent [ whenDoing: [ presenter state: false ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testLabelIsSet [ presenter label: 'test'. self assert: presenter label equals: 'test' ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testStayingActiveDoesNotRaiseChangedEvent [ presenter state: true. @@ -131,7 +133,7 @@ SpCheckboxPresenterTest >> testStayingActiveDoesNotRaiseChangedEvent [ whenDoing: [ presenter state: true ] ] -{ #category : #tests } +{ #category : 'tests' } SpCheckboxPresenterTest >> testStayingInactiveDoesNotRaiseChangedEvent [ presenter state: false. diff --git a/src/Spec2-Tests/SpClassMethodBrowserTest.class.st b/src/Spec2-Tests/SpClassMethodBrowserTest.class.st index 48a9c3b7e..3e53dfb14 100644 --- a/src/Spec2-Tests/SpClassMethodBrowserTest.class.st +++ b/src/Spec2-Tests/SpClassMethodBrowserTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpClassMethodBrowserTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpClassMethodBrowserTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpClassMethodBrowserTest >> classToTest [ ^ SpClassMethodBrowser ] diff --git a/src/Spec2-Tests/SpCodeCommandContextMock.class.st b/src/Spec2-Tests/SpCodeCommandContextMock.class.st index 58d0f8610..9f1d068ef 100644 --- a/src/Spec2-Tests/SpCodeCommandContextMock.class.st +++ b/src/Spec2-Tests/SpCodeCommandContextMock.class.st @@ -1,19 +1,21 @@ Class { - #name : #SpCodeCommandContextMock, - #superclass : #Object, + #name : 'SpCodeCommandContextMock', + #superclass : 'Object', #instVars : [ 'selection' ], - #category : #'Spec2-Tests-Commands' + #category : 'Spec2-Tests-Commands', + #package : 'Spec2-Tests', + #tag : 'Commands' } -{ #category : #accessing } +{ #category : 'accessing' } SpCodeCommandContextMock >> selection [ ^ selection ] -{ #category : #accessing } +{ #category : 'accessing' } SpCodeCommandContextMock >> selection: anObject [ selection := anObject diff --git a/src/Spec2-Tests/SpCodeCommandTest.class.st b/src/Spec2-Tests/SpCodeCommandTest.class.st index 4ce9bff9b..1e9dc1f2a 100644 --- a/src/Spec2-Tests/SpCodeCommandTest.class.st +++ b/src/Spec2-Tests/SpCodeCommandTest.class.st @@ -1,28 +1,30 @@ Class { - #name : #SpCodeCommandTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Commands' + #name : 'SpCodeCommandTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Commands', + #package : 'Spec2-Tests', + #tag : 'Commands' } -{ #category : #testing } +{ #category : 'testing' } SpCodeCommandTest class >> isAbstract [ ^ self = SpCodeCommandTest ] -{ #category : #testing } +{ #category : 'testing' } SpCodeCommandTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } SpCodeCommandTest >> commandClass [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } SpCodeCommandTest >> commandToTest [ ^ self commandClass new @@ -30,13 +32,13 @@ SpCodeCommandTest >> commandToTest [ yourself ] -{ #category : #private } +{ #category : 'private' } SpCodeCommandTest >> newMockContext [ ^ SpCodeCommandContextMock new ] -{ #category : #tests } +{ #category : 'tests' } SpCodeCommandTest >> testExecute [ self flag: #TODO. "How to intercept messages to prevent execution?" diff --git a/src/Spec2-Tests/SpComponentListPresenterTest.class.st b/src/Spec2-Tests/SpComponentListPresenterTest.class.st index 9d14510f2..4e9ce8499 100644 --- a/src/Spec2-Tests/SpComponentListPresenterTest.class.st +++ b/src/Spec2-Tests/SpComponentListPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpComponentListPresenterTest, - #superclass : #SpAbstractListPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpComponentListPresenterTest', + #superclass : 'SpAbstractListPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpComponentListPresenterTest >> classToTest [ ^ SpComponentListPresenter ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpComponentListPresenterTest >> testActivationOnDoubleClickShouldActivateOnDoubleClick [ | activatedItem | @@ -23,7 +25,7 @@ SpComponentListPresenterTest >> testActivationOnDoubleClickShouldActivateOnDoubl self assert: activatedItem label equals: '10'. ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpComponentListPresenterTest >> testActivationOnSingleClickShouldActivateOnClick [ | activatedItem | @@ -37,7 +39,7 @@ SpComponentListPresenterTest >> testActivationOnSingleClickShouldActivateOnClick self assert: activatedItem label equals: '10'. ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testActivationWithTransformation [ | activatedItem | @@ -53,7 +55,7 @@ SpComponentListPresenterTest >> testActivationWithTransformation [ self assert: activatedItem equals: 100 ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testAddNoPresenterToComponentListDoesNotRaiseEvent [ | raised | @@ -62,7 +64,7 @@ SpComponentListPresenterTest >> testAddNoPresenterToComponentListDoesNotRaiseEve self deny: raised ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testAddPresenterToComponentListIsInPresenterCollection [ | button | @@ -71,7 +73,7 @@ SpComponentListPresenterTest >> testAddPresenterToComponentListIsInPresenterColl self assert: (presenter includes: button) ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testAddPresenterToComponentListRaisesEvent [ | button raised | raised := false. @@ -83,7 +85,7 @@ SpComponentListPresenterTest >> testAddPresenterToComponentListRaisesEvent [ self assert: raised ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testAddPresenterToComponentListRaisesSingleEvent [ | button raised | raised := 0. @@ -95,13 +97,13 @@ SpComponentListPresenterTest >> testAddPresenterToComponentListRaisesSingleEvent self assert: raised equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testAddPresenterToComponentListShouldNotBeEmpty [ presenter addPresenter: SpButtonPresenter new. self deny: presenter isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testDisableActivationDuring [ | activated | @@ -114,13 +116,13 @@ SpComponentListPresenterTest >> testDisableActivationDuring [ self assert: presenter selectedItem label equals: '20' "but the selection changed!" ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testNewComponentListIsEmpty [ self assertEmpty: self classToTest new ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testReplaceItemList [ | changed | @@ -134,7 +136,7 @@ SpComponentListPresenterTest >> testReplaceItemList [ self assert: changed ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testSelectAll [ presenter beSingleSelection. @@ -149,7 +151,7 @@ SpComponentListPresenterTest >> testSelectAll [ equals: #('10' '20' '30') ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testSelectedItemsSortedByIndex [ presenter beMultipleSelection. @@ -164,7 +166,7 @@ SpComponentListPresenterTest >> testSelectedItemsSortedByIndex [ equals: #('10' '30') ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpComponentListPresenterTest >> testSetSortingBlockBeforeItems [ | count | @@ -176,7 +178,7 @@ SpComponentListPresenterTest >> testSetSortingBlockBeforeItems [ self assert: (presenter model at: 1) label equals: '0' ] -{ #category : #'tests - smoke' } +{ #category : 'tests - smoke' } SpComponentListPresenterTest >> testSortingBlock [ | count | @@ -188,7 +190,7 @@ SpComponentListPresenterTest >> testSortingBlock [ self assert: (presenter model at: 1) label equals: '0' ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testUnselectAll [ presenter beMultipleSelection. @@ -200,7 +202,7 @@ SpComponentListPresenterTest >> testUnselectAll [ self assertEmpty: presenter selection selectedItems ] -{ #category : #tests } +{ #category : 'tests' } SpComponentListPresenterTest >> testUpdateItemsKeepingSelection [ | presenters | diff --git a/src/Spec2-Tests/SpComposablePresenterWithAdditionalSubpresentersTest.class.st b/src/Spec2-Tests/SpComposablePresenterWithAdditionalSubpresentersTest.class.st index 700ed913f..f6e88ef7a 100644 --- a/src/Spec2-Tests/SpComposablePresenterWithAdditionalSubpresentersTest.class.st +++ b/src/Spec2-Tests/SpComposablePresenterWithAdditionalSubpresentersTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #SpComposablePresenterWithAdditionalSubpresentersTest, - #superclass : #TestCase, + #name : 'SpComposablePresenterWithAdditionalSubpresentersTest', + #superclass : 'TestCase', #instVars : [ 'application' ], - #category : #'Spec2-Tests-Core' + #category : 'Spec2-Tests-Core', + #package : 'Spec2-Tests', + #tag : 'Core' } -{ #category : #running } +{ #category : 'running' } SpComposablePresenterWithAdditionalSubpresentersTest >> setUp [ super setUp. application := SpMockApplication new ] -{ #category : #tests } +{ #category : 'tests' } SpComposablePresenterWithAdditionalSubpresentersTest >> testOpening [ | aPresenter | diff --git a/src/Spec2-Tests/SpComposablePresenterWithModelTest.class.st b/src/Spec2-Tests/SpComposablePresenterWithModelTest.class.st index 13946bbe5..2cfe75499 100644 --- a/src/Spec2-Tests/SpComposablePresenterWithModelTest.class.st +++ b/src/Spec2-Tests/SpComposablePresenterWithModelTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpComposablePresenterWithModelTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Core' + #name : 'SpComposablePresenterWithModelTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Core', + #package : 'Spec2-Tests', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testInstanceCreation [ | aPoint presenter | @@ -19,7 +21,7 @@ SpComposablePresenterWithModelTest >> testInstanceCreation [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testInstanceCreationWithValueHolder [ | point valueHolder presenter | @@ -35,7 +37,7 @@ SpComposablePresenterWithModelTest >> testInstanceCreationWithValueHolder [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingModelToModel [ "we had a Model, new model is another Model" @@ -55,7 +57,7 @@ SpComposablePresenterWithModelTest >> testModelSettingModelToModel [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingModelToValueHolder [ | point model presenter | @@ -78,7 +80,7 @@ SpComposablePresenterWithModelTest >> testModelSettingModelToValueHolder [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingObjectToModel [ | point model presenter | @@ -101,7 +103,7 @@ SpComposablePresenterWithModelTest >> testModelSettingObjectToModel [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingObjectToValueHolder [ | point point2 presenter | @@ -122,7 +124,7 @@ SpComposablePresenterWithModelTest >> testModelSettingObjectToValueHolder [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingValueHolderToModel [ "we had a Model, new model is a value holder" @@ -143,7 +145,7 @@ SpComposablePresenterWithModelTest >> testModelSettingValueHolderToModel [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testModelSettingValueHolderToValueHolder [ | point point2 valueHolder presenter | @@ -168,7 +170,7 @@ SpComposablePresenterWithModelTest >> testModelSettingValueHolderToValueHolder [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testUpdateModel [ | aPoint presenter | @@ -191,7 +193,7 @@ SpComposablePresenterWithModelTest >> testUpdateModel [ ] -{ #category : #testing } +{ #category : 'testing' } SpComposablePresenterWithModelTest >> testUpdateModelWithValueHolder [ | aPoint aValueHolder presenter anAnnouncer | diff --git a/src/Spec2-Tests/SpDemoTest.class.st b/src/Spec2-Tests/SpDemoTest.class.st index f54da1e00..d1bdd1e7e 100644 --- a/src/Spec2-Tests/SpDemoTest.class.st +++ b/src/Spec2-Tests/SpDemoTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpDemoTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpDemoTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpDemoTest >> classToTest [ ^ SpDemo ] -{ #category : #tests } +{ #category : 'tests' } SpDemoTest >> testSmokeTestForDemoPages [ self timeLimit: 1 minute. diff --git a/src/Spec2-Tests/SpDropListPresenterTest.class.st b/src/Spec2-Tests/SpDropListPresenterTest.class.st index de5cf923a..b7c5e0cca 100644 --- a/src/Spec2-Tests/SpDropListPresenterTest.class.st +++ b/src/Spec2-Tests/SpDropListPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpDropListPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpDropListPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpDropListPresenterTest >> classToTest [ ^ SpDropListPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testDisableSelectionDuring [ | changed | @@ -24,7 +26,7 @@ SpDropListPresenterTest >> testDisableSelectionDuring [ self assert: presenter selectedItem equals: $b "but the selection changed!" ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testEmptyList [ | changed | @@ -39,7 +41,7 @@ SpDropListPresenterTest >> testEmptyList [ self assert: presenter selectedIndex equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testSetItemsWithCollectionSmallerThanSelection [ | changed | @@ -53,7 +55,7 @@ SpDropListPresenterTest >> testSetItemsWithCollectionSmallerThanSelection [ self assert: presenter selectedIndex equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testSetItemsWithEmptyCollection [ | changed | @@ -68,7 +70,7 @@ SpDropListPresenterTest >> testSetItemsWithEmptyCollection [ self assert: presenter selectedIndex equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testSortingBlock [ | count | count := 0. @@ -80,7 +82,7 @@ SpDropListPresenterTest >> testSortingBlock [ self assert: (presenter model at: 1) model equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpDropListPresenterTest >> testUpdateItemsKeepingSelection [ presenter items: #($a $b $c). diff --git a/src/Spec2-Tests/SpDynamicWidgetChangeTest.class.st b/src/Spec2-Tests/SpDynamicWidgetChangeTest.class.st index d5f2a7bc6..5f59ffc80 100644 --- a/src/Spec2-Tests/SpDynamicWidgetChangeTest.class.st +++ b/src/Spec2-Tests/SpDynamicWidgetChangeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpDynamicWidgetChangeTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpDynamicWidgetChangeTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpDynamicWidgetChangeTest >> classToTest [ ^ SpDynamicWidgetChange ] diff --git a/src/Spec2-Tests/SpEditableListPresenterTest.class.st b/src/Spec2-Tests/SpEditableListPresenterTest.class.st index c8781abab..51377ac4b 100644 --- a/src/Spec2-Tests/SpEditableListPresenterTest.class.st +++ b/src/Spec2-Tests/SpEditableListPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpEditableListPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpEditableListPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpEditableListPresenterTest >> classToTest [ ^ SpEditableListPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testCanAddNewItem [ presenter items: #(1 2 3) asOrderedCollection; @@ -22,7 +24,7 @@ SpEditableListPresenterTest >> testCanAddNewItem [ hasSameElements: #(1 2 3 4) ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testCanCancelAddNewItem [ presenter items: #(1 2 3) asOrderedCollection; @@ -35,7 +37,7 @@ SpEditableListPresenterTest >> testCanCancelAddNewItem [ hasSameElements: #(1 2 3) ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testCanRemoveSelectedItem [ presenter items: #(1 2 3) asOrderedCollection; @@ -48,7 +50,7 @@ SpEditableListPresenterTest >> testCanRemoveSelectedItem [ hasSameElements: #(1 3) ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testMoveElementAtTo [ presenter items: {'AAA' . 'BBB' . 'CCC'} asOrderedCollection. presenter moveElementAt: 1 to: 3. @@ -57,7 +59,7 @@ SpEditableListPresenterTest >> testMoveElementAtTo [ equals: {'BBB' . 'CCC' . 'AAA'} ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testRemoveBlockExecutedWhenSelectedItemRemoved [ | executed selectedItem | executed := false. @@ -76,7 +78,7 @@ SpEditableListPresenterTest >> testRemoveBlockExecutedWhenSelectedItemRemoved [ equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } SpEditableListPresenterTest >> testWhenAddingNewItemThenNewItemIsSelected [ presenter items: #(1 2 3) asOrderedCollection; diff --git a/src/Spec2-Tests/SpEmptyPresenter.class.st b/src/Spec2-Tests/SpEmptyPresenter.class.st index 02ae14b6c..027c0898e 100644 --- a/src/Spec2-Tests/SpEmptyPresenter.class.st +++ b/src/Spec2-Tests/SpEmptyPresenter.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpEmptyPresenter, - #superclass : #SpPresenter, - #category : #'Spec2-Tests-Layout' + #name : 'SpEmptyPresenter', + #superclass : 'SpPresenter', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #accessing } +{ #category : 'accessing' } SpEmptyPresenter >> layout: aSpLayout [ layout := aSpLayout diff --git a/src/Spec2-Tests/SpEventHandlerTest.class.st b/src/Spec2-Tests/SpEventHandlerTest.class.st index 748723fc0..4b8ddf8ce 100644 --- a/src/Spec2-Tests/SpEventHandlerTest.class.st +++ b/src/Spec2-Tests/SpEventHandlerTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #SpEventHandlerTest, - #superclass : #TestCase, + #name : 'SpEventHandlerTest', + #superclass : 'TestCase', #instVars : [ 'presenter' ], - #category : #'Spec2-Tests-Core-Base' + #category : 'Spec2-Tests-Core-Base', + #package : 'Spec2-Tests', + #tag : 'Core-Base' } -{ #category : #running } +{ #category : 'running' } SpEventHandlerTest >> tearDown [ presenter ifNil: [ ^ self ]. @@ -17,7 +19,7 @@ SpEventHandlerTest >> tearDown [ super tearDown ] -{ #category : #tests } +{ #category : 'tests' } SpEventHandlerTest >> testEventIsInstalledDynamically [ | t1 t2 lost got | @@ -40,7 +42,7 @@ SpEventHandlerTest >> testEventIsInstalledDynamically [ self assert: lost ] -{ #category : #tests } +{ #category : 'tests' } SpEventHandlerTest >> testEventIsInstalledOnBuild [ | t1 t2 lost got | @@ -63,7 +65,7 @@ SpEventHandlerTest >> testEventIsInstalledOnBuild [ self assert: lost ] -{ #category : #tests } +{ #category : 'tests' } SpEventHandlerTest >> testEventIsTransmittedOnText [ | t1 t2 lost got | diff --git a/src/Spec2-Tests/SpGridLayout.extension.st b/src/Spec2-Tests/SpGridLayout.extension.st index 3c971ae34..699f2c9dd 100644 --- a/src/Spec2-Tests/SpGridLayout.extension.st +++ b/src/Spec2-Tests/SpGridLayout.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpGridLayout } +Extension { #name : 'SpGridLayout' } -{ #category : #'*Spec2-Tests' } +{ #category : '*Spec2-Tests' } SpGridLayout >> at: aPoint [ ^ childrenByPosition at: aPoint diff --git a/src/Spec2-Tests/SpGridLayoutBuilderTest.class.st b/src/Spec2-Tests/SpGridLayoutBuilderTest.class.st index aecf617de..f53e08cf3 100644 --- a/src/Spec2-Tests/SpGridLayoutBuilderTest.class.st +++ b/src/Spec2-Tests/SpGridLayoutBuilderTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpGridLayoutBuilderTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Layout' + #name : 'SpGridLayoutBuilderTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SpGridLayoutBuilderTest >> newPresenters: nbPresesenters [ ^ (1 to: nbPresesenters) @@ -12,7 +14,7 @@ SpGridLayoutBuilderTest >> newPresenters: nbPresesenters [ ] -{ #category : #tests } +{ #category : 'tests' } SpGridLayoutBuilderTest >> testBuilderAddsElementsOnRaw [ | layout presenters | @@ -34,7 +36,7 @@ SpGridLayoutBuilderTest >> testBuilderAddsElementsOnRaw [ equals: presenters third. ] -{ #category : #tests } +{ #category : 'tests' } SpGridLayoutBuilderTest >> testBuilderCanAddElementsOnMultipleRaws [ | layout presenters | @@ -66,7 +68,7 @@ SpGridLayoutBuilderTest >> testBuilderCanAddElementsOnMultipleRaws [ equals: presenters fifth. ] -{ #category : #tests } +{ #category : 'tests' } SpGridLayoutBuilderTest >> testNewBuilderReturnsGridLayout [ | layout | layout := SpGridLayout build: [ :builder | ]. diff --git a/src/Spec2-Tests/SpGridLayoutTest.class.st b/src/Spec2-Tests/SpGridLayoutTest.class.st index e9fdc8b2f..1197979e5 100644 --- a/src/Spec2-Tests/SpGridLayoutTest.class.st +++ b/src/Spec2-Tests/SpGridLayoutTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpGridLayoutTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Layout' + #name : 'SpGridLayoutTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #tests } +{ #category : 'tests' } SpGridLayoutTest >> testInitialStatus [ | layout | diff --git a/src/Spec2-Tests/SpHorizontalBoxLayoutTest.class.st b/src/Spec2-Tests/SpHorizontalBoxLayoutTest.class.st index cbe3a4765..a7f66b594 100644 --- a/src/Spec2-Tests/SpHorizontalBoxLayoutTest.class.st +++ b/src/Spec2-Tests/SpHorizontalBoxLayoutTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #SpHorizontalBoxLayoutTest, - #superclass : #SpBoxLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpHorizontalBoxLayoutTest', + #superclass : 'SpBoxLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #initialization } +{ #category : 'initialization' } SpHorizontalBoxLayoutTest >> initializeTestedInstance [ layout := SpBoxLayout newLeftToRight. presenter layout: layout ] -{ #category : #tests } +{ #category : 'tests' } SpHorizontalBoxLayoutTest >> testPresenterExtentFollowsChildrenExtent [ | label button | @@ -25,7 +27,7 @@ SpHorizontalBoxLayoutTest >> testPresenterExtentFollowsChildrenExtent [ self assert: (self heightOf: presenter) >= ((self heightOf: label) max: (self heightOf: button)) ] -{ #category : #tests } +{ #category : 'tests' } SpHorizontalBoxLayoutTest >> testReplaceWithFixedWidth [ | p1 toReplace p3 replacement | @@ -43,7 +45,7 @@ SpHorizontalBoxLayoutTest >> testReplaceWithFixedWidth [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #tests } +{ #category : 'tests' } SpHorizontalBoxLayoutTest >> testReplaceWithFixedWidthAllFixed [ | p1 toReplace p3 replacement | @@ -61,7 +63,7 @@ SpHorizontalBoxLayoutTest >> testReplaceWithFixedWidthAllFixed [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #tests } +{ #category : 'tests' } SpHorizontalBoxLayoutTest >> testReplaceWithFixedWidthComposed [ | p1 layoutToReplace toReplace p3 replacement | diff --git a/src/Spec2-Tests/SpHorizontalPanedLayoutTest.class.st b/src/Spec2-Tests/SpHorizontalPanedLayoutTest.class.st index dd40243d4..da972f0b7 100644 --- a/src/Spec2-Tests/SpHorizontalPanedLayoutTest.class.st +++ b/src/Spec2-Tests/SpHorizontalPanedLayoutTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpHorizontalPanedLayoutTest, - #superclass : #SpPanedLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpHorizontalPanedLayoutTest', + #superclass : 'SpPanedLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #initialization } +{ #category : 'initialization' } SpHorizontalPanedLayoutTest >> initializeTestedInstance [ layout := SpPanedLayout newLeftToRight. diff --git a/src/Spec2-Tests/SpImagePresenterTest.class.st b/src/Spec2-Tests/SpImagePresenterTest.class.st index 2e4d98196..4918efacb 100644 --- a/src/Spec2-Tests/SpImagePresenterTest.class.st +++ b/src/Spec2-Tests/SpImagePresenterTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #SpImagePresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpImagePresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpImagePresenterTest >> classToTest [ ^ SpImagePresenter ] -{ #category : #running } +{ #category : 'running' } SpImagePresenterTest >> tearDown [ presenter ifNotNil: [ presenter delete ]. super tearDown ] -{ #category : #tests } +{ #category : 'tests' } SpImagePresenterTest >> testAutoScale [ | count result | count := 0. @@ -29,7 +31,7 @@ SpImagePresenterTest >> testAutoScale [ self assert: result ] -{ #category : #tests } +{ #category : 'tests' } SpImagePresenterTest >> testCanDefineImagePresenterFromAForm [ | title form windowPresenter presenterItems | @@ -46,7 +48,7 @@ SpImagePresenterTest >> testCanDefineImagePresenterFromAForm [ ] -{ #category : #tests } +{ #category : 'tests' } SpImagePresenterTest >> testSwitchAutoScale [ | autoState | autoState := presenter autoScale. diff --git a/src/Spec2-Tests/SpLabelPresenterTest.class.st b/src/Spec2-Tests/SpLabelPresenterTest.class.st index 19e774195..32f9fb9aa 100644 --- a/src/Spec2-Tests/SpLabelPresenterTest.class.st +++ b/src/Spec2-Tests/SpLabelPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpLabelPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpLabelPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpLabelPresenterTest >> classToTest [ ^ SpLabelPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpLabelPresenterTest >> testLabelChangeRaisesEvent [ self @@ -18,7 +20,7 @@ SpLabelPresenterTest >> testLabelChangeRaisesEvent [ whenDoing: [ presenter label: 'test' ] ] -{ #category : #tests } +{ #category : 'tests' } SpLabelPresenterTest >> testLabelChangeRaisesEventOnce [ self @@ -28,7 +30,7 @@ SpLabelPresenterTest >> testLabelChangeRaisesEventOnce [ whenDoing: [ presenter label: 'test' ] ] -{ #category : #tests } +{ #category : 'tests' } SpLabelPresenterTest >> testLabelIsSet [ presenter label: 'test'. diff --git a/src/Spec2-Tests/SpLayoutTest.class.st b/src/Spec2-Tests/SpLayoutTest.class.st index 74f4b18f9..9db402954 100644 --- a/src/Spec2-Tests/SpLayoutTest.class.st +++ b/src/Spec2-Tests/SpLayoutTest.class.st @@ -1,31 +1,33 @@ Class { - #name : #SpLayoutTest, - #superclass : #SpSpecTest, + #name : 'SpLayoutTest', + #superclass : 'SpSpecTest', #instVars : [ 'layout' ], - #category : #'Spec2-Tests-Layout' + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #testing } +{ #category : 'testing' } SpLayoutTest class >> isAbstract [ ^ self == SpLayoutTest ] -{ #category : #testing } +{ #category : 'testing' } SpLayoutTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } SpLayoutTest >> classToTest [ ^ SpEmptyPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpLayoutTest >> testInitialLayoutIsEmpty [ self assert: layout isEmpty diff --git a/src/Spec2-Tests/SpListPresenterMultipleSelectionTest.class.st b/src/Spec2-Tests/SpListPresenterMultipleSelectionTest.class.st index 6d4b750d4..249ab2006 100644 --- a/src/Spec2-Tests/SpListPresenterMultipleSelectionTest.class.st +++ b/src/Spec2-Tests/SpListPresenterMultipleSelectionTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpListPresenterMultipleSelectionTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpListPresenterMultipleSelectionTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpListPresenterMultipleSelectionTest >> classToTest [ ^ SpListPresenter ] -{ #category : #running } +{ #category : 'running' } SpListPresenterMultipleSelectionTest >> setUp [ super setUp. presenter @@ -17,7 +19,7 @@ SpListPresenterMultipleSelectionTest >> setUp [ items: #(10 20 30) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectAllRaisesSelectionEventOnce [ "Because it does nothing in single selection mode" | events | @@ -29,49 +31,49 @@ SpListPresenterMultipleSelectionTest >> testSelectAllRaisesSelectionEventOnce [ self assert: events equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectAllSelectsAllItems [ presenter selectAll. self assert: presenter selection selectedItems asSet equals: presenter model items asSet ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexAddsIndexToSelectedIndexList [ presenter selectIndex: 1. self assert: (presenter selection includesIndex: 1) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexAddsItemToSelectedItemList [ presenter selectIndex: 1. self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexOutsideRangeHasNoSelectedIndexes [ presenter selectIndex: 4. self assert: presenter selection selectedIndexes isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexOutsideRangeHasNoSelectedItems [ presenter selectIndex: 4. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexOutsideRangeIsEmpty [ presenter selectIndex: 4. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKeepsFirstElement [ presenter selectIndex: 1. @@ -79,7 +81,7 @@ SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKee self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKeepsFirstIndex [ presenter selectIndex: 1. @@ -87,7 +89,7 @@ SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKee self assert: (presenter selection includesIndex: 1) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKeepsSingleSelectedItem [ presenter selectIndex: 1. @@ -95,7 +97,7 @@ SpListPresenterMultipleSelectionTest >> testSelectIndexThenSelectOutsideRangeKee self assert: presenter selection selectedItems size equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexTwiceAddsIndexToSelectedIndexListOnlyOnce [ presenter @@ -104,51 +106,51 @@ SpListPresenterMultipleSelectionTest >> testSelectIndexTwiceAddsIndexToSelectedI self assert: presenter selection selectedIndexes asArray equals: #(1) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesAddsIndexesToSelectedIndexList [ presenter selectIndexes: {1 . 2}. self assert: (presenter selection includesIndexes: {1 . 2}) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesAddsItemsToSelectedItemList [ presenter selectIndexes: {1 . 2}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesOutsideRangeHasNoSelectedIndexes [ presenter selectIndexes: {4 . 5}. self assert: presenter selection selectedIndexes isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesOutsideRangeHasNoSelectedItems [ presenter selectIndexes: {4 . 5}. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesOutsideRangeIsEmpty [ presenter selectIndexes: {4 . 5}. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesThenSelectOutsideRangeKeepsElements [ presenter selectIndexes: {1 . 2}. presenter selectIndexes: {50 . 60}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesThenSelectOutsideRangeKeepsIndexes [ presenter selectIndexes: {1 . 2}. presenter selectIndexes: {50 . 60}. self assert: (presenter selection includesIndexes: {1 . 2}) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectIndexesTwiceAddsIndexesToSelectedIndexListOnlyOnce [ presenter selectIndexes: {1 . 2}; @@ -156,42 +158,42 @@ SpListPresenterMultipleSelectionTest >> testSelectIndexesTwiceAddsIndexesToSelec self assertCollection: presenter selection selectedIndexes hasSameElements: {1 . 2} ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemAddsIndexToSelectedIndexList [ presenter selectItem: 10. self assert: (presenter selection includesIndex: 1) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemAddsItemToSelectedItemList [ presenter selectItem: 10. self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemOutsideRangeHasNoSelectedIndexes [ presenter selectItem: 400. self assert: presenter selection selectedIndexes isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemOutsideRangeHasNoSelectedItems [ presenter selectItem: 400. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemOutsideRangeIsEmpty [ presenter selectItem: 4000. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsFirstElement [ presenter selectItem: 10. @@ -199,7 +201,7 @@ SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeep self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsFirstIndex [ presenter selectItem: 10. @@ -207,7 +209,7 @@ SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeep self assert: (presenter selection includesIndex: 1) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsSingleSelectedItem [ presenter selectItem: 10. @@ -215,51 +217,51 @@ SpListPresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeep self assert: presenter selection selectedItems size equals: 1 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsAddsIndexesToSelectedIndexList [ presenter selectItems: {10 . 20}. self assert: (presenter selection includesIndexes: #(1 2)) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsAddsItemsToSelectedItemList [ presenter selectItems: {10 . 20}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsOutsideRangeHasNoSelectedIndexes [ presenter selectItems: {300 . 400}. self assert: presenter selection selectedIndexes isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsOutsideRangeHasNoSelectedItems [ presenter selectItems: {300 . 400}. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsOutsideRangeIsEmpty [ presenter selectItems: {4000 . 5000}. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsThenSelectOutsideRangeKeepsElements [ presenter selectItems: {10 . 20}. presenter selectItems: {4000 . 5000}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectItemsThenSelectOutsideRangeKeepsIndexes [ presenter selectItems: {10 . 20}. presenter selectItems: {500 . 600}. self assert: (presenter selection includesIndexes: {1 . 2}) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesAddsAllToSelectedIndexList [ presenter selectIndex: 1. @@ -268,7 +270,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesAddsAllToSelect self assert: (presenter selection includesIndex: 3). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesAddsAllToSelectedItemList [ presenter selectIndex: 1. @@ -277,7 +279,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesAddsAllToSelect self assert: (presenter selection includesItem: 30). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -289,7 +291,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleIndexesRaisesSelection self assert: events equals: 2 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectMultipleItemAddsAllToSelectedIndexList [ presenter selectItem: 10. @@ -298,7 +300,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleItemAddsAllToSelectedI self assert: (presenter selection includesIndex: 3). ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectMultipleItemsAddsAllToSelectedItemList [ presenter selectItem: 10. @@ -307,7 +309,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleItemsAddsAllToSelected self assert: (presenter selection includesItem: 30). ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSelectMultipleItemsRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -319,7 +321,7 @@ SpListPresenterMultipleSelectionTest >> testSelectMultipleItemsRaisesSelectionCh self assert: events equals: 2 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSetSelectIndexOutsideRangeDoesNotModifySelection [ presenter whenSelectionChangedDo: [ :selection | self fail ]. @@ -328,7 +330,7 @@ SpListPresenterMultipleSelectionTest >> testSetSelectIndexOutsideRangeDoesNotMod "If we arrive here and the test did not fail, we succeeded" ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEventWithSelectedIndex [ | selectedIndexes | presenter @@ -337,7 +339,7 @@ SpListPresenterMultipleSelectionTest >> testSetSelectIndexRaisesSelectionChangeE self assert: (selectedIndexes includes: 1) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterMultipleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEventWithSelectedItem [ | selectedItems | presenter @@ -346,7 +348,7 @@ SpListPresenterMultipleSelectionTest >> testSetSelectIndexRaisesSelectionChangeE self assert: (selectedItems includes: 10) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterMultipleSelectionTest >> testSetSelectItemOutsideRangeDoesNotModifySelection [ presenter whenSelectionChangedDo: [ :selection | self fail ]. @@ -355,7 +357,7 @@ SpListPresenterMultipleSelectionTest >> testSetSelectItemOutsideRangeDoesNotModi "If we arrive here and the test did not fail, we succeeded" ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectAllRaisesSelectionEventOnce [ "Because it does nothing in single selection mode" @@ -370,7 +372,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectAllRaisesSelectionEventOnce self assert: events equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectAllUnselectsall [ presenter @@ -379,7 +381,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectAllUnselectsall [ self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectSelectedIndexRaisesSelectionEventOnce [ | counter | @@ -391,7 +393,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectSelectedIndexRaisesSelection self assert: counter equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectSelectedIndexRemovesItFromSelectionList [ presenter @@ -400,7 +402,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectSelectedIndexRemovesItFromSe self assert: (presenter selection isEmpty) ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterMultipleSelectionTest >> testUnselectSelectedItemRaisesSelectionEventOnce [ | counter | @@ -412,7 +414,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectSelectedItemRaisesSelectionE self assert: counter equals: 1 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterMultipleSelectionTest >> testUnselectSelectedItemRemovesItFromSelectionList [ presenter @@ -421,7 +423,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectSelectedItemRemovesItFromSel self assert: (presenter selection isEmpty) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectUnselectedIndexKeepsSelectionList [ presenter @@ -430,7 +432,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectUnselectedIndexKeepsSelectio self assert: presenter selection selectedIndexes asArray equals: #(1) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterMultipleSelectionTest >> testUnselectUnselectedIndexRaisesNoSelectionEvent [ | counter | @@ -442,7 +444,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectUnselectedIndexRaisesNoSelec self assert: counter equals: 0 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterMultipleSelectionTest >> testUnselectUnselectedItemKeepsSelectionList [ presenter @@ -451,7 +453,7 @@ SpListPresenterMultipleSelectionTest >> testUnselectUnselectedItemKeepsSelection self assert: presenter selection selectedItems asArray equals: #(10) ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterMultipleSelectionTest >> testUnselectUnselectedItemRaisesNoSelectionEvent [ | counter | diff --git a/src/Spec2-Tests/SpListPresenterSingleSelectionTest.class.st b/src/Spec2-Tests/SpListPresenterSingleSelectionTest.class.st index dc12ae160..011511df0 100644 --- a/src/Spec2-Tests/SpListPresenterSingleSelectionTest.class.st +++ b/src/Spec2-Tests/SpListPresenterSingleSelectionTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpListPresenterSingleSelectionTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpListPresenterSingleSelectionTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpListPresenterSingleSelectionTest >> classToTest [ ^ SpListPresenter ] -{ #category : #running } +{ #category : 'running' } SpListPresenterSingleSelectionTest >> setUp [ super setUp. @@ -18,7 +20,7 @@ SpListPresenterSingleSelectionTest >> setUp [ items: #(10 20 30) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectAllDoesNotRaiseEvent [ "Because it does nothing in single selection mode" | events | @@ -30,14 +32,14 @@ SpListPresenterSingleSelectionTest >> testSelectAllDoesNotRaiseEvent [ self assert: events equals: 0 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectAllDoesNotSelect [ presenter selectAll. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectAllWithExistingSelectionLeavesSelection [ presenter selectIndex: 1; @@ -46,35 +48,35 @@ SpListPresenterSingleSelectionTest >> testSelectAllWithExistingSelectionLeavesSe self assert: (presenter selection includesIndex: 1) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexOutsideRangeUnsetsSelectedIndex [ presenter selectIndex: 4. self assert: (presenter selection includesIndex: 0) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexOutsideRangeUnsetsSelectedItem [ presenter selectIndex: 4. self assert: presenter selection selectedItem equals: nil ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexSetsSelectedIndex [ presenter selectIndex: 1. self assert: presenter selection selectedIndex equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexSetsSelectedItem [ presenter selectIndex: 1. self assert: presenter selection selectedItem equals: 10 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexTwiceMakesIndexSelected [ presenter selectIndex: 3; @@ -83,7 +85,7 @@ SpListPresenterSingleSelectionTest >> testSelectIndexTwiceMakesIndexSelected [ self assert: (presenter selection includesIndex: 3) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectIndexTwiceMakesIsListedOnceInSelectedIndexes [ presenter selectIndex: 3; @@ -92,34 +94,34 @@ SpListPresenterSingleSelectionTest >> testSelectIndexTwiceMakesIsListedOnceInSel self assert: presenter selection selectedIndexes asArray equals: #(3) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSelectItemOutsideRangeUnsetsSelectedIndex [ presenter selectItem: 40. self assert: presenter selection selectedIndex equals: 0 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSelectItemOutsideRangeUnsetsSelectedItem [ presenter selectItem: 40. self assert: presenter selection selectedItem equals: nil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSelectItemSetsSelectedIndex [ presenter selectItem: 20. self assert: presenter selection selectedIndex equals: 2 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSelectItemSetsSelectedItem [ presenter selectItem: 20. self assert: presenter selection selectedItem equals: 20 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSelectMultipleIndexesRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -131,7 +133,7 @@ SpListPresenterSingleSelectionTest >> testSelectMultipleIndexesRaisesSelectionCh self assert: events equals: 2 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexOutsideRangeRaisesSelectionChangeEventWithUnsetIndex [ | selectedIndex | presenter @@ -140,7 +142,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexOutsideRangeRaisesSelect self assert: selectedIndex equals: 0 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexOutsideRangeRaisesSelectionChangeEventWithUnsetItem [ | selectedItem | presenter @@ -149,7 +151,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexOutsideRangeRaisesSelect self assert: selectedItem equals: nil ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEventWithSelectedIndex [ | selectedIndex | presenter @@ -158,7 +160,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEve self assert: selectedIndex equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEventWithSelectedItem [ | selectedElement | @@ -168,7 +170,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionChangeEve self assert: selectedElement equals: 10 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionIndexChangeEventWithSelectedIndex [ | selectedIndex | presenter selection @@ -178,7 +180,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionIndexChan self assert: selectedIndex equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionItemChangeEventWithSelectedIndex [ | selectedItem | presenter @@ -187,7 +189,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectIndexRaisesSelectionItemChang self assert: selectedItem equals: 10 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelectionChangeEventWithUnsetIndex [ | selectedIndex | @@ -197,7 +199,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelecti self assert: selectedIndex equals: 0 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelectionChangeEventWithUnsetItem [ | selectedItem | presenter @@ -206,7 +208,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelecti self assert: selectedItem equals: nil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEventWithSelectedIndex [ | selectedIndex | @@ -216,7 +218,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEven self assert: selectedIndex equals: 2 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEventWithSelectedItem [ | selectedElement | presenter @@ -225,7 +227,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEven self assert: selectedElement equals: 20 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionIndexChangeEventWithSelectedIndex [ | selectedIndex | presenter selection @@ -234,7 +236,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionIndexChang self assert: selectedIndex equals: 1 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionItemChangeEventWithSelectedItem [ | selectedItem | presenter @@ -243,7 +245,7 @@ SpListPresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionItemChange self assert: selectedItem equals: 10 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectAllRaisesSelectionEventOnce [ "Because it does nothing in single selection mode" | events | @@ -255,7 +257,7 @@ SpListPresenterSingleSelectionTest >> testUnselectAllRaisesSelectionEventOnce [ self assert: events equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectAllUnselectsSingleSelection [ presenter @@ -264,7 +266,7 @@ SpListPresenterSingleSelectionTest >> testUnselectAllUnselectsSingleSelection [ self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectNonSelectedIndexDoesNotRemovesSelection [ presenter selectIndex: 1; @@ -273,7 +275,7 @@ SpListPresenterSingleSelectionTest >> testUnselectNonSelectedIndexDoesNotRemoves self assert: presenter selection selectedIndex equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectNonSelectedIndexRaisesNoEvent [ | counter | @@ -286,7 +288,7 @@ SpListPresenterSingleSelectionTest >> testUnselectNonSelectedIndexRaisesNoEvent self assert: counter equals: 0 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterSingleSelectionTest >> testUnselectNonSelectedItemDoesNotRemovesSelection [ presenter selectItem: 10; @@ -295,7 +297,7 @@ SpListPresenterSingleSelectionTest >> testUnselectNonSelectedItemDoesNotRemovesS self assert: presenter selection selectedItem equals: 10 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterSingleSelectionTest >> testUnselectNonSelectedItemRaisesNoEvent [ | counter | @@ -308,7 +310,7 @@ SpListPresenterSingleSelectionTest >> testUnselectNonSelectedItemRaisesNoEvent [ self assert: counter equals: 0 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectSelectedIndexRaisesSingleEvent [ | counter | @@ -321,7 +323,7 @@ SpListPresenterSingleSelectionTest >> testUnselectSelectedIndexRaisesSingleEvent self assert: counter equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpListPresenterSingleSelectionTest >> testUnselectSelectedIndexRemovesSelection [ presenter selectIndex: 1; @@ -330,7 +332,7 @@ SpListPresenterSingleSelectionTest >> testUnselectSelectedIndexRemovesSelection self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterSingleSelectionTest >> testUnselectSelectedItemRaisesSingleEvent [ | counter | @@ -343,7 +345,7 @@ SpListPresenterSingleSelectionTest >> testUnselectSelectedItemRaisesSingleEvent self assert: counter equals: 1 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpListPresenterSingleSelectionTest >> testUnselectSelectedItemRemovesSelection [ presenter diff --git a/src/Spec2-Tests/SpListPresenterTest.class.st b/src/Spec2-Tests/SpListPresenterTest.class.st index 2aa17ef6b..b43fdc2a5 100644 --- a/src/Spec2-Tests/SpListPresenterTest.class.st +++ b/src/Spec2-Tests/SpListPresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpListPresenterTest, - #superclass : #SpAbstractListPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpListPresenterTest', + #superclass : 'SpAbstractListPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpListPresenterTest >> classToTest [ ^ SpListPresenter ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } SpListPresenterTest >> testHideHeaderTitleUnsetsTitle [ presenter @@ -20,7 +22,7 @@ SpListPresenterTest >> testHideHeaderTitleUnsetsTitle [ self deny: presenter hasHeaderTitle ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } SpListPresenterTest >> testIconFor [ presenter items: #(#add #back #catalog); @@ -28,7 +30,7 @@ SpListPresenterTest >> testIconFor [ self assert: (presenter iconFor: #add) equals: (Smalltalk ui icons iconNamed: #add) ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } SpListPresenterTest >> testSetHeaderTitleHasTitle [ presenter headerTitle: 'title'. @@ -36,7 +38,7 @@ SpListPresenterTest >> testSetHeaderTitleHasTitle [ self assert: presenter hasHeaderTitle ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } SpListPresenterTest >> testSetHeaderTitleSetsTitle [ presenter headerTitle: 'title'. @@ -44,7 +46,7 @@ SpListPresenterTest >> testSetHeaderTitleSetsTitle [ self assert: presenter headerTitle equals: 'title' ] -{ #category : #tests } +{ #category : 'tests' } SpListPresenterTest >> testWhenIconsChangedDo [ | icon counter | counter := 0. diff --git a/src/Spec2-Tests/SpListSelectionPresenterTest.class.st b/src/Spec2-Tests/SpListSelectionPresenterTest.class.st index 1847158ac..4e0bab3a3 100644 --- a/src/Spec2-Tests/SpListSelectionPresenterTest.class.st +++ b/src/Spec2-Tests/SpListSelectionPresenterTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpListSelectionPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpListSelectionPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpListSelectionPresenterTest >> classToTest [ ^ SpListSelectionPresenter ] diff --git a/src/Spec2-Tests/SpMenuBarPresenterTest.class.st b/src/Spec2-Tests/SpMenuBarPresenterTest.class.st index 426336576..b5a88395f 100644 --- a/src/Spec2-Tests/SpMenuBarPresenterTest.class.st +++ b/src/Spec2-Tests/SpMenuBarPresenterTest.class.st @@ -1,5 +1,7 @@ Class { - #name : #SpMenuBarPresenterTest, - #superclass : #SpMenuPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpMenuBarPresenterTest', + #superclass : 'SpMenuPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } diff --git a/src/Spec2-Tests/SpMenuButtonPresenterTest.class.st b/src/Spec2-Tests/SpMenuButtonPresenterTest.class.st index 26cf0da6e..483985ad8 100644 --- a/src/Spec2-Tests/SpMenuButtonPresenterTest.class.st +++ b/src/Spec2-Tests/SpMenuButtonPresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpMenuButtonPresenterTest, - #superclass : #SpAbstractButtonPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpMenuButtonPresenterTest', + #superclass : 'SpAbstractButtonPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpMenuButtonPresenterTest >> classToTest [ ^ SpMenuButtonPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpMenuButtonPresenterTest >> testSmokeMenu [ presenter menu: (SpMenuPresenter new diff --git a/src/Spec2-Tests/SpMenuItemPresenterTest.class.st b/src/Spec2-Tests/SpMenuItemPresenterTest.class.st index f1f06a0a7..c7c6c9e5c 100644 --- a/src/Spec2-Tests/SpMenuItemPresenterTest.class.st +++ b/src/Spec2-Tests/SpMenuItemPresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpMenuItemPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpMenuItemPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpMenuItemPresenterTest >> classToTest [ ^ SpMenuItemPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpMenuItemPresenterTest >> testIcon [ presenter icon: (Smalltalk ui icons iconNamed: 'smallCancel'). @@ -21,7 +23,7 @@ SpMenuItemPresenterTest >> testIcon [ equals: (Smalltalk ui icons iconNamed: 'smallOk') ] -{ #category : #tests } +{ #category : 'tests' } SpMenuItemPresenterTest >> testName [ presenter name: 'Test'. diff --git a/src/Spec2-Tests/SpMenuPresenterTest.class.st b/src/Spec2-Tests/SpMenuPresenterTest.class.st index a58891355..61e95d753 100644 --- a/src/Spec2-Tests/SpMenuPresenterTest.class.st +++ b/src/Spec2-Tests/SpMenuPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpMenuPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpMenuPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpMenuPresenterTest >> classToTest [ ^ SpMenuPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpMenuPresenterTest >> testValue [ self assert: presenter value equals: presenter diff --git a/src/Spec2-Tests/SpMillerColumnPresenterTest.class.st b/src/Spec2-Tests/SpMillerColumnPresenterTest.class.st index bdda05a98..b3c4dd8ba 100644 --- a/src/Spec2-Tests/SpMillerColumnPresenterTest.class.st +++ b/src/Spec2-Tests/SpMillerColumnPresenterTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpMillerColumnPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Miller' + #name : 'SpMillerColumnPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Miller', + #package : 'Spec2-Tests', + #tag : 'Miller' } -{ #category : #accessing } +{ #category : 'accessing' } SpMillerColumnPresenterTest >> classToTest [ ^ SpMillerColumnPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testActivateSubPresenterPushesElementToList [ | mock | @@ -21,21 +23,21 @@ SpMillerColumnPresenterTest >> testActivateSubPresenterPushesElementToList [ self assert: self presenter size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testAddManyPresentersPushesThemToPresenterList [ 3 timesRepeat: [self presenter addPresenter: (SpNullMillerPresenter on: SpLabelPresenter new)]. self assert: self presenter size equals: 3 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testAddPresenterPushesItToPresenterList [ self presenter addPresenter: (SpNullMillerPresenter on: SpLabelPresenter new). self assert: self presenter size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testPushModelUsesPresenterBlock [ | subpresenter | @@ -45,7 +47,7 @@ SpMillerColumnPresenterTest >> testPushModelUsesPresenterBlock [ self assert: self presenter presenters first equals: subpresenter ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelManyTimesPushesOnlyLastPresenterToList [ | nullMillerPresenter | @@ -60,7 +62,7 @@ SpMillerColumnPresenterTest >> testSetRootModelManyTimesPushesOnlyLastPresenterT equals: 3 asString ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelManyTimesPushesOnlyOnePresenterToList [ self presenter presenterBlock: [ :model | @@ -71,7 +73,7 @@ SpMillerColumnPresenterTest >> testSetRootModelManyTimesPushesOnlyOnePresenterTo self assert: self presenter size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelPushesPresenterToList [ self presenter presenterBlock: [ :model | @@ -81,7 +83,7 @@ SpMillerColumnPresenterTest >> testSetRootModelPushesPresenterToList [ self assert: self presenter size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelResetsToSinglePresenter [ self presenter presenterBlock: [ :model | @@ -92,7 +94,7 @@ SpMillerColumnPresenterTest >> testSetRootModelResetsToSinglePresenter [ self assert: self presenter size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelWithPresenterDoesNotFail [ self presenter presenterBlock: [ :model | @@ -103,7 +105,7 @@ SpMillerColumnPresenterTest >> testSetRootModelWithPresenterDoesNotFail [ raise: Error ] -{ #category : #tests } +{ #category : 'tests' } SpMillerColumnPresenterTest >> testSetRootModelWithoutPresenterBlockFails [ self diff --git a/src/Spec2-Tests/SpMockApplication.class.st b/src/Spec2-Tests/SpMockApplication.class.st index 666bbfa60..22f6ecfd2 100644 --- a/src/Spec2-Tests/SpMockApplication.class.st +++ b/src/Spec2-Tests/SpMockApplication.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpMockApplication, - #superclass : #SpApplication, - #category : #'Spec2-Tests-Core-Base' + #name : 'SpMockApplication', + #superclass : 'SpApplication', + #category : 'Spec2-Tests-Core-Base', + #package : 'Spec2-Tests', + #tag : 'Core-Base' } -{ #category : #accessing } +{ #category : 'accessing' } SpMockApplication class >> defaultBackendName [ ^ #Mock diff --git a/src/Spec2-Tests/SpMockBackend.class.st b/src/Spec2-Tests/SpMockBackend.class.st index 46b80b5c3..4388265ff 100644 --- a/src/Spec2-Tests/SpMockBackend.class.st +++ b/src/Spec2-Tests/SpMockBackend.class.st @@ -1,22 +1,24 @@ Class { - #name : #SpMockBackend, - #superclass : #SpApplicationBackend, - #category : #'Spec2-Tests-Core-Base' + #name : 'SpMockBackend', + #superclass : 'SpApplicationBackend', + #category : 'Spec2-Tests-Core-Base', + #package : 'Spec2-Tests', + #tag : 'Core-Base' } -{ #category : #accessing } +{ #category : 'accessing' } SpMockBackend class >> backendName [ ^ #Mock ] -{ #category : #private } +{ #category : 'private' } SpMockBackend >> adapterBindingsClass [ ^ SpStubAdapterBindings ] -{ #category : #accessing } +{ #category : 'accessing' } SpMockBackend >> defaultConfigurationFor: anApplication [ ^ SpMockConfiguration new diff --git a/src/Spec2-Tests/SpMockConfiguration.class.st b/src/Spec2-Tests/SpMockConfiguration.class.st index cf31a576d..24c714e90 100644 --- a/src/Spec2-Tests/SpMockConfiguration.class.st +++ b/src/Spec2-Tests/SpMockConfiguration.class.st @@ -1,5 +1,7 @@ Class { - #name : #SpMockConfiguration, - #superclass : #SpApplicationConfiguration, - #category : #'Spec2-Tests-Core-Base' + #name : 'SpMockConfiguration', + #superclass : 'SpApplicationConfiguration', + #category : 'Spec2-Tests-Core-Base', + #package : 'Spec2-Tests', + #tag : 'Core-Base' } diff --git a/src/Spec2-Tests/SpMockMillerPresenter.class.st b/src/Spec2-Tests/SpMockMillerPresenter.class.st index 9134fa935..93c9792ff 100644 --- a/src/Spec2-Tests/SpMockMillerPresenter.class.st +++ b/src/Spec2-Tests/SpMockMillerPresenter.class.st @@ -1,19 +1,21 @@ Class { - #name : #SpMockMillerPresenter, - #superclass : #SpMillerPresenter, + #name : 'SpMockMillerPresenter', + #superclass : 'SpMillerPresenter', #instVars : [ 'activationBlock' ], - #category : #'Spec2-Tests-Miller' + #category : 'Spec2-Tests-Miller', + #package : 'Spec2-Tests', + #tag : 'Miller' } -{ #category : #simulating } +{ #category : 'simulating' } SpMockMillerPresenter >> activate [ activationBlock value: (SpMillerActivation on: 1) ] -{ #category : #initialization } +{ #category : 'initialization' } SpMockMillerPresenter >> whenActivatedDo: aBlock [ activationBlock := aBlock diff --git a/src/Spec2-Tests/SpMockPesenterWithoutGetter.class.st b/src/Spec2-Tests/SpMockPesenterWithoutGetter.class.st index ed8114c77..4d09d846e 100644 --- a/src/Spec2-Tests/SpMockPesenterWithoutGetter.class.st +++ b/src/Spec2-Tests/SpMockPesenterWithoutGetter.class.st @@ -1,20 +1,22 @@ Class { - #name : #SpMockPesenterWithoutGetter, - #superclass : #SpPresenter, + #name : 'SpMockPesenterWithoutGetter', + #superclass : 'SpPresenter', #instVars : [ 'buttonPresenter' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #layout } +{ #category : 'layout' } SpMockPesenterWithoutGetter class >> defaultLayout [ ^ SpBoxLayout newLeftToRight add: #buttonPresenter; yourself ] -{ #category : #initialization } +{ #category : 'initialization' } SpMockPesenterWithoutGetter >> initializePresenters [ buttonPresenter := self newButton ] diff --git a/src/Spec2-Tests/SpMultipleSelectionModeTest.class.st b/src/Spec2-Tests/SpMultipleSelectionModeTest.class.st index 08ea08d71..d50fcf03c 100644 --- a/src/Spec2-Tests/SpMultipleSelectionModeTest.class.st +++ b/src/Spec2-Tests/SpMultipleSelectionModeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpMultipleSelectionModeTest, - #superclass : #SpAbstractSelectionModeTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpMultipleSelectionModeTest', + #superclass : 'SpAbstractSelectionModeTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #tests } +{ #category : 'tests' } SpMultipleSelectionModeTest >> testGetRightElementAfterSortingOfElementsChanged [ presenter := SpTablePresenter new. "use a TablePresenter since ListPresenter cannot sort" @@ -23,7 +25,7 @@ SpMultipleSelectionModeTest >> testGetRightElementAfterSortingOfElementsChanged equals: #( 10 8 ) ] -{ #category : #tests } +{ #category : 'tests' } SpMultipleSelectionModeTest >> testSelectionIsResetAfterItemsAssignment [ presenter @@ -36,7 +38,7 @@ SpMultipleSelectionModeTest >> testSelectionIsResetAfterItemsAssignment [ self assert: presenter selection selectedItems asArray equals: #( ) ] -{ #category : #tests } +{ #category : 'tests' } SpMultipleSelectionModeTest >> testSelectionIsResetAfterSorting [ presenter := SpTablePresenter new. "use a TablePresenter since ListPresenter cannot sort" @@ -55,7 +57,7 @@ SpMultipleSelectionModeTest >> testSelectionIsResetAfterSorting [ self assert: presenter selection selectedItems isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpMultipleSelectionModeTest >> testSubscriptionsAreTransfered [ | count | count := 0. diff --git a/src/Spec2-Tests/SpNotebookPresenterTest.class.st b/src/Spec2-Tests/SpNotebookPresenterTest.class.st index 75c261c9b..932b51b69 100644 --- a/src/Spec2-Tests/SpNotebookPresenterTest.class.st +++ b/src/Spec2-Tests/SpNotebookPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpNotebookPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpNotebookPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpNotebookPresenterTest >> classToTest [ ^ SpNotebookPresenter ] -{ #category : #accessing } +{ #category : 'accessing' } SpNotebookPresenterTest >> mockPage [ ^ SpNotebookPage title: 'Mock' @@ -17,7 +19,7 @@ SpNotebookPresenterTest >> mockPage [ provider: [ SpButtonPresenter new ] ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testAddPage [ self assertEmpty: presenter pages. presenter addPage: self mockPage. @@ -25,7 +27,7 @@ SpNotebookPresenterTest >> testAddPage [ ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testPageAt [ | page | presenter addPage: self mockPage. @@ -34,7 +36,7 @@ SpNotebookPresenterTest >> testPageAt [ self assert: (presenter pageAt: 2) equals: page ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemoveAfterSettingPagesWithAnArray [ | page | @@ -47,7 +49,7 @@ SpNotebookPresenterTest >> testRemoveAfterSettingPagesWithAnArray [ self assertCollection: presenter pages hasSameElements: {page} ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemoveAll [ | page | @@ -59,7 +61,7 @@ SpNotebookPresenterTest >> testRemoveAll [ self assert: presenter pages size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemoveAllCleansSelection [ | page | @@ -74,7 +76,7 @@ SpNotebookPresenterTest >> testRemoveAllCleansSelection [ ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemoveAllDoesNotSelectsAnyPage [ | page1 page2 selected | @@ -98,7 +100,7 @@ SpNotebookPresenterTest >> testRemoveAllDoesNotSelectsAnyPage [ self assert: selected equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemovePage [ | page | presenter addPage: self mockPage. @@ -109,7 +111,7 @@ SpNotebookPresenterTest >> testRemovePage [ self assert: presenter pages size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testRemovePageAt [ | page | presenter addPage: self mockPage. @@ -120,7 +122,7 @@ SpNotebookPresenterTest >> testRemovePageAt [ self assertCollection: presenter pages hasSameElements: {page} ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testSelectPage [ | mock mock2 | mock := self mockPage. @@ -131,7 +133,7 @@ SpNotebookPresenterTest >> testSelectPage [ self assert: presenter selectedPage equals: mock2 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testSelectPageIndex [ | mock mock2 | mock := self mockPage. @@ -142,7 +144,7 @@ SpNotebookPresenterTest >> testSelectPageIndex [ self assert: presenter selectedPage equals: mock2 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testWhenPagesChangedDo [ | counter | counter := 0. @@ -152,7 +154,7 @@ SpNotebookPresenterTest >> testWhenPagesChangedDo [ self assert: counter equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpNotebookPresenterTest >> testWhenSelectedPageChangedDo [ | mock mock2 counter selected | counter := 0. diff --git a/src/Spec2-Tests/SpNotificationCenterTest.class.st b/src/Spec2-Tests/SpNotificationCenterTest.class.st index 8e8405b79..a9e75f5b7 100644 --- a/src/Spec2-Tests/SpNotificationCenterTest.class.st +++ b/src/Spec2-Tests/SpNotificationCenterTest.class.st @@ -1,24 +1,26 @@ Class { - #name : #SpNotificationCenterTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Notifications' + #name : 'SpNotificationCenterTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Notifications', + #package : 'Spec2-Tests', + #tag : 'Notifications' } -{ #category : #tests } +{ #category : 'tests' } SpNotificationCenterTest >> testAddAnItemAddsIt [ | f center | f := SpNotificationItem with: 'first'. - center := SpNotificationCenter new. + center := SpApplication new notificationCenter. center add: f. self assert: center items first text equals: 'first' ] -{ #category : #tests } +{ #category : 'tests' } SpNotificationCenterTest >> testAddingOverTheLimitCutFirst [ | f center | - center := SpNotificationCenter new. + center := SpApplication new notificationCenter. 1 to: 35 do: [ :each | f := SpNotificationItem with: each printString. center add: f ] . @@ -26,11 +28,11 @@ SpNotificationCenterTest >> testAddingOverTheLimitCutFirst [ self assert: center items size equals: center limit ] -{ #category : #tests } +{ #category : 'tests' } SpNotificationCenterTest >> testAddingOverTheLimitRemoveBuldElements [ | f center | - center := SpNotificationCenter new. + center := SpApplication new notificationCenter. 1 to: 32 do: [ :each | f := SpNotificationItem with: each printString. center add: f ] . @@ -39,12 +41,12 @@ SpNotificationCenterTest >> testAddingOverTheLimitRemoveBuldElements [ self assert: center items size equals: center limit - center bulkSize + (32 - center limit) ] -{ #category : #tests } +{ #category : 'tests' } SpNotificationCenterTest >> testItemsAreOrderedLIFO [ | f center f2 | f := SpNotificationItem with: 'first'. - center := SpNotificationCenter new. + center := SpApplication new notificationCenter. center add: f. f2 := SpNotificationItem with: 'second'. center add: f2. diff --git a/src/Spec2-Tests/SpNotificationTest.class.st b/src/Spec2-Tests/SpNotificationTest.class.st index e71eec6b9..a81e4696a 100644 --- a/src/Spec2-Tests/SpNotificationTest.class.st +++ b/src/Spec2-Tests/SpNotificationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpNotificationTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Notifications' + #name : 'SpNotificationTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Notifications', + #package : 'Spec2-Tests', + #tag : 'Notifications' } -{ #category : #tests } +{ #category : 'tests' } SpNotificationTest >> testNotificationIsKeptAround [ | pres app | diff --git a/src/Spec2-Tests/SpNumberInputFieldPresenterTest.class.st b/src/Spec2-Tests/SpNumberInputFieldPresenterTest.class.st index 03d011666..a9e176ea0 100644 --- a/src/Spec2-Tests/SpNumberInputFieldPresenterTest.class.st +++ b/src/Spec2-Tests/SpNumberInputFieldPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpNumberInputFieldPresenterTest, - #superclass : #SpTextInputFieldPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpNumberInputFieldPresenterTest', + #superclass : 'SpTextInputFieldPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpNumberInputFieldPresenterTest >> classToTest [ ^ SpNumberInputFieldPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenClimbRateChangedDo [ | count result | count := 0. @@ -22,7 +24,7 @@ SpNumberInputFieldPresenterTest >> testWhenClimbRateChangedDo [ self assert: result equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenDigitsChangedDo [ | count result | count := 0. @@ -35,7 +37,7 @@ SpNumberInputFieldPresenterTest >> testWhenDigitsChangedDo [ self assert: result equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenMaximumChangedDo [ | count result | count := 0. @@ -48,7 +50,7 @@ SpNumberInputFieldPresenterTest >> testWhenMaximumChangedDo [ self assert: result equals: 10 ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenMinimumChangedDo [ | count result | count := 0. @@ -61,7 +63,7 @@ SpNumberInputFieldPresenterTest >> testWhenMinimumChangedDo [ self assert: result equals: 10 ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenNumberChangedDo [ | count result | count := 0. @@ -74,7 +76,7 @@ SpNumberInputFieldPresenterTest >> testWhenNumberChangedDo [ self assert: result equals: 10 ] -{ #category : #tests } +{ #category : 'tests' } SpNumberInputFieldPresenterTest >> testWhenNumberTypeChangedDo [ | count result | count := 0. diff --git a/src/Spec2-Tests/SpOpenOnIntExampleTest.class.st b/src/Spec2-Tests/SpOpenOnIntExampleTest.class.st index ac126f360..82d0f62f4 100644 --- a/src/Spec2-Tests/SpOpenOnIntExampleTest.class.st +++ b/src/Spec2-Tests/SpOpenOnIntExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpOpenOnIntExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples-Wrapper' + #name : 'SpOpenOnIntExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples-Wrapper', + #package : 'Spec2-Tests', + #tag : 'Examples-Wrapper' } -{ #category : #accessing } +{ #category : 'accessing' } SpOpenOnIntExampleTest >> classToTest [ ^ SpOpenOnIntExample ] diff --git a/src/Spec2-Tests/SpOpenOnNilExampleTest.class.st b/src/Spec2-Tests/SpOpenOnNilExampleTest.class.st index f80f0a223..bfa3f6ae7 100644 --- a/src/Spec2-Tests/SpOpenOnNilExampleTest.class.st +++ b/src/Spec2-Tests/SpOpenOnNilExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpOpenOnNilExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples-Wrapper' + #name : 'SpOpenOnNilExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples-Wrapper', + #package : 'Spec2-Tests', + #tag : 'Examples-Wrapper' } -{ #category : #accessing } +{ #category : 'accessing' } SpOpenOnNilExampleTest >> classToTest [ ^ SpOpenOnNilExample ] diff --git a/src/Spec2-Tests/SpOpenOnStringExampleTest.class.st b/src/Spec2-Tests/SpOpenOnStringExampleTest.class.st index a2423a230..e303db181 100644 --- a/src/Spec2-Tests/SpOpenOnStringExampleTest.class.st +++ b/src/Spec2-Tests/SpOpenOnStringExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpOpenOnStringExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples-Wrapper' + #name : 'SpOpenOnStringExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples-Wrapper', + #package : 'Spec2-Tests', + #tag : 'Examples-Wrapper' } -{ #category : #accessing } +{ #category : 'accessing' } SpOpenOnStringExampleTest >> classToTest [ ^ SpOpenOnStringExample ] diff --git a/src/Spec2-Tests/SpOptionListPresenterTest.class.st b/src/Spec2-Tests/SpOptionListPresenterTest.class.st index 4c439ba15..7630fc9dc 100644 --- a/src/Spec2-Tests/SpOptionListPresenterTest.class.st +++ b/src/Spec2-Tests/SpOptionListPresenterTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #SpOptionListPresenterTest, - #superclass : #TestCase, + #name : 'SpOptionListPresenterTest', + #superclass : 'TestCase', #instVars : [ 'dialog' ], - #category : #'Spec2-Tests-Common-Widgets' + #category : 'Spec2-Tests-Common-Widgets', + #package : 'Spec2-Tests', + #tag : 'Common-Widgets' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SpOptionListPresenterTest >> newOptionsPresenterWithOneOption [ | optionPresenterClass optionPresenter presenter | @@ -23,7 +25,7 @@ SpOptionListPresenterTest >> newOptionsPresenterWithOneOption [ ^ presenter ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } SpOptionListPresenterTest >> newOptionsPresenterWithTwoOptions [ | optionPresenterClass optionPresenter presenter | @@ -46,13 +48,13 @@ SpOptionListPresenterTest >> newOptionsPresenterWithTwoOptions [ ^ presenter ] -{ #category : #running } +{ #category : 'running' } SpOptionListPresenterTest >> tearDown [ dialog ifNotNil: [ :d | d delete]. super tearDown . ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testContentPanelIsEmptyWhenNoSelection [ | presenterClass presenter | presenterClass := SpOptionListPresenter newAnonymousSubclass. @@ -64,7 +66,7 @@ SpOptionListPresenterTest >> testContentPanelIsEmptyWhenNoSelection [ self assertEmpty: presenter contentLayout. ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testContentPanelIsUpdatedWhenSelectionChanges [ | presenter optionPanel | presenter := SpOptionListExample new. @@ -80,7 +82,7 @@ SpOptionListPresenterTest >> testContentPanelIsUpdatedWhenSelectionChanges [ equals: presenter allOptions second class. ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testDoAcceptIsExecutedOnSelectedOptionWhenAcceptingDialog [ | presenter optionPresenter | @@ -95,7 +97,7 @@ SpOptionListPresenterTest >> testDoAcceptIsExecutedOnSelectedOptionWhenAccepting ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testDoAcceptIsNotExecutedOnSelectedOptionWhenCancelingDialog [ | presenter optionPresenter | @@ -110,7 +112,7 @@ SpOptionListPresenterTest >> testDoAcceptIsNotExecutedOnSelectedOptionWhenCancel ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testFirstOptionIsSelectedWhenOpening [ | presenter | presenter := SpOptionListExample new. @@ -121,7 +123,7 @@ SpOptionListPresenterTest >> testFirstOptionIsSelectedWhenOpening [ equals: (presenter optionAt: 1) ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testOptionListItemHasIcon [ | presenter optionIndex iconColumn icon | presenter := SpOptionListExample new. @@ -135,7 +137,7 @@ SpOptionListPresenterTest >> testOptionListItemHasIcon [ equals: presenter allOptions first optionIcon ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testOptionListItemHasTitle [ | presenter optionIndex titleColumn icon | presenter := SpOptionListExample new. @@ -149,7 +151,7 @@ SpOptionListPresenterTest >> testOptionListItemHasTitle [ equals: presenter allOptions first optionTitle ] -{ #category : #'tests - validation' } +{ #category : 'tests - validation' } SpOptionListPresenterTest >> testValidationIsCalledOnSelectedOptionPresenter [ | presenter optionPresenter | @@ -164,7 +166,7 @@ SpOptionListPresenterTest >> testValidationIsCalledOnSelectedOptionPresenter [ self assert: (optionPresenter class propertyAt: #validated) equals: true. ] -{ #category : #'tests - validation' } +{ #category : 'tests - validation' } SpOptionListPresenterTest >> testValidationIsNotCalledOnNotSelectedOptionPresenters [ | presenter optionPresenter | @@ -179,7 +181,7 @@ SpOptionListPresenterTest >> testValidationIsNotCalledOnNotSelectedOptionPresent self assert: (optionPresenter class propertyAt: #validated) equals: nil. ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testWhenAcceptedDoIsExecutedWhenAcceptingDialog [ | presenter executed | @@ -194,7 +196,7 @@ SpOptionListPresenterTest >> testWhenAcceptedDoIsExecutedWhenAcceptingDialog [ ] -{ #category : #tests } +{ #category : 'tests' } SpOptionListPresenterTest >> testWhenAcceptedDoIsNotExecutedWhenCancelingDialog [ | presenter executed | diff --git a/src/Spec2-Tests/SpOptionPresenterTest.class.st b/src/Spec2-Tests/SpOptionPresenterTest.class.st index 4cbce959e..2222e786e 100644 --- a/src/Spec2-Tests/SpOptionPresenterTest.class.st +++ b/src/Spec2-Tests/SpOptionPresenterTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #SpOptionPresenterTest, - #superclass : #TestCase, + #name : 'SpOptionPresenterTest', + #superclass : 'TestCase', #instVars : [ 'optionPresenterClass' ], - #category : #'Spec2-Tests-Common-Widgets' + #category : 'Spec2-Tests-Common-Widgets', + #package : 'Spec2-Tests', + #tag : 'Common-Widgets' } -{ #category : #running } +{ #category : 'running' } SpOptionPresenterTest >> setUp [ super setUp. @@ -20,7 +22,7 @@ SpOptionPresenterTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } SpOptionPresenterTest >> testValidationFailsWhenValidationsNotSatisfied [ | optionPresenter validationReport | @@ -39,7 +41,7 @@ SpOptionPresenterTest >> testValidationFailsWhenValidationsNotSatisfied [ self assert: validationReport errors first target equals: optionPresenter input. ] -{ #category : #tests } +{ #category : 'tests' } SpOptionPresenterTest >> testValidationSucceedsWhenValidationsSatisfied [ | optionPresenter validationReport | diff --git a/src/Spec2-Tests/SpOverlayLayoutTest.class.st b/src/Spec2-Tests/SpOverlayLayoutTest.class.st index 12f6d4bf0..96d62fb2e 100644 --- a/src/Spec2-Tests/SpOverlayLayoutTest.class.st +++ b/src/Spec2-Tests/SpOverlayLayoutTest.class.st @@ -1,31 +1,33 @@ Class { - #name : #SpOverlayLayoutTest, - #superclass : #SpLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpOverlayLayoutTest', + #superclass : 'SpLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #initialization } +{ #category : 'initialization' } SpOverlayLayoutTest >> initializeTestedInstance [ layout := SpOverlayLayout new. presenter layout: layout ] -{ #category : #tests } +{ #category : 'tests' } SpOverlayLayoutTest >> testLayoutWithOneElementIsNotEmpty [ layout child: SpButtonPresenter new. self deny: layout isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpOverlayLayoutTest >> testLayoutWithOverlayWidgetIsNotEmpty [ layout addOverlay: SpButtonPresenter new. self deny: layout isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpOverlayLayoutTest >> testRemoveElementFromLayoutTakesItOut [ | element | @@ -34,7 +36,7 @@ SpOverlayLayoutTest >> testRemoveElementFromLayoutTakesItOut [ self assert: layout isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpOverlayLayoutTest >> testRemoveOverlayFromLayoutTakesItOut [ | element | @@ -43,7 +45,7 @@ SpOverlayLayoutTest >> testRemoveOverlayFromLayoutTakesItOut [ self assert: layout isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpOverlayLayoutTest >> testReplaceElementKeepsSingleElement [ | replacement | diff --git a/src/Spec2-Tests/SpPanedLayoutTest.class.st b/src/Spec2-Tests/SpPanedLayoutTest.class.st index ece52b20b..f1cf1db1e 100644 --- a/src/Spec2-Tests/SpPanedLayoutTest.class.st +++ b/src/Spec2-Tests/SpPanedLayoutTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #SpPanedLayoutTest, - #superclass : #SpLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpPanedLayoutTest', + #superclass : 'SpLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #testing } +{ #category : 'testing' } SpPanedLayoutTest class >> isAbstract [ ^ self == SpPanedLayoutTest ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testElementsAreAddedInOrder [ | second | @@ -19,7 +21,7 @@ SpPanedLayoutTest >> testElementsAreAddedInOrder [ self assert: layout children last equals: second ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testElementsAreAddedInOrderIndependentlyOfTheConfigurationOrder [ | second | @@ -28,7 +30,7 @@ SpPanedLayoutTest >> testElementsAreAddedInOrderIndependentlyOfTheConfigurationO self assert: layout children last equals: second ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testElementsAreAddedInOrderWhenUsingAdd [ | second | @@ -37,7 +39,7 @@ SpPanedLayoutTest >> testElementsAreAddedInOrderWhenUsingAdd [ self assert: layout children last equals: second ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testElementsAreAddedInOrderWhenUsingAddWithConstraints [ | second | @@ -46,21 +48,21 @@ SpPanedLayoutTest >> testElementsAreAddedInOrderWhenUsingAddWithConstraints [ self assert: layout children last equals: second ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testLayoutWithOneFirstElementIsNotEmpty [ layout first: SpButtonPresenter new. self deny: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testLayoutWithOneSecondElementIsNotEmpty [ layout second: SpButtonPresenter new. self deny: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testRemoveFirstElementFromLayoutTakesItOut [ | element | @@ -69,7 +71,7 @@ SpPanedLayoutTest >> testRemoveFirstElementFromLayoutTakesItOut [ self assert: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testRemoveSecondElementFromLayoutTakesItOut [ | element | @@ -78,7 +80,7 @@ SpPanedLayoutTest >> testRemoveSecondElementFromLayoutTakesItOut [ self assert: layout isEmpty ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceFirst [ | replacement | @@ -87,7 +89,7 @@ SpPanedLayoutTest >> testReplaceFirst [ self assert: layout children first equals: replacement ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceFirstElementKeepsSingleElement [ | replacement | @@ -96,7 +98,7 @@ SpPanedLayoutTest >> testReplaceFirstElementKeepsSingleElement [ self assert: layout children size equals: 1 ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceFirstElementReplacesIt [ | replacement | @@ -105,7 +107,7 @@ SpPanedLayoutTest >> testReplaceFirstElementReplacesIt [ self assert: layout children first equals: replacement ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceSecond [ | replacement | @@ -115,7 +117,7 @@ SpPanedLayoutTest >> testReplaceSecond [ self assert: layout children second equals: replacement ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceSecondElementKeepsSingleElement [ | replacement | @@ -124,7 +126,7 @@ SpPanedLayoutTest >> testReplaceSecondElementKeepsSingleElement [ self assert: layout children size equals: 1 ] -{ #category : #running } +{ #category : 'running' } SpPanedLayoutTest >> testReplaceSecondElementReplacesIt [ | replacement | diff --git a/src/Spec2-Tests/SpPopoverPresenterTest.class.st b/src/Spec2-Tests/SpPopoverPresenterTest.class.st index f972c29ac..f814e7518 100644 --- a/src/Spec2-Tests/SpPopoverPresenterTest.class.st +++ b/src/Spec2-Tests/SpPopoverPresenterTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #SpPopoverPresenterTest, - #superclass : #SpSmokeTest, + #name : 'SpPopoverPresenterTest', + #superclass : 'SpSmokeTest', #instVars : [ 'ownerPresenter' ], - #category : #'Spec2-Tests-Core-Widgets' + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpPopoverPresenterTest >> classToTest [ ^ SpPopoverPresenter ] -{ #category : #initialization } +{ #category : 'initialization' } SpPopoverPresenterTest >> initializeTestedInstance [ "Adding an owner to be sure it some functions (relative to its owner/referenced object) @@ -33,7 +35,7 @@ SpPopoverPresenterTest >> initializeTestedInstance [ yourself) ] -{ #category : #tests } +{ #category : 'tests' } SpPopoverPresenterTest >> testPopoverPopupTakesExtentFromPresenter [ [ @@ -50,7 +52,7 @@ SpPopoverPresenterTest >> testPopoverPopupTakesExtentFromPresenter [ presenter dismiss ] ] -{ #category : #tests } +{ #category : 'tests' } SpPopoverPresenterTest >> testPopoverPopupTextTakesExtentFromPresenter [ [ @@ -76,7 +78,7 @@ SpPopoverPresenterTest >> testPopoverPopupTextTakesExtentFromPresenter [ presenter dismiss ] ] -{ #category : #tests } +{ #category : 'tests' } SpPopoverPresenterTest >> testPopoverTakesExtentFromPresenter [ self openInstance. diff --git a/src/Spec2-Tests/SpPresenterTest.class.st b/src/Spec2-Tests/SpPresenterTest.class.st index 0ebb08086..7096f9485 100644 --- a/src/Spec2-Tests/SpPresenterTest.class.st +++ b/src/Spec2-Tests/SpPresenterTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #SpPresenterTest, - #superclass : #TestCase, + #name : 'SpPresenterTest', + #superclass : 'TestCase', #instVars : [ 'presenter' ], - #category : #'Spec2-Tests-Core' + #category : 'Spec2-Tests-Core', + #package : 'Spec2-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testAdapterDoesNotRemainsAsDependencyWhenReplacingIt [ presenter := SpPresenter new. @@ -23,7 +25,7 @@ SpPresenterTest >> testAdapterDoesNotRemainsAsDependencyWhenReplacingIt [ self assert: presenter dependents size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testAsDialogWindow [ presenter := SpPresenter new. @@ -32,7 +34,7 @@ SpPresenterTest >> testAsDialogWindow [ equals: presenter application defaultDialogWindowPresenterClass ] -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testAsModalWindow [ presenter := SpPresenter new. @@ -41,7 +43,7 @@ SpPresenterTest >> testAsModalWindow [ equals: presenter application defaultModalWindowPresenterClass ] -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testAsWindow [ presenter := SpPresenter new. @@ -50,7 +52,7 @@ SpPresenterTest >> testAsWindow [ equals: presenter application defaultWindowPresenterClass ] -{ #category : #'tests - layout' } +{ #category : 'tests - layout' } SpPresenterTest >> testLayoutIsDefaultLayoutWhenDefaultLayoutAndDefaultSpecDefined [ | presenterClass | @@ -64,7 +66,7 @@ SpPresenterTest >> testLayoutIsDefaultLayoutWhenDefaultLayoutAndDefaultSpecDefin equals: SpGridLayout ] -{ #category : #'tests - layout' } +{ #category : 'tests - layout' } SpPresenterTest >> testLayoutIsNotSetWhenAlreadyInitialized [ | presenterClass | @@ -78,7 +80,7 @@ SpPresenterTest >> testLayoutIsNotSetWhenAlreadyInitialized [ equals: SpBoxLayout ] -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testPresentersIncludesPresentersAddedToTheLayout [ | p1 p2 | @@ -91,7 +93,7 @@ SpPresenterTest >> testPresentersIncludesPresentersAddedToTheLayout [ self assert: presenter presenters equals: { p1. p2 } ] -{ #category : #tests } +{ #category : 'tests' } SpPresenterTest >> testTraversePresentersDoIncludesPresentersAddedToTheLayout [ | p1 p2 result | diff --git a/src/Spec2-Tests/SpRadioButtonExampleTest.class.st b/src/Spec2-Tests/SpRadioButtonExampleTest.class.st index 18e09a958..93dbd4163 100644 --- a/src/Spec2-Tests/SpRadioButtonExampleTest.class.st +++ b/src/Spec2-Tests/SpRadioButtonExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpRadioButtonExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpRadioButtonExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpRadioButtonExampleTest >> classToTest [ ^ SpRadioButtonExample ] diff --git a/src/Spec2-Tests/SpRadioButtonPresenterTest.class.st b/src/Spec2-Tests/SpRadioButtonPresenterTest.class.st index cb425c12e..053b4c869 100644 --- a/src/Spec2-Tests/SpRadioButtonPresenterTest.class.st +++ b/src/Spec2-Tests/SpRadioButtonPresenterTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpRadioButtonPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpRadioButtonPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpRadioButtonPresenterTest >> classToTest [ ^ SpRadioButtonPresenter ] diff --git a/src/Spec2-Tests/SpRequiredFieldValidationTest.class.st b/src/Spec2-Tests/SpRequiredFieldValidationTest.class.st index e8ef50dc1..75c2c2d74 100644 --- a/src/Spec2-Tests/SpRequiredFieldValidationTest.class.st +++ b/src/Spec2-Tests/SpRequiredFieldValidationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpRequiredFieldValidationTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpRequiredFieldValidationTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #tests } +{ #category : 'tests' } SpRequiredFieldValidationTest >> testValidationIsKoWhenTextIsEmpty [ | validation presenter | presenter := SpTextInputFieldPresenter new @@ -15,7 +17,7 @@ SpRequiredFieldValidationTest >> testValidationIsKoWhenTextIsEmpty [ self deny: (validation isValid: presenter ) ] -{ #category : #tests } +{ #category : 'tests' } SpRequiredFieldValidationTest >> testValidationIsKoWhenTextIsNil [ | validation presenter | presenter := SpTextInputFieldPresenter new @@ -26,7 +28,7 @@ SpRequiredFieldValidationTest >> testValidationIsKoWhenTextIsNil [ self deny: (validation isValid: presenter ) ] -{ #category : #tests } +{ #category : 'tests' } SpRequiredFieldValidationTest >> testValidationIsKoWhenTextOnlyHasWhiteSpaces [ | validation presenter | presenter := SpTextInputFieldPresenter new @@ -37,7 +39,7 @@ SpRequiredFieldValidationTest >> testValidationIsKoWhenTextOnlyHasWhiteSpaces [ self deny: (validation isValid: presenter ) ] -{ #category : #tests } +{ #category : 'tests' } SpRequiredFieldValidationTest >> testValidationIsOkWhenTextContainsOneChar [ | validation presenter | presenter := SpTextInputFieldPresenter new diff --git a/src/Spec2-Tests/SpSingleSelectionModeTest.class.st b/src/Spec2-Tests/SpSingleSelectionModeTest.class.st index 8efed4e46..ec6b1ff5a 100644 --- a/src/Spec2-Tests/SpSingleSelectionModeTest.class.st +++ b/src/Spec2-Tests/SpSingleSelectionModeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpSingleSelectionModeTest, - #superclass : #SpAbstractSelectionModeTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpSingleSelectionModeTest', + #superclass : 'SpAbstractSelectionModeTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testDropListSelectionIsNotAffectedBySorting [ "To get the proper selection when a presenter is sorted, the selection asks the adapter to return the right element according to the sorting. @@ -20,7 +22,7 @@ SpSingleSelectionModeTest >> testDropListSelectionIsNotAffectedBySorting [ self assert: presenter selection selectedItem model equals: 3 ] -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testDropListSelectionIsResetAfterItemsAssignment [ presenter := SpDropListPresenter new. presenter @@ -34,7 +36,7 @@ SpSingleSelectionModeTest >> testDropListSelectionIsResetAfterItemsAssignment [ equals: nil ] -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testGetRightElementAfterSortingOfElementsChanged [ presenter := SpTablePresenter new. "use a TablePresenter since ListPresenter cannot sort" @@ -51,7 +53,7 @@ SpSingleSelectionModeTest >> testGetRightElementAfterSortingOfElementsChanged [ self assert: presenter selection selectedItem equals: 8 ] -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testSelectionIsResetAfterItemsAssignment [ presenter @@ -64,7 +66,7 @@ SpSingleSelectionModeTest >> testSelectionIsResetAfterItemsAssignment [ self assert: presenter selection selectedItem equals: nil ] -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testSelectionIsResetAfterSorting [ presenter := SpTablePresenter new. "use a TablePresenter since ListPresenter cannot sort" @@ -83,7 +85,7 @@ SpSingleSelectionModeTest >> testSelectionIsResetAfterSorting [ self assert: presenter selection selectedItem equals: nil ] -{ #category : #tests } +{ #category : 'tests' } SpSingleSelectionModeTest >> testSubscriptionsAreTransfered [ | count | count := 0. diff --git a/src/Spec2-Tests/SpSliderInputPresenterTest.class.st b/src/Spec2-Tests/SpSliderInputPresenterTest.class.st index 3049a2486..95200dc3a 100644 --- a/src/Spec2-Tests/SpSliderInputPresenterTest.class.st +++ b/src/Spec2-Tests/SpSliderInputPresenterTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpSliderInputPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpSliderInputPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpSliderInputPresenterTest >> classToTest [ ^ SpSliderInputPresenter ] diff --git a/src/Spec2-Tests/SpSliderPresenterTest.class.st b/src/Spec2-Tests/SpSliderPresenterTest.class.st index 4854db294..a8731c407 100644 --- a/src/Spec2-Tests/SpSliderPresenterTest.class.st +++ b/src/Spec2-Tests/SpSliderPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpSliderPresenterTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpSliderPresenterTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpSliderPresenterTest >> classToTest [ ^ SpSliderPresenter ] -{ #category : #initialization } +{ #category : 'initialization' } SpSliderPresenterTest >> initMinMax [ presenter @@ -17,20 +19,20 @@ SpSliderPresenterTest >> initMinMax [ max: 100 ] -{ #category : #tests } +{ #category : 'tests' } SpSliderPresenterTest >> testAbsoluteValue [ self initMinMax. presenter absoluteValue: 0.5. self assert: presenter value == 50 ] -{ #category : #tests } +{ #category : 'tests' } SpSliderPresenterTest >> testAbsoluteValueToValueScales [ self initMinMax. self assert: (presenter absoluteValueToValue: 0.5) equals: 50 ] -{ #category : #tests } +{ #category : 'tests' } SpSliderPresenterTest >> testReset [ self initMinMax. presenter @@ -39,7 +41,7 @@ SpSliderPresenterTest >> testReset [ self assert: presenter value == 0 ] -{ #category : #tests } +{ #category : 'tests' } SpSliderPresenterTest >> testValueToAbsoluteValueScales [ self initMinMax. self assert: (presenter valueToAbsoluteValue: 50) equals: 0.5 diff --git a/src/Spec2-Tests/SpSmokeTest.class.st b/src/Spec2-Tests/SpSmokeTest.class.st index a51543699..622efe276 100644 --- a/src/Spec2-Tests/SpSmokeTest.class.st +++ b/src/Spec2-Tests/SpSmokeTest.class.st @@ -9,22 +9,24 @@ I provide openInstance and openInstance: to open it. These methods make me keep - testExample tests the class side method example if exist, example should be a representative use. " Class { - #name : #SpSmokeTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Utils' + #name : 'SpSmokeTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #testing } +{ #category : 'testing' } SpSmokeTest class >> isAbstract [ ^ self name = #SpSmokeTest ] -{ #category : #testing } +{ #category : 'testing' } SpSmokeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #tests } +{ #category : 'tests' } SpSmokeTest >> testExample [ "We do not use #shouldnt:raise: to get feedback on the CI" @@ -42,7 +44,7 @@ SpSmokeTest >> testExample [ ' , e signalerContext shortStack ] ] -{ #category : #tests } +{ #category : 'tests' } SpSmokeTest >> testOpen [ "We do not use #shouldnt:raise: to get feedback on the CI" diff --git a/src/Spec2-Tests/SpSpecTest.class.st b/src/Spec2-Tests/SpSpecTest.class.st index c582e78ef..1e731f934 100644 --- a/src/Spec2-Tests/SpSpecTest.class.st +++ b/src/Spec2-Tests/SpSpecTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpSpecTest, - #superclass : #SpBaseTest, - #category : #'Spec2-Tests-Utils' + #name : 'SpSpecTest', + #superclass : 'SpBaseTest', + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #testing } +{ #category : 'testing' } SpSpecTest class >> isAbstract [ ^ self = SpSpecTest ] diff --git a/src/Spec2-Tests/SpStringTableColumnTest.class.st b/src/Spec2-Tests/SpStringTableColumnTest.class.st index 430411da9..0f4096fac 100644 --- a/src/Spec2-Tests/SpStringTableColumnTest.class.st +++ b/src/Spec2-Tests/SpStringTableColumnTest.class.st @@ -2,12 +2,14 @@ A SpStringTableColumnTest is a test class for testing the behavior of SpStringTableColumn " Class { - #name : #SpStringTableColumnTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpStringTableColumnTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #tests } +{ #category : 'tests' } SpStringTableColumnTest >> testIsSortable [ |widget| widget := SpStringTableColumn new. diff --git a/src/Spec2-Tests/SpTablePresenterTest.class.st b/src/Spec2-Tests/SpTablePresenterTest.class.st index 598f6bd61..cc85dcdaf 100644 --- a/src/Spec2-Tests/SpTablePresenterTest.class.st +++ b/src/Spec2-Tests/SpTablePresenterTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #SpTablePresenterTest, - #superclass : #SpAbstractListPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTablePresenterTest', + #superclass : 'SpAbstractListPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTablePresenterTest >> classToTest [ ^ SpTablePresenter ] -{ #category : #running } +{ #category : 'running' } SpTablePresenterTest >> tearDown [ presenter delete. super tearDown. ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testAddColumnRaisesColumnChangedEvent [ | columnsChanged | @@ -28,7 +30,7 @@ SpTablePresenterTest >> testAddColumnRaisesColumnChangedEvent [ self assert: columnsChanged ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testAddColumnRaisesOneEventOnly [ | count | @@ -40,7 +42,7 @@ SpTablePresenterTest >> testAddColumnRaisesOneEventOnly [ self assert: count equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpTablePresenterTest >> testGivenSortingIsActiveWhenAffectingNewItemsThenNewItemsAreSorted [ [ @@ -63,7 +65,7 @@ SpTablePresenterTest >> testGivenSortingIsActiveWhenAffectingNewItemsThenNewItem ensure: [ presenter delete ] ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testHideColumnHeadersDoesNotShowHeaders [ presenter hideColumnHeaders. @@ -71,7 +73,7 @@ SpTablePresenterTest >> testHideColumnHeadersDoesNotShowHeaders [ self deny: presenter isShowingColumnHeaders ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testHideColumnHeadersRaisesOneEventOnly [ | count | @@ -82,7 +84,7 @@ SpTablePresenterTest >> testHideColumnHeadersRaisesOneEventOnly [ self assert: count equals: 1 ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testRemoveColumnRaisesColumnChangedEvent [ | column columnsChanged | @@ -96,7 +98,7 @@ SpTablePresenterTest >> testRemoveColumnRaisesColumnChangedEvent [ self assert: columnsChanged ] -{ #category : #tests } +{ #category : 'tests' } SpTablePresenterTest >> testSelectedItemsReturnsRightElementAfterSortingOfElementsChanged [ [ @@ -117,7 +119,7 @@ SpTablePresenterTest >> testSelectedItemsReturnsRightElementAfterSortingOfElemen ensure: [ presenter delete ] ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testShowColumnHeadersRaisesOneEventOnly [ | count | @@ -128,7 +130,7 @@ SpTablePresenterTest >> testShowColumnHeadersRaisesOneEventOnly [ self assert: count equals: 1 ] -{ #category : #'tests - activation' } +{ #category : 'tests - activation' } SpTablePresenterTest >> testShowColumnHeadersShowHeaders [ presenter showColumnHeaders. diff --git a/src/Spec2-Tests/SpTestApplicationWithLocale.class.st b/src/Spec2-Tests/SpTestApplicationWithLocale.class.st index 9457d80a5..7b86275d8 100644 --- a/src/Spec2-Tests/SpTestApplicationWithLocale.class.st +++ b/src/Spec2-Tests/SpTestApplicationWithLocale.class.st @@ -1,13 +1,15 @@ Class { - #name : #SpTestApplicationWithLocale, - #superclass : #SpApplication, + #name : 'SpTestApplicationWithLocale', + #superclass : 'SpApplication', #instVars : [ 'locale' ], - #category : #'Spec2-Tests-Localization' + #category : 'Spec2-Tests-Localization', + #package : 'Spec2-Tests', + #tag : 'Localization' } -{ #category : #initialization } +{ #category : 'initialization' } SpTestApplicationWithLocale >> initialize [ super initialize. @@ -15,12 +17,12 @@ SpTestApplicationWithLocale >> initialize [ locale := Locale isoLanguage: 'en' isoCountry: 'US'. ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestApplicationWithLocale >> locale [ ^ locale ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestApplicationWithLocale >> locale: anObject [ locale := anObject ] diff --git a/src/Spec2-Tests/SpTestLocalizedString.class.st b/src/Spec2-Tests/SpTestLocalizedString.class.st index 8398db7b4..daef2b30a 100644 --- a/src/Spec2-Tests/SpTestLocalizedString.class.st +++ b/src/Spec2-Tests/SpTestLocalizedString.class.st @@ -1,38 +1,40 @@ Class { - #name : #SpTestLocalizedString, - #superclass : #Object, + #name : 'SpTestLocalizedString', + #superclass : 'Object', #instVars : [ 'string', 'requestsCount' ], - #category : #'Spec2-Tests-Localization' + #category : 'Spec2-Tests-Localization', + #package : 'Spec2-Tests', + #tag : 'Localization' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SpTestLocalizedString class >> from: aString [ ^ self new string: aString ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> asString [ ^ string asString ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestLocalizedString >> initialize [ super initialize. requestsCount := 0 ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> isEmptyOrNil [ ^ self string isEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> localizedForPresenter: aPresenter [ requestsCount := requestsCount + 1. @@ -40,17 +42,17 @@ SpTestLocalizedString >> localizedForPresenter: aPresenter [ ^ string, '[', aPresenter locale localeID isoString, '](', requestsCount asString, ')' ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> string [ ^ string ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> string: anObject [ string := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestLocalizedString >> withAccentuatedCharacter: aCharacter [ diff --git a/src/Spec2-Tests/SpTestPresenterWithToolbar.class.st b/src/Spec2-Tests/SpTestPresenterWithToolbar.class.st index 7962045eb..f9e2a04e2 100644 --- a/src/Spec2-Tests/SpTestPresenterWithToolbar.class.st +++ b/src/Spec2-Tests/SpTestPresenterWithToolbar.class.st @@ -2,15 +2,17 @@ A presenter with a tollbar and a button to use in Window / World tests. " Class { - #name : #SpTestPresenterWithToolbar, - #superclass : #SpPresenter, + #name : 'SpTestPresenterWithToolbar', + #superclass : 'SpPresenter', #instVars : [ 'button' ], - #category : #'Spec2-Tests-Core-Support' + #category : 'Spec2-Tests-Core-Support', + #package : 'Spec2-Tests', + #tag : 'Core-Support' } -{ #category : #layout } +{ #category : 'layout' } SpTestPresenterWithToolbar class >> defaultLayout [ ^ SpBoxLayout newTopToBottom @@ -20,14 +22,14 @@ SpTestPresenterWithToolbar class >> defaultLayout [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestPresenterWithToolbar >> initializePresenters [ button := self newButton label: 'test'; yourself. ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestPresenterWithToolbar >> initializeWindow: aWindowPresenter [ | toolbar | toolbar := SpToolbarPresenter new diff --git a/src/Spec2-Tests/SpTestingPointModel.class.st b/src/Spec2-Tests/SpTestingPointModel.class.st index 4eeede74f..91fda9c56 100644 --- a/src/Spec2-Tests/SpTestingPointModel.class.st +++ b/src/Spec2-Tests/SpTestingPointModel.class.st @@ -2,44 +2,46 @@ A testing model for testing of the class ComposablePresenterWithModel " Class { - #name : #SpTestingPointModel, - #superclass : #Model, + #name : 'SpTestingPointModel', + #superclass : 'Model', #instVars : [ 'x', 'y' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SpTestingPointModel class >> x: xInteger y: yInteger [ ^ self new setX: xInteger setY: yInteger ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPointModel >> setX: xValue setY: yValue [ x := xValue. y := yValue ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPointModel >> x [ ^ x ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPointModel >> x: anObject [ x := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPointModel >> y [ ^ y ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPointModel >> y: anObject [ y := anObject ] diff --git a/src/Spec2-Tests/SpTestingPresenter.class.st b/src/Spec2-Tests/SpTestingPresenter.class.st index 548f12f99..d4c71ce7a 100644 --- a/src/Spec2-Tests/SpTestingPresenter.class.st +++ b/src/Spec2-Tests/SpTestingPresenter.class.st @@ -2,38 +2,40 @@ A TestingComposablePresenter is a stupid composable model used to test SpecInterpreter. " Class { - #name : #SpTestingPresenter, - #superclass : #SpPresenter, + #name : 'SpTestingPresenter', + #superclass : 'SpPresenter', #instVars : [ 'list' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #layout } +{ #category : 'layout' } SpTestingPresenter class >> defaultLayout [ ^ SpBoxLayout newTopToBottom add: #list; yourself ] -{ #category : #specs } +{ #category : 'specs' } SpTestingPresenter class >> title [ ^ 'You should not see me !' ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenter >> getText [ ^ Text new ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestingPresenter >> initializePresenters [ list := self newList ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenter >> list [ ^ list diff --git a/src/Spec2-Tests/SpTestingPresenterWithAdditionalPresenters.class.st b/src/Spec2-Tests/SpTestingPresenterWithAdditionalPresenters.class.st index cad84b571..c45db6696 100644 --- a/src/Spec2-Tests/SpTestingPresenterWithAdditionalPresenters.class.st +++ b/src/Spec2-Tests/SpTestingPresenterWithAdditionalPresenters.class.st @@ -2,15 +2,17 @@ This presenter contains several subpresenters that are stored in additionalSubpresentersMap plus one presenter that is stored in instance variable but does not have any public accessors. " Class { - #name : #SpTestingPresenterWithAdditionalPresenters, - #superclass : #SpPresenter, + #name : 'SpTestingPresenterWithAdditionalPresenters', + #superclass : 'SpPresenter', #instVars : [ 'subpresenter4' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #layout } +{ #category : 'layout' } SpTestingPresenterWithAdditionalPresenters class >> defaultLayout [ | aLayout | @@ -20,13 +22,13 @@ SpTestingPresenterWithAdditionalPresenters class >> defaultLayout [ ^ aLayout ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenterWithAdditionalPresenters class >> keys [ ^ #(subpresenter1 subpresenter2 subpresenter3) ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestingPresenterWithAdditionalPresenters >> initializePresenters [ self class keys do: [ :aKey | diff --git a/src/Spec2-Tests/SpTestingPresenterWithModel.class.st b/src/Spec2-Tests/SpTestingPresenterWithModel.class.st index 57d831641..2e22435ab 100644 --- a/src/Spec2-Tests/SpTestingPresenterWithModel.class.st +++ b/src/Spec2-Tests/SpTestingPresenterWithModel.class.st @@ -7,16 +7,18 @@ A testing presenter for testing of the class SpPresenterWithModel presenter openWithSpec " Class { - #name : #SpTestingPresenterWithModel, - #superclass : #SpPresenterWithModel, + #name : 'SpTestingPresenterWithModel', + #superclass : 'SpPresenterWithModel', #instVars : [ 'x', 'y' ], - #category : #'Spec2-Tests-Utils' + #category : 'Spec2-Tests-Utils', + #package : 'Spec2-Tests', + #tag : 'Utils' } -{ #category : #layout } +{ #category : 'layout' } SpTestingPresenterWithModel class >> defaultLayout [ ^ SpBoxLayout newLeftToRight add: #x; @@ -24,7 +26,7 @@ SpTestingPresenterWithModel class >> defaultLayout [ yourself ] -{ #category : #specs } +{ #category : 'specs' } SpTestingPresenterWithModel class >> open [ @@ -32,14 +34,14 @@ SpTestingPresenterWithModel class >> open [ (self on: 1@2) open ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestingPresenterWithModel >> initializePresenters [ x := self newTextInput. y := self newTextInput. ] -{ #category : #initialization } +{ #category : 'initialization' } SpTestingPresenterWithModel >> modelChanged [ x text: self model x asString. @@ -47,28 +49,28 @@ SpTestingPresenterWithModel >> modelChanged [ ] -{ #category : #api } +{ #category : 'api' } SpTestingPresenterWithModel >> title [ ^ 'Point' ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenterWithModel >> x [ ^ x ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenterWithModel >> x: anObject [ x := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenterWithModel >> y [ ^ y ] -{ #category : #accessing } +{ #category : 'accessing' } SpTestingPresenterWithModel >> y: anObject [ y := anObject ] diff --git a/src/Spec2-Tests/SpTextFieldExampleTest.class.st b/src/Spec2-Tests/SpTextFieldExampleTest.class.st index 7a999afcd..4b8f3af92 100644 --- a/src/Spec2-Tests/SpTextFieldExampleTest.class.st +++ b/src/Spec2-Tests/SpTextFieldExampleTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpTextFieldExampleTest, - #superclass : #SpSmokeTest, - #category : #'Spec2-Tests-Examples' + #name : 'SpTextFieldExampleTest', + #superclass : 'SpSmokeTest', + #category : 'Spec2-Tests-Examples', + #package : 'Spec2-Tests', + #tag : 'Examples' } -{ #category : #accessing } +{ #category : 'accessing' } SpTextFieldExampleTest >> classToTest [ ^ SpTextFieldExample ] diff --git a/src/Spec2-Tests/SpTextInputFieldPresenterTest.class.st b/src/Spec2-Tests/SpTextInputFieldPresenterTest.class.st index ad7466bd7..9e6d3093c 100644 --- a/src/Spec2-Tests/SpTextInputFieldPresenterTest.class.st +++ b/src/Spec2-Tests/SpTextInputFieldPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpTextInputFieldPresenterTest, - #superclass : #SpAbstractTextPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTextInputFieldPresenterTest', + #superclass : 'SpAbstractTextPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTextInputFieldPresenterTest >> classToTest [ ^ SpTextInputFieldPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testBeNotPasswordIsSet [ presenter bePassword: false. @@ -17,7 +19,7 @@ SpTextInputFieldPresenterTest >> testBeNotPasswordIsSet [ self deny: presenter isPassword ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testBePasswordIsSet [ presenter bePassword. @@ -25,37 +27,37 @@ SpTextInputFieldPresenterTest >> testBePasswordIsSet [ self assert: presenter isPassword ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testBeTextIsSet [ presenter beText. self deny: presenter isPassword ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testDefaultIsNotPassword [ self deny: presenter isPassword ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testDefaultMaxLengthIsZero [ self assert: presenter maxLength equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testDefaultPlaceholderIsEmpty [ self assert: presenter placeholder isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testDefaultTextIsEmpty [ self assert: presenter text isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testMaxLengthIsSet [ presenter maxLength: 10. @@ -63,7 +65,7 @@ SpTextInputFieldPresenterTest >> testMaxLengthIsSet [ self assert: presenter maxLength equals: 10 ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testMaxLengthTruncatesAlreadyTypedText [ presenter text: '1234567890 ---'. @@ -71,7 +73,7 @@ SpTextInputFieldPresenterTest >> testMaxLengthTruncatesAlreadyTypedText [ self assert: presenter text equals: '1234567890' ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testMaxLengthTruncatesText [ presenter maxLength: 10. @@ -79,7 +81,7 @@ SpTextInputFieldPresenterTest >> testMaxLengthTruncatesText [ self assert: presenter text equals: '1234567890' ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testTextIsSet [ presenter text: 'aText'. @@ -87,7 +89,7 @@ SpTextInputFieldPresenterTest >> testTextIsSet [ self assert: presenter text equals: 'aText' ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testWhenPlaceholderChangesRaisesSingleEvent [ self @@ -97,7 +99,7 @@ SpTextInputFieldPresenterTest >> testWhenPlaceholderChangesRaisesSingleEvent [ whenDoing: [ presenter placeholder: 'test' ] ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldPresenterTest >> testWhenTextChangesRaisesSingleEvent [ self diff --git a/src/Spec2-Tests/SpTextInputFieldWithValidationPresenterTest.class.st b/src/Spec2-Tests/SpTextInputFieldWithValidationPresenterTest.class.st index 05fbb65a9..618656601 100644 --- a/src/Spec2-Tests/SpTextInputFieldWithValidationPresenterTest.class.st +++ b/src/Spec2-Tests/SpTextInputFieldWithValidationPresenterTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #SpTextInputFieldWithValidationPresenterTest, - #superclass : #SpAbstractTextPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTextInputFieldWithValidationPresenterTest', + #superclass : 'SpAbstractTextPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #testing } +{ #category : 'testing' } SpTextInputFieldWithValidationPresenterTest class >> shouldInheritSelectors [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } SpTextInputFieldWithValidationPresenterTest >> classToTest [ ^ SpTextInputFieldWithValidationPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldWithValidationPresenterTest >> testErrorIconIsPresentWhenValidationFails [ presenter beRequired; @@ -24,7 +26,7 @@ SpTextInputFieldWithValidationPresenterTest >> testErrorIconIsPresentWhenValidat self assert: presenter statusIcon image equals: presenter errorIcon. ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldWithValidationPresenterTest >> testErrorMessageIsPresentWhenValidationFails [ presenter name: 'city'; @@ -35,7 +37,7 @@ SpTextInputFieldWithValidationPresenterTest >> testErrorMessageIsPresentWhenVali self assert: presenter statusIcon help equals: 'city is required'. ] -{ #category : #tests } +{ #category : 'tests' } SpTextInputFieldWithValidationPresenterTest >> testOkIconIsPresentWhenValidationIsOk [ presenter beRequired; diff --git a/src/Spec2-Tests/SpTextPresenterTest.class.st b/src/Spec2-Tests/SpTextPresenterTest.class.st index fd41d9744..865b4ea3a 100644 --- a/src/Spec2-Tests/SpTextPresenterTest.class.st +++ b/src/Spec2-Tests/SpTextPresenterTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpTextPresenterTest, - #superclass : #SpAbstractTextPresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTextPresenterTest', + #superclass : 'SpAbstractTextPresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTextPresenterTest >> classToTest [ ^ SpTextPresenter ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testEditable [ presenter beNotEditable. @@ -37,7 +39,7 @@ SpTextPresenterTest >> testEditable [ ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testInsertAt [ self initializationText. @@ -46,7 +48,7 @@ SpTextPresenterTest >> testInsertAt [ self assert: presenter text equals: 'Text for insertion tests.' ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testPropagateNaturalHeight [ @@ -61,7 +63,7 @@ SpTextPresenterTest >> testPropagateNaturalHeight [ self assert: presenter adapter widget height >= String loremIpsum asMorph height. ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testPropagateNaturalHeightWithMultipleLines [ | string | @@ -77,7 +79,7 @@ SpTextPresenterTest >> testPropagateNaturalHeightWithMultipleLines [ self assert: presenter adapter widget height >= (string lines size * string asMorph height). ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testPropagateNaturalWidth [ | lipsum stringMorph expectedWidth | @@ -104,7 +106,7 @@ SpTextPresenterTest >> testPropagateNaturalWidth [ ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testSelectLine [ presenter text: 'Text for tests. @@ -115,7 +117,7 @@ lines'. self assert: presenter selectionInterval equals: (1 to: 15) ] -{ #category : #tests } +{ #category : 'tests' } SpTextPresenterTest >> testSelectLineSecondLine [ presenter text: 'Text for tests. diff --git a/src/Spec2-Tests/SpToolbarPresenterTest.class.st b/src/Spec2-Tests/SpToolbarPresenterTest.class.st index c15220e32..2797b5eaf 100644 --- a/src/Spec2-Tests/SpToolbarPresenterTest.class.st +++ b/src/Spec2-Tests/SpToolbarPresenterTest.class.st @@ -1,29 +1,31 @@ Class { - #name : #SpToolbarPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpToolbarPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpToolbarPresenterTest >> classToTest [ ^ SpToolbarPresenter ] -{ #category : #private } +{ #category : 'private' } SpToolbarPresenterTest >> newToolbarItem [ ^ SpToolbarButtonPresenter new ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarPresenterTest >> testAddItem [ presenter addItem: SpToolbarButtonPresenter new. self assert: presenter items size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarPresenterTest >> testAddItemPosition [ | itemLeft itemRight | @@ -35,7 +37,7 @@ SpToolbarPresenterTest >> testAddItemPosition [ self assertCollection: presenter rightItems hasSameElements: { itemRight } ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarPresenterTest >> testDisplayMode [ presenter beBoth. @@ -47,7 +49,7 @@ SpToolbarPresenterTest >> testDisplayMode [ ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarPresenterTest >> testIsEmpty [ self assert: presenter isEmpty. @@ -55,7 +57,7 @@ SpToolbarPresenterTest >> testIsEmpty [ self deny: presenter isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarPresenterTest >> testItems [ | item | diff --git a/src/Spec2-Tests/SpToolbarToggleButtonPresenterTest.class.st b/src/Spec2-Tests/SpToolbarToggleButtonPresenterTest.class.st index ee6fbfede..ef69461b9 100644 --- a/src/Spec2-Tests/SpToolbarToggleButtonPresenterTest.class.st +++ b/src/Spec2-Tests/SpToolbarToggleButtonPresenterTest.class.st @@ -2,12 +2,14 @@ A SpToolBarToggleButtonTest is a test class for testing the behavior of SpToolBarToggleButton " Class { - #name : #SpToolbarToggleButtonPresenterTest, - #superclass : #TestCase, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpToolbarToggleButtonPresenterTest', + #superclass : 'TestCase', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testBecomeSelectedWhenToggledAndUnselected [ | toggleButton | toggleButton := SpToolbarToggleButtonPresenter new. @@ -19,7 +21,7 @@ SpToolbarToggleButtonPresenterTest >> testBecomeSelectedWhenToggledAndUnselected self deny: toggleButton isSelected. ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testBecomeUnselectedWhenToggledAndSelected [ | toggleButton | toggleButton := SpToolbarToggleButtonPresenter new. @@ -31,7 +33,7 @@ SpToolbarToggleButtonPresenterTest >> testBecomeUnselectedWhenToggledAndSelected ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testSelectedBlockExecutedWhenBecomeSelected [ | toggleButton selectedBlockExecuted | @@ -44,7 +46,7 @@ SpToolbarToggleButtonPresenterTest >> testSelectedBlockExecutedWhenBecomeSelecte self assert: selectedBlockExecuted ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testSelectedBlockNotExecutedWhenAlreadySelectedAndUnselectedTriggered [ | toggleButton selectedBlockExecuted | @@ -58,7 +60,7 @@ SpToolbarToggleButtonPresenterTest >> testSelectedBlockNotExecutedWhenAlreadySel self deny: selectedBlockExecuted ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testSelectedBlockNotExecutedWhenBecomeUnselected [ | toggleButton selectedBlockExecuted | @@ -72,7 +74,7 @@ SpToolbarToggleButtonPresenterTest >> testSelectedBlockNotExecutedWhenBecomeUnse self deny: selectedBlockExecuted ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testToggleBlockExecutedWhenToggled [ | toggleButton toggled | toggled := false. @@ -84,7 +86,7 @@ SpToolbarToggleButtonPresenterTest >> testToggleBlockExecutedWhenToggled [ self assert: toggled ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testUnselectedBlockExecutedWhenBecomeUnselected [ | toggleButton unselectedBlockExecuted | @@ -98,7 +100,7 @@ SpToolbarToggleButtonPresenterTest >> testUnselectedBlockExecutedWhenBecomeUnsel self assert: unselectedBlockExecuted ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testUnselectedBlockNotExecutedWhenAlreadyUnselectedAndUnselectedTriggered [ | toggleButton unselectedBlockExecuted | @@ -112,7 +114,7 @@ SpToolbarToggleButtonPresenterTest >> testUnselectedBlockNotExecutedWhenAlreadyU self deny: unselectedBlockExecuted ] -{ #category : #tests } +{ #category : 'tests' } SpToolbarToggleButtonPresenterTest >> testUnselectedBlockNotExecutedWhenBecomeSelected [ | toggleButton unselectedBlockExecuted | diff --git a/src/Spec2-Tests/SpTreePresenterTest.class.st b/src/Spec2-Tests/SpTreePresenterTest.class.st index 0d0926333..ee7a175b6 100644 --- a/src/Spec2-Tests/SpTreePresenterTest.class.st +++ b/src/Spec2-Tests/SpTreePresenterTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpTreePresenterTest, - #superclass : #SpAbstractTreePresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTreePresenterTest', + #superclass : 'SpAbstractTreePresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTreePresenterTest >> classToTest [ ^ SpTreePresenter diff --git a/src/Spec2-Tests/SpTreeTablePresenterMultipleSelectionTest.class.st b/src/Spec2-Tests/SpTreeTablePresenterMultipleSelectionTest.class.st index e28026328..6bfb24a89 100644 --- a/src/Spec2-Tests/SpTreeTablePresenterMultipleSelectionTest.class.st +++ b/src/Spec2-Tests/SpTreeTablePresenterMultipleSelectionTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpTreeTablePresenterMultipleSelectionTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTreeTablePresenterMultipleSelectionTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTreeTablePresenterMultipleSelectionTest >> classToTest [ ^ SpTreeTablePresenter ] -{ #category : #running } +{ #category : 'running' } SpTreeTablePresenterMultipleSelectionTest >> setUp [ super setUp. presenter @@ -23,74 +25,74 @@ SpTreeTablePresenterMultipleSelectionTest >> setUp [ yourself. ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectAbsentItemGivesEmptySelection [ presenter selectItem: 4000. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectInvalidPathHasNoSelectedItems [ presenter selectPath: #(4). self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectInvalidPathHasNoSelectedPaths [ presenter selectPath: #(4). self assert: presenter selection selectedPaths isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectInvalidPathsHasNoSelectedItems [ presenter selectPaths: { #(10 20) . #(20 20) }. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectInvalidPathsHasNoSelectedPaths [ presenter selectPaths: { #(10 20) . #(20 20) }. self assert: presenter selection selectedPaths isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectInvalidPathsIsEmpty [ presenter selectPaths: { #(40) . #(10 20)}. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemAddsItemToSelectedItemList [ presenter selectItem: 10. self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemAddsPathToSelectedPathList [ presenter selectItem: 10. self assert: (presenter selection includesPath: #(1 3)) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemOutsideRangeHasNoSelectedItems [ presenter selectItem: 4000. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemOutsideRangeHasNoSelectedPath [ presenter selectItem: 4000. self assert: presenter selection selectedPaths isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsFirstElement [ presenter selectItem: 10. @@ -98,7 +100,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRang self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsFirstPath [ presenter selectItem: 10. @@ -108,7 +110,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRang hasSameElements: #( #(1 3) ) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRangeKeepsSingleSelectedItem [ presenter selectItem: 10. @@ -116,13 +118,13 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectItemThenSelectOutsideRang self assert: presenter selection selectedItems size equals: 1 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsAddsItemsToSelectedItemList [ presenter selectItems: {10 . 20}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsAddsPathsToSelectedPathList [ presenter selectItems: {10 . 20}. @@ -131,34 +133,34 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsAddsPathsToSelectedP hasSameElements: { #(1 3) . #(1 1 3) } ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsOutsideRangeHasNoSelectedItems [ presenter selectItems: {3000 . 4000}. self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsOutsideRangeHasNoSelectedPaths [ presenter selectItems: {3000 . 4000}. self assert: presenter selection selectedPaths isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsOutsideRangeIsEmpty [ presenter selectItems: {4000 . 5000}. self assert: presenter selection isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsThenSelectOutsideRangeKeepsElements [ presenter selectItems: {10 . 20}. presenter selectItems: {4000 . 5000}. self assert: (presenter selection includesItems: {10 . 20}) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsThenSelectOutsideRangeKeepsPaths [ presenter selectItems: {10 . 20}. presenter selectItems: {5000 . 6000}. @@ -168,7 +170,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectItemsThenSelectOutsideRan hasSameElements: { #(1 1 3) . #(1 3) } ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemAddsAllToSelectedPathList [ presenter @@ -179,7 +181,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemAddsAllToSele hasSameElements: { #(1 3) . #(1 2 3) } ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemsAddsAllToSelectedItemList [ presenter selectItem: 10. @@ -188,7 +190,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemsAddsAllToSel self assert: (presenter selection includesItem: 30). ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemsRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -200,7 +202,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultipleItemsRaisesSelect self assert: events equals: 2 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsAddsAllToSelectedItemList [ presenter @@ -210,7 +212,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsAddsAllToSel self assert: (presenter selection includesItem: 6). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsAddsAllToSelectedPathList [ presenter @@ -223,7 +225,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsAddsAllToSel self assert: (presenter selection includesPath: #(2 2)). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -235,21 +237,21 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectMultiplePathsRaisesSelect self assert: events equals: 2 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathAddsIndexToSelectedPathList [ presenter selectPath: #(1). self assert: (presenter selection includesPath: #(1)) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathAddsItemToSelectedItemList [ presenter selectPath: #(1 3). self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathRaisesSelectionChangeEventWithSelectedPath [ | selectedPaths | presenter @@ -260,7 +262,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathRaisesSelectionChange self assert: (selectedPaths includes: #(1 2)). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPathKeepsFirstElement [ presenter selectPath: #(1 3). @@ -268,7 +270,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPath self assert: (presenter selection includesItem: 10) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPathKeepsFirstPath [ presenter selectPath: #(1 3). @@ -276,7 +278,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPath self assert: (presenter selection includesPath: #(1 3)) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPathKeepsSingleSelectedItem [ presenter selectPath: #(1 3). @@ -286,7 +288,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathThenSelectInvalidPath equals: 1 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathTwiceAddsPathToSelectedPathListOnlyOnce [ presenter selectPath: #(1 3). @@ -296,7 +298,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathTwiceAddsPathToSelect equals: #( #(1 3) ) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsAddsItemsToSelectedItemList [ | paths | paths := { #(1 2) . #(2 2) }. @@ -306,7 +308,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsAddsItemsToSelectedI ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsAddsPathsToSelectedPathList [ | paths | paths := { #(1 2) . #(2 2) }. @@ -314,7 +316,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsAddsPathsToSelectedP self assert: (presenter selection includesPaths: paths). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsThenSelectInvalidPathKeepsElements [ presenter @@ -323,7 +325,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsThenSelectInvalidPat self assert: (presenter selection includesItems: #(10 6)) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsThenSelectInvalidPathKeepsPaths [ | paths | paths := {#(1 3) . #(2 2)}. @@ -333,7 +335,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsThenSelectInvalidPat self assert: (presenter selection includesPaths: paths) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsTwiceAddsPathssToSelectedPathListOnlyOnce [ | paths | paths := {#(1 3) . #(2 2)}. @@ -345,7 +347,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectPathsTwiceAddsPathssToSel hasSameElements: paths ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectedItemIsNilIfNothingIsSelected [ self assert: presenter selection selectedItem isNil. @@ -355,7 +357,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectedItemIsNilIfNothingIsSel self assert: presenter selection selectedItem isNil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectedItemsIsEmptyIfNothingIsSelected [ self assert: presenter selection selectedItems isEmpty. @@ -365,7 +367,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectedItemsIsEmptyIfNothingIs self assert: presenter selection selectedItems isEmpty ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectedPathIsNilIfNothingIsSelected [ self assert: presenter selection selectedPath isNil. @@ -375,7 +377,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectedPathIsNilIfNothingIsSel self assert: presenter selection selectedPath isNil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSelectedPathsIsEmptyIfNothingIsSelected [ self assert: presenter selection selectedPaths isEmpty. @@ -385,7 +387,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSelectedPathsIsEmptyIfNothingIs self assert: presenter selection selectedPaths isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSetSelectInvalidPathDoesNotModifySelection [ presenter whenSelectionChangedDo: [ :selection | self fail ]. @@ -394,7 +396,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSetSelectInvalidPathDoesNotModi "If we arrive here and the test did not fail, we succeeded". ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterMultipleSelectionTest >> testSetSelectItemOutsideRangeDoesNotModifySelection [ presenter whenSelectionChangedDo: [ :selection | self fail ]. @@ -403,7 +405,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSetSelectItemOutsideRangeDoesNo "If we arrive here and the test did not fail, we succeeded" ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterMultipleSelectionTest >> testSetSelectPathRaisesSelectionChangeEventWithSelectedItem [ | selectedItems | presenter @@ -414,7 +416,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testSetSelectPathRaisesSelectionCha self assert: (selectedItems includes: 10) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectAllRaisesSelectionEventOnce [ "Because it does nothing in single selection mode" @@ -431,7 +433,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectAllRaisesSelectionEvent self assert: nbEvents equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectAllUnselectsall [ presenter @@ -441,7 +443,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectAllUnselectsall [ self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedItemRaisesSelectionEventOnce [ | counter | @@ -453,7 +455,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedItemRaisesSelec self assert: counter equals: 1 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedItemRemovesItFromSelectionList [ presenter @@ -462,7 +464,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedItemRemovesItFr self assert: (presenter selection isEmpty) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedPathRaisesSelectionEventOnce [ | counter | @@ -475,7 +477,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedPathRaisesSelec self assert: counter equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedPathRemovesItFromSelectionList [ presenter @@ -484,7 +486,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectSelectedPathRemovesItFr self assert: (presenter selection isEmpty) ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedItemKeepsSelectionList [ presenter @@ -493,7 +495,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedItemKeepsSele self assert: presenter selection selectedItems asArray equals: #(10) ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedItemRaisesNoSelectionEvent [ | counter | @@ -505,7 +507,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedItemRaisesNoS self assert: counter equals: 0 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedPathKeepsSelectionList [ presenter @@ -516,7 +518,7 @@ SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedPathKeepsSele equals: { #(1 2) } ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterMultipleSelectionTest >> testUnselectUnselectedPathRaisesNoSelectionEvent [ | counter | diff --git a/src/Spec2-Tests/SpTreeTablePresenterSingleSelectionTest.class.st b/src/Spec2-Tests/SpTreeTablePresenterSingleSelectionTest.class.st index 194c062b4..5ee58984c 100644 --- a/src/Spec2-Tests/SpTreeTablePresenterSingleSelectionTest.class.st +++ b/src/Spec2-Tests/SpTreeTablePresenterSingleSelectionTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #SpTreeTablePresenterSingleSelectionTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTreeTablePresenterSingleSelectionTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTreeTablePresenterSingleSelectionTest >> classToTest [ ^ SpTreeTablePresenter ] -{ #category : #running } +{ #category : 'running' } SpTreeTablePresenterSingleSelectionTest >> setUp [ super setUp. @@ -25,14 +27,14 @@ SpTreeTablePresenterSingleSelectionTest >> setUp [ yourself. ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSelectItemOutsideRangeUnsetsSelectedItem [ presenter selectItem: 4000. self assert: presenter selection selectedItem equals: nil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSelectItemOutsideRangeUnsetsSelectedPath [ presenter selectItem: 4000. @@ -41,20 +43,20 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectItemOutsideRangeUnsetsSelec assert: presenter selection selectedPath equals: #() ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSelectItemSetsSelectedItem [ presenter selectItem: 20. self assert: presenter selection selectedItem equals: 20 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSelectItemSetsSelectedPath [ presenter selectItem: 20. self assert: presenter selection selectedPath equals: #(1 1 3) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSelectMultiplePathsRaisesSelectionChangeEventMultipleTimes [ | events | events := 0. @@ -66,7 +68,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectMultiplePathsRaisesSelectio self assert: events equals: 2 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSelectPathOutsideRangeUnsetsSelectedItem [ presenter selectPath: { 4 }. @@ -75,7 +77,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectPathOutsideRangeUnsetsSelec equals: nil ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSelectPathOutsideRangeUnsetsSelectedPath [ presenter selectPath: #(4). @@ -84,7 +86,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectPathOutsideRangeUnsetsSelec equals: #() ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSelectPathSetsSelectedItem [ presenter selectPath: #(1 3). @@ -94,7 +96,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectPathSetsSelectedItem [ equals: 10 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSelectPathSetsSelectedPath [ presenter selectPath: #(1 1). @@ -104,7 +106,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSelectPathSetsSelectedPath [ equals: #(1 1) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelectionChangeEventWithUnsetItem [ | selectedItem | presenter @@ -113,7 +115,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSe self assert: selectedItem equals: nil ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSelectionChangeEventWithUnsetPath [ | selectedPath | @@ -123,7 +125,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemOutsideRangeRaisesSe self assert: selectedPath equals: #() ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEventWithSelectedItem [ | selectedElement | presenter @@ -132,7 +134,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChang self assert: selectedElement equals: 20 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChangeEventWithSelectedPath [ | selectedPath | @@ -143,7 +145,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionChang self assert: selectedPath equals: #(1 1 3) ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionItemChangeEventWithSelectedItem [ | selectedItem | presenter @@ -152,7 +154,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionItemC self assert: selectedItem equals: 10 ] -{ #category : #'tests - select-item' } +{ #category : 'tests - select-item' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionPathChangeEventWithSelectedPath [ | selectedPath | @@ -163,7 +165,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectItemRaisesSelectionPathC self assert: selectedPath equals: #(1 3) ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathOutsideRangeRaisesSelectionChangeEventWithUnsetItem [ | selectedItem | presenter @@ -173,7 +175,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathOutsideRangeRaisesSe self assert: selectedItem equals: nil ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathOutsideRangeRaisesSelectionChangeEventWithUnsetPath [ | selectedPath | presenter @@ -183,7 +185,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathOutsideRangeRaisesSe self assert: selectedPath equals: nil ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionChangeEventWithSelectedItem [ | selectedElement | @@ -194,7 +196,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionChang self assert: selectedElement equals: 10 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionChangeEventWithSelectedPath [ | selectedPath | presenter @@ -204,7 +206,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionChang self assert: selectedPath equals: #(1 2). ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionItemChangeEventWithSelectedItem [ | selectedItem | presenter @@ -216,7 +218,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionItemC equals: 10 ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionPathChangeEventWithSelectedPath [ | selectedPath | presenter selection @@ -226,7 +228,7 @@ SpTreeTablePresenterSingleSelectionTest >> testSetSelectPathRaisesSelectionPathC self assert: selectedPath equals: #(1 2) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectAllRaisesSelectionEventOnce [ "Because it does nothing in single selection mode" | events | @@ -238,7 +240,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectAllRaisesSelectionEventOn self assert: events equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectAllUnselectsSingleSelection [ presenter @@ -247,7 +249,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectAllUnselectsSingleSelecti self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedItemDoesNotRemovesSelection [ presenter selectItem: 10; @@ -258,7 +260,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedItemDoesNotRem equals: 10 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedItemRaisesNoEvent [ | counter | @@ -271,7 +273,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedItemRaisesNoEv self assert: counter equals: 0 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedPathDoesNotRemovesSelection [ presenter selectPath: #(1 1); @@ -282,7 +284,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedPathDoesNotRem equals: #(1 1) ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedPathRaisesNoEvent [ | counter | @@ -295,7 +297,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectNonSelectedPathRaisesNoEv self assert: counter equals: 0 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedItemRaisesSingleEvent [ | counter | @@ -308,7 +310,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedItemRaisesSingleE self assert: counter equals: 1 ] -{ #category : #'tests - unselect-item' } +{ #category : 'tests - unselect-item' } SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedItemRemovesSelection [ presenter @@ -318,7 +320,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedItemRemovesSelect self assert: presenter selection isEmpty ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedPathRaisesSingleEvent [ | counter | @@ -331,7 +333,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedPathRaisesSingleE self assert: counter equals: 1 ] -{ #category : #'tests - unselect-index' } +{ #category : 'tests - unselect-index' } SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedPathRemovesSelection [ presenter selectPath: #(1 1); @@ -340,7 +342,7 @@ SpTreeTablePresenterSingleSelectionTest >> testUnselectSelectedPathRemovesSelect self assert: presenter selection isEmpty ] -{ #category : #'tests - select-index' } +{ #category : 'tests - select-index' } SpTreeTablePresenterSingleSelectionTest >> testWhenSelectPathTwiceThenIsListedOnceInSelectedPaths [ presenter selectPath: #(3 1); diff --git a/src/Spec2-Tests/SpTreeTablePresenterTest.class.st b/src/Spec2-Tests/SpTreeTablePresenterTest.class.st index 88577ab41..8a31b8d2b 100644 --- a/src/Spec2-Tests/SpTreeTablePresenterTest.class.st +++ b/src/Spec2-Tests/SpTreeTablePresenterTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpTreeTablePresenterTest, - #superclass : #SpAbstractTreePresenterTest, - #category : #'Spec2-Tests-Core-Widgets' + #name : 'SpTreeTablePresenterTest', + #superclass : 'SpAbstractTreePresenterTest', + #category : 'Spec2-Tests-Core-Widgets', + #package : 'Spec2-Tests', + #tag : 'Core-Widgets' } -{ #category : #accessing } +{ #category : 'accessing' } SpTreeTablePresenterTest >> classToTest [ ^ SpTreeTablePresenter diff --git a/src/Spec2-Tests/SpValidationReportTest.class.st b/src/Spec2-Tests/SpValidationReportTest.class.st index e150340d9..25caa2535 100644 --- a/src/Spec2-Tests/SpValidationReportTest.class.st +++ b/src/Spec2-Tests/SpValidationReportTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #SpValidationReportTest, - #superclass : #TestCase, + #name : 'SpValidationReportTest', + #superclass : 'TestCase', #instVars : [ 'report' ], - #category : #'Spec2-Tests-Validation' + #category : 'Spec2-Tests-Validation', + #package : 'Spec2-Tests', + #tag : 'Validation' } -{ #category : #running } +{ #category : 'running' } SpValidationReportTest >> setUp [ super setUp. report := SpValidationReport new. ] -{ #category : #tests } +{ #category : 'tests' } SpValidationReportTest >> testCanAddValidationFailure [ report add: SpRequiredFieldValidation new. diff --git a/src/Spec2-Tests/SpVerticalBoxLayoutTest.class.st b/src/Spec2-Tests/SpVerticalBoxLayoutTest.class.st index bf8a854f8..b56d4c460 100644 --- a/src/Spec2-Tests/SpVerticalBoxLayoutTest.class.st +++ b/src/Spec2-Tests/SpVerticalBoxLayoutTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #SpVerticalBoxLayoutTest, - #superclass : #SpBoxLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpVerticalBoxLayoutTest', + #superclass : 'SpBoxLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #initialization } +{ #category : 'initialization' } SpVerticalBoxLayoutTest >> initializeTestedInstance [ layout := SpBoxLayout newTopToBottom. presenter layout: layout ] -{ #category : #tests } +{ #category : 'tests' } SpVerticalBoxLayoutTest >> testPresenterExtentFollowsChildrenExtent [ | label button | @@ -25,7 +27,7 @@ SpVerticalBoxLayoutTest >> testPresenterExtentFollowsChildrenExtent [ self assert: (self heightOf: presenter) >= ((self heightOf: label) + (self heightOf: button)) ] -{ #category : #tests } +{ #category : 'tests' } SpVerticalBoxLayoutTest >> testReplaceWithFixedHeight [ | p1 toReplace p3 replacement | @@ -43,7 +45,7 @@ SpVerticalBoxLayoutTest >> testReplaceWithFixedHeight [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #tests } +{ #category : 'tests' } SpVerticalBoxLayoutTest >> testReplaceWithFixedHeightAllFixed [ | p1 toReplace p3 replacement | @@ -61,7 +63,7 @@ SpVerticalBoxLayoutTest >> testReplaceWithFixedHeightAllFixed [ self assert: layout children equals: { p1. replacement. p3 } ] -{ #category : #tests } +{ #category : 'tests' } SpVerticalBoxLayoutTest >> testReplaceWithFixedHeightComposed [ | p1 layoutToReplace toReplace p3 replacement | diff --git a/src/Spec2-Tests/SpVerticalPanedLayoutTest.class.st b/src/Spec2-Tests/SpVerticalPanedLayoutTest.class.st index 62cbd4eeb..50868eecd 100644 --- a/src/Spec2-Tests/SpVerticalPanedLayoutTest.class.st +++ b/src/Spec2-Tests/SpVerticalPanedLayoutTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #SpVerticalPanedLayoutTest, - #superclass : #SpPanedLayoutTest, - #category : #'Spec2-Tests-Layout' + #name : 'SpVerticalPanedLayoutTest', + #superclass : 'SpPanedLayoutTest', + #category : 'Spec2-Tests-Layout', + #package : 'Spec2-Tests', + #tag : 'Layout' } -{ #category : #initialization } +{ #category : 'initialization' } SpVerticalPanedLayoutTest >> initializeTestedInstance [ layout := SpPanedLayout newTopToBottom. diff --git a/src/Spec2-Tests/SpWindowPresenterTest.class.st b/src/Spec2-Tests/SpWindowPresenterTest.class.st index 4233eae38..75178357b 100644 --- a/src/Spec2-Tests/SpWindowPresenterTest.class.st +++ b/src/Spec2-Tests/SpWindowPresenterTest.class.st @@ -1,29 +1,31 @@ Class { - #name : #SpWindowPresenterTest, - #superclass : #SpSpecTest, - #category : #'Spec2-Tests-Core' + #name : 'SpWindowPresenterTest', + #superclass : 'SpSpecTest', + #category : 'Spec2-Tests-Core', + #package : 'Spec2-Tests', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } SpWindowPresenterTest >> classToTest [ ^ SpWindowPresenter ] -{ #category : #initialization } +{ #category : 'initialization' } SpWindowPresenterTest >> initializeTestedInstance [ presenter presenter: SpLabelPresenter new ] -{ #category : #utilities } +{ #category : 'utilities' } SpWindowPresenterTest >> openInstance [ window ifNil: [ window := presenter openWithLayout: SpLabelPresenter defaultLayout ] ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testBeNotResizeable [ self openInstance. @@ -34,14 +36,14 @@ SpWindowPresenterTest >> testBeNotResizeable [ ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testInitialPosition [ presenter initialPosition: 100 @ 100. self openInstance. self assert: window adapter widget position equals: 100 @ 100 ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testIsClosed [ self assert: presenter isClosed. self openInstance. @@ -50,7 +52,7 @@ SpWindowPresenterTest >> testIsClosed [ self assert: presenter isClosed ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testIsTopWindow [ self deny: presenter isTopWindow. @@ -61,7 +63,7 @@ SpWindowPresenterTest >> testIsTopWindow [ self deny: presenter isTopWindow ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testRebuildPresenterDoNotLetReferencesInAnnouncer [ | oldSize newSize | @@ -74,7 +76,7 @@ SpWindowPresenterTest >> testRebuildPresenterDoNotLetReferencesInAnnouncer [ self assert: oldSize equals: newSize ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testResize [ self openInstance. @@ -88,7 +90,7 @@ SpWindowPresenterTest >> testResize [ equals: 600@600 ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testUsingAsWindowCanOverrideTitle [ | windowPresenter | @@ -105,7 +107,7 @@ SpWindowPresenterTest >> testUsingAsWindowCanOverrideTitle [ self assert: windowPresenter title equals: 'Title Test' ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testWhenClosedDo [ | closed | closed := false. @@ -115,7 +117,7 @@ SpWindowPresenterTest >> testWhenClosedDo [ self assert: closed ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testWhenOpenedDo [ | opened | opened := false. @@ -124,7 +126,7 @@ SpWindowPresenterTest >> testWhenOpenedDo [ self assert: opened ] -{ #category : #tests } +{ #category : 'tests' } SpWindowPresenterTest >> testWhenWillCloseDo [ | willClose closed | diff --git a/src/Spec2-Tests/SpWindowTest.class.st b/src/Spec2-Tests/SpWindowTest.class.st index 5c28d646c..a2930b752 100644 --- a/src/Spec2-Tests/SpWindowTest.class.st +++ b/src/Spec2-Tests/SpWindowTest.class.st @@ -2,15 +2,17 @@ SUnit tests for SpecWindow " Class { - #name : #SpWindowTest, - #superclass : #TestCase, + #name : 'SpWindowTest', + #superclass : 'TestCase', #instVars : [ 'windowPresenter' ], - #category : #'Spec2-Tests-Core-Support' + #category : 'Spec2-Tests-Core-Support', + #package : 'Spec2-Tests', + #tag : 'Core-Support' } -{ #category : #tests } +{ #category : 'tests' } SpWindowTest >> testAboutText [ | presenter window | @@ -27,7 +29,7 @@ SpWindowTest >> testAboutText [ window ifNotNil: #delete ] ] -{ #category : #tests } +{ #category : 'tests' } SpWindowTest >> testAllowedToClose [ | application appWindow | @@ -53,7 +55,7 @@ SpWindowTest >> testAllowedToClose [ self assert: application windows isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpWindowTest >> testCloseWindowRemovesItFromApplicationWindowCollection [ | application | @@ -64,7 +66,7 @@ SpWindowTest >> testCloseWindowRemovesItFromApplicationWindowCollection [ self assert: application windows isEmpty ] -{ #category : #tests } +{ #category : 'tests' } SpWindowTest >> testIsDisplayed [ "Test for case: 16800 -> ask a SpecWindow for #isDisplayed always returns true" @@ -79,7 +81,7 @@ SpWindowTest >> testIsDisplayed [ self assert: windowPresenter isDisplayed not ] -{ #category : #tests } +{ #category : 'tests' } SpWindowTest >> testTitle [ | presenter window | diff --git a/src/Spec2-Tests/package.st b/src/Spec2-Tests/package.st index 3fee7741c..5fbc97b74 100644 --- a/src/Spec2-Tests/package.st +++ b/src/Spec2-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Spec2-Tests' } +Package { #name : 'Spec2-Tests' }