-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-filling the name text presenter in file dialogs.
Add tests.
- Loading branch information
Hernán Morales Durand
committed
Mar 12, 2024
1 parent
cbe2b6c
commit a5fdf3b
Showing
3 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/NewTools-FileBrowser-Tests/StSaveFilePresenterTest.class.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,34 @@ | ||
Class { | ||
#name : 'StSaveFilePresenterTest', | ||
#superclass : 'StFilePresenterTest', | ||
#category : 'NewTools-FileBrowser-Tests-UI', | ||
#package : 'NewTools-FileBrowser-Tests', | ||
#tag : 'UI' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
StSaveFilePresenterTest >> dialogClass [ | ||
|
||
^ StSaveFilePresenter | ||
] | ||
|
||
{ #category : 'tests' } | ||
StSaveFilePresenterTest >> testSetNameText [ | ||
|
||
| preFillDocName | | ||
|
||
preFillDocName := 'mydocument.doc'. | ||
dialog nameText: preFillDocName. | ||
self | ||
assert: dialog nameText | ||
equals: preFillDocName | ||
] | ||
|
||
{ #category : 'tests' } | ||
StSaveFilePresenterTest >> testWhenChangeDirectoryShouldFilesListContainsHisChildren [ | ||
| newDirectory | | ||
newDirectory := (root / 'dir') asFileReference. | ||
dialog defaultFolder: newDirectory. | ||
self | ||
assert: (dialog fileReferenceTable items includesAll: newDirectory children) | ||
] |
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