Conversation
Julesboul
left a comment
There was a problem hiding this comment.
Some things to change.
For testing, try to not depend on methods from your system during assertion. Your point is to check that having some entries, you must get the expected outputs (but you should know these outputs before using your methods)
| self assert: (self recordsTablePresenter roots at: 2) key class equals: DSMouseEnterWindowRecord. | ||
| self assert: (self recordsTablePresenter roots at: 3) key class equals: DSMouseLeaveWindowRecord. | ||
| self assert: self recordsTablePresenter roots last key class equals: DSInspectItRecord | ||
| self assert: presenter roots equals: browser getNumberOfEventsPerType associations |
There was a problem hiding this comment.
The method getNumberOfEventsPerType is used in updateRecordTypesPresenter so this doesn't test anything... You must used hardcoded values as it was done in the previous version of this test
There was a problem hiding this comment.
| DSRecordHistory >> events: aCollectionOfRecords [ | |
| events := aCollectionOfRecords |
| DSRecordBrowserPresenter >> historyActionsFor: aPresenter [ | ||
| "Return a list of actions which can be done on a history." | ||
|
|
||
| ^ SpActionGroup new addActionWith: [ :anItem | | ||
| anItem | ||
| name: 'Inspect history'; | ||
| iconName: #history; | ||
| description: 'Inspect history.'; | ||
| shortcutKey: $h meta; | ||
| action: [ (DSRecordHistory on: aPresenter selectedItem events) inspect ] ] | ||
| ] |
There was a problem hiding this comment.
This feature is not relevant, the history is an object linked to a file (not to a collection of records).
Here I can get an history from a DSWindowActivityRecord and it does not make sens...
In our design, 1 history = 1 file
| DSRecordBrowserPresenter >> windowsActionsFor: aPresenter [ | ||
| "Return a list of actions which can be done on a window." | ||
|
|
||
| ^ SpActionGroup new addActionWith: [ :anItem | | ||
| anItem | ||
| name: 'Inspect'; | ||
| iconName: #inspect; | ||
| description: 'Inspect the selected element.'; | ||
| shortcutKey: $i meta; | ||
| action: [ aPresenter selectedItem inspect ] ] | ||
| ] |
There was a problem hiding this comment.
Seeing all someObjectActionsFor:, it seems that the only action is Inspect but it does not depend on the object (you can do 'inspect' on all your object the same way).
Maybe it can be group as one actionGroup? For basic actions on an object in your tabs
I propose to add few tabs that permits to analyze the data by displaying :