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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mondrake’s picture

Title: Improve views Ui preview tests » Improve views UI preview tests
mondrake’s picture

Priority: Major » Minor
mondrake’s picture

Category: bug » task
Status: Active » Needs review
FileSize
1.22 KB
1.2 KB

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.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice work!!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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