-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
repository/SmalltalkCI-Core.package/SmalltalkCI.class/class/promptToProceed.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
helpers | ||
promptToProceed | ||
|
||
"First, close any remaining progress bars, that are caused by reading the setup script" | ||
SystemProgressMorph reset. | ||
|
||
"The = true check here is necessary, as Squeak provides a 'cancel' button for some reason that returns nil." | ||
^ (UIManager default | ||
confirm: 'smalltalkCI has finished loading the project. The image is now ready for testing. | ||
If you choose to inspect the image, you must save and quit the image to proceed.' | ||
trueChoice: 'Proceed' | ||
falseChoice: 'Inspect image') = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
repository/SmalltalkCI-Tests.package/SmalltalkCITest.class/instance/testPromptToProceed.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
testing | ||
testPromptToProceed | ||
|
||
self should: [SmalltalkCI promptToProceed] raise: ProvideAnswerNotification. | ||
self assert: ([SmalltalkCI promptToProceed] valueSupplyingAnswer: true). | ||
self deny: ([SmalltalkCI promptToProceed] valueSupplyingAnswer: false). |
17 changes: 17 additions & 0 deletions
17
...ltalkCI-Tests.package/SmalltalkCITest.class/instance/testPromptToProceedClosesProgress.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
testing | ||
testPromptToProceedClosesProgress | ||
|
||
|progressMorph| | ||
"Make sure we have a progress bar open" | ||
progressMorph := SystemProgressMorph uniqueInstance | ||
openInWorld; | ||
yourself. | ||
"Workaround for a bug in some Squeak versions. UniqueInstance isn't set when using lazy initialization" | ||
SystemProgressMorph classPool at: #UniqueInstance put: progressMorph. | ||
|
||
self assert: (self currentWorld findA: SystemProgressMorph) notNil. | ||
[SmalltalkCI promptToProceed] | ||
on: ProvideAnswerNotification | ||
do: [:notification | | ||
self assert: (self currentWorld findA: SystemProgressMorph) isNil. | ||
notification resume: true] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.