From e31c4239e2cfcceb271ab8f0c979964430ed2db9 Mon Sep 17 00:00:00 2001 From: Pierre Laborde <49183340+labordep@users.noreply.github.com> Date: Tue, 1 Oct 2024 23:36:10 +0200 Subject: [PATCH 1/4] Write test for #190 --- src/Molecule-IDE-Tests/MolWorldTest.class.st | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Molecule-IDE-Tests/MolWorldTest.class.st b/src/Molecule-IDE-Tests/MolWorldTest.class.st index c69b6f2b..54ed0561 100644 --- a/src/Molecule-IDE-Tests/MolWorldTest.class.st +++ b/src/Molecule-IDE-Tests/MolWorldTest.class.st @@ -4,6 +4,12 @@ Class { #category : #'Molecule-IDE-Tests-Cases' } +{ #category : #tests } +MolWorldTest >> testOpenDefineComponentDialog [ + + MolWorld openDefineComponentDialog +] + { #category : #tests } MolWorldTest >> testWorldMenu [ | menuElements moleculeMenuEntry libraryMenu | From 6f27f5057dfc95f9dc13c9830dac3a9387bd50f1 Mon Sep 17 00:00:00 2001 From: Pierre Laborde <49183340+labordep@users.noreply.github.com> Date: Wed, 2 Oct 2024 00:08:31 +0200 Subject: [PATCH 2/4] Fix #190 and add better message in the contextual menu of define component --- src/Molecule-IDE-Tests/MolWorldTest.class.st | 4 +- src/Molecule-IDE/MolWorld.class.st | 44 +++++++++++++++----- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/Molecule-IDE-Tests/MolWorldTest.class.st b/src/Molecule-IDE-Tests/MolWorldTest.class.st index 54ed0561..e32f245e 100644 --- a/src/Molecule-IDE-Tests/MolWorldTest.class.st +++ b/src/Molecule-IDE-Tests/MolWorldTest.class.st @@ -7,7 +7,9 @@ Class { { #category : #tests } MolWorldTest >> testOpenDefineComponentDialog [ - MolWorld openDefineComponentDialog + | dialog | + dialog := MolWorld openDefineComponentDialog. + self assert: dialog notNil. ] { #category : #tests } diff --git a/src/Molecule-IDE/MolWorld.class.st b/src/Molecule-IDE/MolWorld.class.st index dc9029e3..5d627195 100644 --- a/src/Molecule-IDE/MolWorld.class.st +++ b/src/Molecule-IDE/MolWorld.class.st @@ -7,13 +7,38 @@ Class { #category : #'Molecule-IDE-Menus' } +{ #category : #scripts } +MolWorld class >> answerComponentToDefine [ + +