Commit Graph
19 Commits
Author SHA1 Message Date
Alexandre Wilhelm 923d32ee6d Test: finally put the init of the CPApplication in the instance method setUp. See previous commit #6fe9dae3d62af995f2481bfebdd706aeb0b21365 2015-07-07 15:04:29 -07:00
Alexandre Wilhelm 6fe9dae3d6 Fixed: AppKit unit-tests are not standalone
Previously, every AppKit tests used the same sharedApplication. Due to this implementation, a could not pass because a previous test made failed the current test. For instance, a test could fail because the window of the previous test resigned (just imagine a new window is the key window in the current test), and this resign could raise an error. The error was displayed for the current test thought this test was perfect !

We now instead of using sharedApplication create a new CPApplication per unit-test file in the class method setUp.
2015-07-07 14:12:19 -07:00
Antoine Mercadal 243024e232 Fix broken tests due to new objj type checks 2014-11-26 13:12:39 -08:00
Alexandre Wilhelm 3e4c03852d Fixed: Memory leaks in CPOutlineView + corrupted itemInfos dictionary
Previously, when reloading a CPOutlineView with different datas than before, the CPOutlineView kept a reference of the previous datas.
Now, when reloading, the CPOutlineView will delete these references when we don't need it anymore. For that, the CPOutlineView will only try to delete the previous reference when we have reloaded the children of a node, otherwise it will keep the other references.

This PR fix some issue with the following methods :

- (BOOL)isExpandable:(id)anItem;
- (BOOL)isItemExpanded:(id)anItem;
- (CPInteger)rowForItem:(id)anItem;
- (CPInteger)levelForItem:(id)anItem;
- (id)itemAtRow:(CPInteger)aRow;
- (CPInteger)levelForItem:(id)anItem;
- (CPInteger)levelForRow:(CPInteger)aRow;

Previously these methods took care about not displayed items. Now they just work with displayed items.

Added unit-tests in Test/AppKit/CPOutlineViewTest.j

Test app in Test/Manual/CPOutlineViewTestCib
2014-08-08 15:05:24 -07:00
Bruce Doan 6f8d6a5b25 Some minor fixes to pass the capp_lint checks 2013-10-09 00:09:30 +07:00
Bruce Doan 8503081a6f PATCH: Implement shouldExpand/Collapse delegate for CPOutlineView 2013-10-06 23:47:25 +07:00
Alexander Ljungberg 6281c6469b Fix unit test warnings. 2013-01-24 00:08:47 +00:00
Martin Carlberg c297e926f9 Compiler now works with jake and can compiler the whole Cappuccino framework. A lot of test cases still fail 2012-12-16 17:38:47 +01:00
Antoine Mercadal 2f428fa389 test item visibility when expanding/collapsing items 2012-09-10 15:19:32 -07:00
Alexander Ljungberg 6b8c85df7c Additional testing for outline view archiving. 2011-01-14 19:59:25 -03:00
Alexander Ljungberg b7bdec189a Fixed: when an outline view node was expanded, selections below it would not stick to their items if the newly expanded node also had previously expanded children. 2011-01-14 12:10:52 -03:00
Alexander Ljungberg 2a27a87ae6 Fixed: CPOutlineView could not be archived with CPCoding. Closes #1093.
This fixes the exception "[_CPOutlineViewTableViewDataSource encodeWithCoder:] unrecognized selector sent to instance".
2011-01-13 22:18:05 -03:00
Alexander Ljungberg 6bc109f7fc Optimised: outline view expandItem:expandChildren:YES sent repeated selection change notifications. 2011-01-13 20:51:43 -03:00
Alexander Ljungberg 2d603df83c Fixed: outline view's collapseItem sent up selection notifications in triplicate, each of them at the wrong time. 2011-01-13 20:03:06 -03:00
Alexander Ljungberg dcf440396d Fixed: the outline view was temporarily inconsistent to outside observers while expanding a node.
In particular, a selection did change notification was sent before the rows the selection referred to had had a chance to be loaded.
2011-01-13 18:57:36 -03:00
Alexander Ljungberg c53fff058b Preserve selection when expanding items in an outline view. 2011-01-05 21:25:57 -03:00
Alexander Ljungberg c836bd48e0 Preserve selection when collapsing items in an outline view.
This fixes the error where if a row was selected below a certain item and that item was collapsed, the row selection would remain fixed in place even while the item it was highlighting moved upwards.
2011-01-05 21:09:19 -03:00
Alexander Ljungberg ec675a5662 Deselect outline view items when their ancestor is collapsed. 2011-01-05 20:41:26 -03:00
Alexander Ljungberg 02e72493ef Unit test outline view data loading and item collapse. 2011-01-05 20:40:30 -03:00