diff --git a/src/Pyramid-Tests/PyramidEditorTest.class.st b/src/Pyramid-Tests/PyramidEditorTest.class.st index 55f3c122..7af33d8e 100644 --- a/src/Pyramid-Tests/PyramidEditorTest.class.st +++ b/src/Pyramid-Tests/PyramidEditorTest.class.st @@ -5,9 +5,11 @@ Class { } { #category : #tests } -PyramidEditorTest >> testOpenNewEditor [ +PyramidEditorTest >> testOpenNewEditorWithSpacePluginInstalled [ + "This test does not work on a headless vm. The current CI use a headless vm." | editor spec | + Smalltalk isInteractiveGraphic ifFalse: [ ^ self skip ]. editor := PyramidPluginManager uniqueInstance makeEditor. spec := editor window open. (Duration milliSeconds: 10) wait. @@ -21,3 +23,27 @@ PyramidEditorTest >> testOpenNewEditor [ self assert: editor window isClosed. self deny: spec window isInWorld ] + +{ #category : #tests } +PyramidEditorTest >> testOpenNewEditorWithSpacePluginUninstalled [ + + | editor spec | + editor := PyramidEditorBuilder new + plugins: + (PyramidPluginManager uniqueInstance pluginClasses + reject: [ :class | class name = #PyramidSpacePlugin ] + thenCollect: [ :class | class new ]); + build. + + spec := editor window open. + (Duration milliSeconds: 10) wait. + self currentWorld doOneCycle. + self assert: editor window isOpen. + self assert: spec window isInWorld. + + editor window close. + (Duration milliSeconds: 10) wait. + self currentWorld doOneCycle. + self assert: editor window isClosed. + self deny: spec window isInWorld +] diff --git a/src/Pyramid-Tests/PyramidSpacePresenterTest.class.st b/src/Pyramid-Tests/PyramidSpacePresenterTest.class.st index f0048d0a..8f66e03e 100644 --- a/src/Pyramid-Tests/PyramidSpacePresenterTest.class.st +++ b/src/Pyramid-Tests/PyramidSpacePresenterTest.class.st @@ -4,16 +4,11 @@ Class { #category : #'Pyramid-Tests-Cases' } -{ #category : #tests } -PyramidSpacePresenterTest >> testIsInteractive [ - - self assert: Smalltalk isInteractiveGraphic -] - { #category : #tests } PyramidSpacePresenterTest >> testMakeSpacePresenter [ - | morphPresenter overlaysManager spec | + | morphPresenter overlaysManager | + self currentWorld displayWorld. overlaysManager := PyramidOverlaysManager new. morphPresenter := PyramidSpacePresenter new @@ -22,47 +17,5 @@ PyramidSpacePresenterTest >> testMakeSpacePresenter [ self assert: overlaysManager space host containerMorph equals: morphPresenter morph. - self deny: overlaysManager space isOpened. - - spec := morphPresenter open. - (Duration milliSeconds: 10) wait. - self currentWorld doOneCycle. - self assert: spec window isInWorld. - self assert: overlaysManager space isOpened. - - spec close. - (Duration milliSeconds: 10) wait. - self currentWorld doOneCycle. - self deny: spec window isInWorld. self deny: overlaysManager space isOpened ] - -{ #category : #tests } -PyramidSpacePresenterTest >> testSpace [ - - | space | - space := BlSpace new. - self deny: space isOpened. - space show. - (Duration milliSeconds: 100) wait. - self assert: space isOpened. - space close. - (Duration milliSeconds: 100) wait. - self deny: space isOpened -] - -{ #category : #tests } -PyramidSpacePresenterTest >> testWorldRenderer [ - - | worldRenderer | - worldRenderer := self currentWorld worldState worldRenderer. - self - deny: [ worldRenderer class = BlMorphicWorldRenderer ] - description: 'BlMorphicWorldRenderer'. - self - deny: [ worldRenderer class = NullWorldRenderer ] - description: 'NullWorldRenderer'. - self - assert: [ worldRenderer class = OSWorldRenderer ] - description: 'OSWorldRenderer' -]