Skip to content

Commit

Permalink
Tests for #923 - package group editor disfunctional
Browse files Browse the repository at this point in the history
#923

First fix will be in RowanClientServices
  • Loading branch information
Eric Winger authored and Eric Winger committed Oct 13, 2022
1 parent 067f899 commit 73b03f1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sources/JadeitePackageGroupPresenter.cls
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ onViewClosed
super onViewClosed.
BrowserUpdate current removeEventsTriggeredFor: packageGroupPresenter.!

packageGroupPresenter
^packageGroupPresenter!

packageGroupSelectionChanged
self displayPackageGroupPackages!

Expand Down Expand Up @@ -137,6 +140,7 @@ onDragPackageToComponent:!drag & drop!event handlers!public! !
onDropPackageToComponent:!drag & drop!event handlers!public! !
onDropPackageToPackageGroup:!drag & drop!public! !
onViewClosed!event handlers!public! !
packageGroupPresenter!accessing!private! !
packageGroupSelectionChanged!event handlers!public! !
queryCommand:!menu handlers!public! !
removePackageFromPackageGroup!menu handlers!public! !
Expand Down
18 changes: 18 additions & 0 deletions sources/JadeitePackageGroupTestCase.cls
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ test_basicDisplayPackageGroups
childNames do: [:childName | self assert: (expectedChildNames includes: childName)].
expectedChildNames do: [:expectedChildName | self assert: (childNames includes: expectedChildName)]!

test_packageGroupEditorSelection
"basic selection was broken"

| packageGroupEditor |
self testsIssue: #issue923
withTitle: '(3.2.8) Package Group Editor not implemented sufficiently to have value'.
self selectServiceNamed: 'RowanSample9' in: self projectListPresenter.
packageGroupEditor := self projectsPresenter editPackageGroups.

[1 to: packageGroupEditor primaryPresenter model packageGroups size
do:
[:index |
packageGroupEditor primaryPresenter packageGroupPresenter selectionByIndex: index.
self assert: packageGroupEditor primaryPresenter packageGroupPresenter selectionByIndex
equals: index]]
ensure: [self destroy: packageGroupEditor]!

test_packageGroupsFromLoadedPackage
"in the browser, the package groups shown should be derived from the loaded project,
not the project definition."
Expand Down Expand Up @@ -89,6 +106,7 @@ test_rowanAllPackagesDoesNotTakeTooLong
self assert: time < expectedTime! !
!JadeitePackageGroupTestCase categoriesForMethods!
test_basicDisplayPackageGroups!public!tests! !
test_packageGroupEditorSelection!public!tests! !
test_packageGroupsFromLoadedPackage!public!tests! !
test_packageGroupsSelection!public!tests! !
test_rowanAllPackagesDoesNotTakeTooLong!public!tests! !
Expand Down

0 comments on commit 73b03f1

Please sign in to comment.