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.

#3 2100323-views_ui_preview_test-FAIL.patch1.2 KBmondrake
FAILED: [[SimpleTest]]: [MySQL] 59,299 pass(es), 22 fail(s), and 36 exception(s).
[ View ]
#3 2100323-views_ui_preview_test-3.patch1.22 KBmondrake
PASSED: [[SimpleTest]]: [MySQL] 59,258 pass(es).
[ View ]


Title:Improve views Ui preview testsImprove views UI preview tests

Priority:Major» Minor

Category:bug» task
Status:Active» Needs review
new1.22 KB
PASSED: [[SimpleTest]]: [MySQL] 59,258 pass(es).
[ View ]
new1.2 KB
FAILED: [[SimpleTest]]: [MySQL] 59,299 pass(es), 22 fail(s), and 36 exception(s).
[ View ]

The 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.

Status:Needs review» Reviewed & tested by the community

Nice work!!

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.