Problem/Motivation

We have decent test coverage of most of our Views plugins in terms of Functional tests for using views that involve our plugins.
However, we don't have any test coverage of the Views UI parts of the plugins themselves (e.g. settings forms for configuring filters, etc).

For example, this led to #3087201: Views exposed filter for Administrative Area based on exposed Country Code filter not working where the views settings UI for the administrative area filter was broken in #3034122: Rename the 'country_code' views field and filter to 'country' and no one knew about it at the time.

Proposed resolution

Add some FunctionalJavascript tests that confirm the settings forms (and other UI?) of our Views plugins continues to work as expected.

Remaining tasks

Do it.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Comments

dww created an issue. See original summary.

sickness29’s picture

Assigned: Unassigned » sickness29
sickness29’s picture

Assigned: sickness29 » Unassigned
Status: Active » Needs review
StatusFileSize
new30.23 KB

Added UI tests for views handlers provided by address module.
There are 3 cases, each for field, filter and sort handlers.

During test development I found issue with ajax on administrative_area filter handler: when filter is configured right after it's added the ajax in options form does not behave correctly. When country source is selected the options form is closed and user is taken to previous filters selection screen. This happens because ajax in form was initiated during views ajax call and it has wrong url, so I checked how views module does this and found web/core/modules/views/src/Plugin/views/field/EntityField.php:477 which does the trick.

Please let me know if I should change task description to include info on this issue.

  • bojanz committed c1a7211e on 2.0.x authored by sickness29
    Issue #3087833 by sickness29: Add FunctionalJavascript tests for Views...

  • bojanz committed 7941b571 on 8.x-1.x authored by sickness29
    Issue #3087833 by sickness29: Add FunctionalJavascript tests for Views...
bojanz’s picture

Status: Needs review » Fixed

Thank you!

  • bojanz committed fd120136 on 2.0.x
    Revert "Issue #3087833 by sickness29: Add FunctionalJavascript tests for...
bojanz’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Fixed » Needs work

Had to revert this from 2.0.x because it wasn't passing.

sickness29’s picture

Status: Needs work » Needs review
StatusFileSize
new30.22 KB

After update the code for Madrid administrative area became M as seen in vendor/commerceguys/addressing/src/Subdivision/SubdivisionUpdater.php:273
So I had to update test data and test should pass now

  • bojanz committed aad65eef on 2.0.x
    Issue #3087833 by sickness29, bojanz: Add FunctionalJavascript tests for...
bojanz’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

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