Follow-up from #2048309-2: Views UI Preview - navigation is broken.
Now that we have #2074037: Add drupalPostUrl() — drupalPost()/drupalPostAjax() are for forms only, D8 JS performs non-form HTTP requests and #2087637: Add a drupalProcessAjaxResponse() method committed, we have better tools and can come back to the views UI PreviewTest that was not satisfactory in [#2048309-2: Views UI Preview - navigation is broken.
Since clicking AJAX enabled links in the preview is not processed through the the form API, we can use the new drupalPost and drupalProcessAjaxResponse methods, instead of drupalPostAjaxForm.
Working on a patch.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2100323-views_ui_preview_test-FAIL.patch | 1.2 KB | mondrake |
#3 | 2100323-views_ui_preview_test-3.patch | 1.22 KB | mondrake |
Comments
Comment #1
mondrakeComment #2
mondrakeComment #3
mondrakeThe patches here are a tune up of the code in the comment #2087637-5: Add a drupalProcessAjaxResponse() method, showing the use case for the drupalProcessAjaxResponse method.
The FAIL patch shows how if we are missing the 'js' => 'true' key in the AJAX POST, then the preview is not updated upon clicking a page in the pager. The other is the patch according to what said above.
Comment #4
dawehnerNice work!!
Comment #5
webchickCommitted and pushed to 8.x. Thanks!