{"action":"created","issue":{"url":"https://api.github.com/repos/TestFX/TestFX/issues/242","labels_url":"https://api.github.com/repos/TestFX/TestFX/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/TestFX/TestFX/issues/242/comments","events_url":"https://api.github.com/repos/TestFX/TestFX/issues/242/events","html_url":"https://github.com/TestFX/TestFX/issues/242","id":120862488,"number":242,"title":"Wait until documentation out of date","user":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars.githubusercontent.com/u/1323708?v=3","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T20:39:31Z","updated_at":"2015-12-07T21:57:08Z","closed_at":null,"body":"This wiki article is out of date.\r\nhttps://github.com/TestFX/TestFX/wiki/Waiting\r\n\r\nHow should waiting work with the current version of testfx?"},"comment":{"url":"https://api.github.com/repos/TestFX/TestFX/issues/comments/162678033","html_url":"https://github.com/TestFX/TestFX/issues/242#issuecomment-162678033","issue_url":"https://api.github.com/repos/TestFX/TestFX/issues/242","id":162678033,"user":{"login":"hastebrot","id":496255,"avatar_url":"https://avatars.githubusercontent.com/u/496255?v=3","gravatar_id":"","url":"https://api.github.com/users/hastebrot","html_url":"https://github.com/hastebrot","followers_url":"https://api.github.com/users/hastebrot/followers","following_url":"https://api.github.com/users/hastebrot/following{/other_user}","gists_url":"https://api.github.com/users/hastebrot/gists{/gist_id}","starred_url":"https://api.github.com/users/hastebrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hastebrot/subscriptions","organizations_url":"https://api.github.com/users/hastebrot/orgs","repos_url":"https://api.github.com/users/hastebrot/repos","events_url":"https://api.github.com/users/hastebrot/events{/privacy}","received_events_url":"https://api.github.com/users/hastebrot/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T21:57:08Z","updated_at":"2015-12-07T21:57:08Z","body":"There is a task in #167 that tracks the state of the new `WaitUntilSupport` service. `FxRobot` will contain `waitUntil()`. The old API has some flaws, e.g. it only accepts an integer for seconds for wait time, but no milliseconds. The new implemention will also e.g. support waiting for `BooleanProperty`s (which lays the foundation to support an API similar to MarvinFX, see #84). `FxRobot::sleep(int, TimeUnit`) is already implemented.\r\n\r\nThe old API has the form (you can still use it using the module `testfx-legacy`):\r\n\r\n- `<T extends Node> void waitUntil(T node, Predicate<T> condition)`\r\n- `<T extends Node> void waitUntil(T node, Predicate<T> condition, int timeoutInSeconds)`\r\n- `void waitUntil(Node node, Matcher<Object> condition)`\r\n- `void waitUntil(Node node, Matcher<Object> condition, int timeoutInSeconds)`\r\n- `void waitUntil(T value, Matcher<? super T> condition)`\r\n- `void waitUntil(T value, Matcher<? super T> condition, int timeoutInSeconds)`\r\n- `<T> void waitUntil(Callable<T> callable, Matcher<? super T> condition)`\r\n- `<T> void waitUntil(Callable<T> callable, Matcher<? super T> condition, int timeoutInSeconds)`\r\n\r\nWhere the default `timeoutInSeconds` is set to `15`.\r\n\r\nThe internal methods for the new `WaitUntilSupport` (`FxRobot::waitUntil()` respectively), have the form:\r\n\r\n- `<T> T waitFor(long timeout, TimeUnit timeUnit, Future<T> future) throws TimeoutException`\r\n- `void waitFor(long timeout, TimeUnit timeUnit, Callable<Boolean> condition) throws TimeoutException`\r\n- `void waitFor(long timeout, TimeUnit timeUnit, ObservableBooleanValue booleanValue) throws TimeoutException`\r\n\r\nThere are some open questions regarding the API design. First of all `waitFor()` should provide methods that use a default `timeout`. There should also be methods that use `timeout` and `timeUnit` instead of `timeoutInSeconds`. TestFX 4 has a new type-aware `Matcher` system, so `Matcher<Object>` should be replaced with `Matcher<T extends Node>`. Instead of `Callable<T>` we can now use `NodeQuery`s, that &mdash; as a bonus &mdash; also accept `Matcher`s.\r\n\r\n\r\n"}}