Commit Graph
5 Commits
Author SHA1 Message Date
David Richardson 333e448f44 AppKit: Prevent premature display during CPTableView view enumeration
-_enumerateViewsInRows:columns:usingBlock: and
-_enumerateViewsInRows:tableColumns:usingBlock: previously executed a run loop
pass before visiting views. Running timers, delayed performs, and the display
server mid-operation caused views to render prematurely before load, selection,
or expansion changes completed.

- CPTableView: Restrict -_enumerateViewsInRows:columns:usingBlock: and
  -_enumerateViewsInRows:tableColumns:usingBlock: to enumerating existing
  views without pumping the run loop.

- CPTableView: Call -layoutIfNeeded to complete reloads in
  -enumerateAvailableViewsUsingBlock: and -removeTableColumn:.

- Tests: Update tests affected by the removal of the implicit run loop pass
  and the interaction test helper fix—dispatch events once through the
  application in the interaction test helper (which command-click and
  shift-click tests depend on), force layout prior to assertions in the reload
  and lazy preparation tests, and target clicks below the rows of a
  scroll-view-hosted table in the click-outside tests.
2026-11-18 09:57:41 -06: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 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
Alexandre Wilhelm 3b2635014c Fixed: the developer need to perform the run loop to get some informations in CPTableView. Now, the run loop is performed by the tableview 2015-03-15 19:38:06 -07:00
cacaodev 57408d18ae New: ojunit tests for CPTableView -reloadData & -removeTableColumn:
-removeTableColumn: is failing with an « index out of bounds » error.
2014-04-19 09:05:14 +02:00