Commit Graph
432 Commits
Author SHA1 Message Date
cacaodev 095864de39 Fixed: CPTabView should not allow empty selection
Before this commit, a tab view could have an empty selection with the
following circumstances:
- The tab view was not created in IB
- the Tab View selection had not binding management

With test.
2016-10-21 10:13:47 +02:00
daboe01 91c52f8ec8 Merge remote-tracking branch 'cappuccino/master' into NEW--CPTextView 2016-09-03 09:40:49 +02:00
daboe01 c139b5eabb Merge remote-tracking branch 'cappuccino/master' into NEW--CPTextView 2016-06-09 19:20:38 +02:00
cacaodev d6dd0e551d Revert "FIXED: CPView received multiple -viewDidHide/Unhide messages"
This reverts commit e58420b031.
2016-06-09 10:13:21 +02:00
daboe01 7195ae6e46 Merge remote-tracking branch 'cappuccino/master' into NEW--CPTextView 2016-06-08 20:05:31 +02:00
cacaodev b587a19a0f NEW: CPViewController -viewWill/DidAppear & -viewWill/DidDisappear
When a view belonging to a CPViewController is hidden, unhidden, added
or removed, its viewController receives the appropriate message.

Added AppKit/CPViewControllerTest.
2016-05-23 16:06:04 +02:00
cacaodev e58420b031 FIXED: CPView received multiple -viewDidHide/Unhide messages
FIXED: when a view is hidden by a hidden superview and added to a non
hidden superview, the -viewDidUnhide message is sent.

With test : CPViewTest.j
2016-05-23 15:39:47 +02:00
daboe01 373ec8b5a1 Merge remote-tracking branch 'cappuccino/master' into NEW--CPTextView 2016-05-15 11:57:52 +02:00
cacaodev c38daac646 Test: test for pr #2449
In CPPredicateEditor, tests that the input predicate is equal to the
output when the right control is editable.
2016-05-14 10:00:44 +02:00
cacaodev a9d643aa55 OJTest for CPCollectionView selectionIndexes, CPCollectionViewItem isSelected, CPSelectionIndexesBinding and CPContentBinding. 2016-05-03 21:51:10 +02:00
Martin Carlberg 699503042f Fixed: First item is always selected if selected binding value is set before content binding value.
Test case is provided.
2016-04-05 23:22:29 +02:00
Alexandre Wilhelm c85355986b Fixed: manual merged with master 2016-03-06 18:47:58 -08:00
Didier Korthoudt 2877178b34 Formatting: following Aparajita's recommandations 2016-01-21 20:46:37 +01:00
Didier Korthoudt 0f30d7744d FIXED: CPTrackingArea incorrect handling of view hierarchy updates while processing events 2016-01-19 07:07:45 +01:00
Aparajita Fishman 932b825818 Merge pull request #2395 from didierkorthoudt/CPTrackingArea
Implementation of CPTrackingArea
2015-12-21 15:23:51 -08:00
Didier Korthoudt 3e17890528 cursor tests in CPViewTest 2015-12-15 23:33:10 +01:00
Didier Korthoudt 89c78f6030 unit-test-additions 2015-12-09 21:38:50 +01:00
Didier Korthoudt e46e1b20de unit-test-v2 2015-12-08 23:09:20 +01:00
Didier Korthoudt dcc0768411 Unit-test+fix 2015-12-05 20:14:24 +01:00
Martin Carlberg 24889f7dcd Fixed: Adjust test cases 2015-10-23 10:19:14 +02:00
Martin Carlberg 3a91f43bbb Fixed: Test cases are working correctly 2015-10-21 12:26:39 +02:00
Martin Carlberg 9946987f69 Fixed: Cache ThemeState for better performance 2015-10-21 12:26:12 +02:00
Alexandre Wilhelm 15d3e4023b Merge remote-tracking branch 'origin' into NEW--CPTextView 2015-09-30 11:30:18 -07:00
cacaodev 3ef1c9167f Merge remote-tracking branch 'upstream/master' into CPTabView
Conflicts:
	AppKit/CPTabView.j
2015-09-29 11:04:51 +02:00
cacaodev 41d259006e Merge remote-tracking branch 'upstream/master' into CPTabView 2015-09-14 18:57:12 +02:00
Alexandre Wilhelm b30103c790 New: added methods viewWillLayout and viewDidLayout
Previously, when a view was about to layout, only layoutSubviews was called. Now the methods viewWillLayout and viewDidLayout are called as well. This is like in Cocoa.

This PR fixed the issue with the appearance and the view based tableView. We now handle everything related with appearance when making the layout of a view.

