-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructional prompt after loading project (#469)
Closes #456. Co-authored-by: Fabio Niephaus <code@fniephaus.com>
- Loading branch information
1 parent
c105cd2
commit 03d224e
Showing
22 changed files
with
105 additions
and
11 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
5 changes: 5 additions & 0 deletions
5
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,5 @@ | ||
helpers | ||
promptToProceed | ||
|
||
"Delegate to method of different name to avoid infinite recursion if promptToProceed isn't implemented for this platform" | ||
^ self platformClass promptToProceedImpl |
4 changes: 4 additions & 0 deletions
4
repository/SmalltalkCI-Core.package/SmalltalkCI.class/class/promptToProceedImpl.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,4 @@ | ||
helpers | ||
promptToProceedImpl | ||
"Proceed by default" | ||
^ 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
8 changes: 8 additions & 0 deletions
8
...sitory/SmalltalkCI-Pharo-Core.package/SmalltalkCIPharo.class/class/promptToProceedImpl.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,8 @@ | ||
helpers | ||
promptToProceedImpl | ||
|
||
^ 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' |
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
4 changes: 2 additions & 2 deletions
4
repository/SmalltalkCI-Pharo-Core.package/monticello.meta/version
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
Empty file.
14 changes: 14 additions & 0 deletions
14
...malltalkCI-Pharo-Tests.package/SmalltalkCIPharoTest.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,14 @@ | ||
testing | ||
testPromptToProceed | ||
"When testing on old versions of Pharo, a Non-interactive UIManager might be installed in headless mode, | ||
which will behave differently from the MorphicUIManager i.e. it doesn't allow interactive | ||
requests like confirm: . As promptToProceed only really makes sense in an interactive context, | ||
always test with the MorphicUIManager" | ||
|oldUIManager| | ||
oldUIManager := UIManager default. | ||
UIManager default: MorphicUIManager new. | ||
|
||
[self should: [SmalltalkCI promptToProceed] raise: ProvideAnswerNotification. | ||
self assert: ([SmalltalkCI promptToProceed] valueSupplyingAnswer: true). | ||
self deny: ([SmalltalkCI promptToProceed] valueSupplyingAnswer: false)] | ||
ensure: [UIManager default: oldUIManager] |
5 changes: 5 additions & 0 deletions
5
repository/SmalltalkCI-Pharo-Tests.package/SmalltalkCIPharoTest.class/methodProperties.json
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,5 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"testPromptToProceed" : "LM 9/4/2020 15:26" } } |
14 changes: 14 additions & 0 deletions
14
repository/SmalltalkCI-Pharo-Tests.package/SmalltalkCIPharoTest.class/properties.json
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,14 @@ | ||
{ | ||
"category" : "SmalltalkCI-Pharo-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "SmalltalkCIPharoTest", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"type" : "normal" } |
4 changes: 2 additions & 2 deletions
4
repository/SmalltalkCI-Pharo-Tests.package/monticello.meta/version
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
14 changes: 14 additions & 0 deletions
14
...tory/SmalltalkCI-Squeak-Core.package/SmalltalkCISqueak.class/class/promptToProceedImpl.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,14 @@ | ||
helpers | ||
promptToProceedImpl | ||
|
||
| result | | ||
"First, close any remaining progress bars, that are caused by reading the setup script" | ||
SystemProgressMorph reset. | ||
|
||
result := (UIManager default | ||
chooseFrom: #('Proceed' 'Inspect image') | ||
title: '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.'). | ||
"Depending on the version of Squeak, valueSupplyingAnswer might return either the | ||
value or the label, and in all versions, nil might be returned if the user cancels the operation." | ||
^ result = 1 or: [result = 'Proceed'] |
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.