This PR removed a small optimization in CPView. Now when making setNeedsLayout and setNeedsDisplay, the methods drawRect: and layoutSubviews are always called even if there are not override. (As in cocoa)
2015-08-28 11:11:28 -07:00
Antoine Mercadal 7e4e1ec68f FIXED: lot's of error with CPAppearance 2015-08-14 01:44:22 -07:00
Antoine Mercadal 541a7974e0 NEW: effectiveAppearance and new CPThemeState
Each default (and only supported) CPAppearance now have an associated
theme state. As the appearance is correctly propagated in CPViews
hierarchy, it is now possible to have dark controls when the an
ancestor view has a dark appearance.

Added automated tests
2015-08-13 23:40:27 -07:00
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 4b0fe879cb Test: [[CPApplication alloc] init]; in instance setUp method 2015-07-07 14:46:38 -07:00
Alexandre Wilhelm b87aeffcd8 Test: updated unittest 2015-07-07 14:29:50 -07:00
Alexandre Wilhelm 88aafec6e3 Merge branch 'master' into NEW--CPTextView 2015-07-07 14:29:15 -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
daboe01 799622a932 Merge remote-tracking branch 'upstream/master' into NEW--CPTextView 2015-07-07 18:24:54 +02:00
Alexandre Wilhelm 4c1e22b0f6 Fixed: travis failed because the unittests tried to display a layer
Previously, the unittests for the CPDatePicker broke the tests suite of cappuccino. A CPDatePicker uses a CALayer, and the CALayer display methods wasn't wrap in a #if PLATFOrM(DOM). Now it does, so during the tests we do not try to access do the element document anymore.

This PR fixes also some warnings when compiling.
2015-07-06 14:14:39 -07:00
daboe01 a3b4e8db44 fix non-working unit test 2015-07-04 17:42:07 +02:00
daboe01 f9e8875803 merge current master in 2015-07-04 16:46:24 +02:00
Alexandre Wilhelm 1ad8d34ecb Fixed: fixed travis with datePicker test 2015-07-02 15:12:18 -07:00
Alexandre Wilhelm 1f983db47c Fixed: refactoring of the class _CPDatePickerTextField.j. We now use the method called by interpreteKeyEvents instead of handling the key equivalent in performKeyEquivalent 2015-06-29 14:28:28 -07:00
Alexandre Wilhelm 92cdb27e23 Fixed: documentVisibleRect in CPScrollView does not return the expected result
Previously, the method documentVisibleRect did not return the expected result. An issue happened when using this method on a scaled view. The converted rect was converted in the wrong context.

Unit test in Tests/AppKit/CPScrollViewTest.j

Fixed #2356
2015-05-19 14:30:09 -07:00
Alexandre Wilhelm a884b94ac0 Test: fixe global var in CPTextViewTest.j 2015-05-04 14:02:46 -07:00
Alexandre Wilhelm 194e705982 Test: comment future test for CPTextView 2015-05-01 16:09:08 -07:00
Alexandre Wilhelm 44c686f494 Merge pull request #2323 from mrcarlberg/scroll_rect_to_visible_with_large_rect
Fixed: Method scrollRectToVisible:(CGRect)aRect in CPView didn’t work...
2015-04-13 13:12:27 -07:00
Alexandre Wilhelm 6efe563a69 Fixed: method _initOtherEventWithType: in CPEvent did not save the given windowNumber 2015-04-10 10:51:47 -07:00
Alexandre Wilhelm 82d0f62d73 Added unittest for CPTextView 2015-04-08 13:53:10 -07:00
Alexandre Wilhelm ca778aac70 Merge remote-tracking branch 'origin' into NEW--CPTextView 2015-03-31 15:04:35 -07:00
Antoine Mercadal 007ca4c6b0 Merge pull request #2336 from cpasslack/cpasslack/corruptDecimalNumberAfterDecodingFix
Fixed: Encoding a [CPDecimalNumber zero] causes a corrupt CPDecimalNumbe...
2015-03-31 11:25:20 -07:00
Martin Carlberg b3dfce7b5a Fixed: Compared the rects minimum x value with it self instead of the visible minimum x value. Also fixed the test case to catch this. 2015-03-31 17:30:57 +02:00
cacaodev 7378d06bfd FIXED: CPTabView -insertTabViewItem:atIndex:
Before this commit, the tabViewItems and the segments were 2 different
collections. Any indexed change in the tabViewItems asked to re-sync
the segments making it difficult to maintain any persistent state. Now
the tabView items are the segments content.

Also fixed the selection update when items are removed.
See CPTabViewTest.j  and manual test Manual/CPTabViewNib/
2015-03-27 14:27:46 +01:00
Alexandre Wilhelm ed61e5c7f7 Added test file CPTextViewTest.j 2015-03-23 20:56:40 -07:00