Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291641

[Backport] Add extra test coverage for operators of views date filters

$
0
0

Problem/Motivation

The original report in this issue was about incorrect validation on adding grouped filter by date field with "Is empty(NULL)" or "Is not empty(NULL) operator:

steps to reproduce the problem:
1. edit view, add a filter which field type is date
2. select "Expose this filter to visitors, to allow them to change it"
3. select "Grouped filters"
4. in the group options, select "Is empty(NULL)" or "Is not empty(NULL) as operator
5. input a label for this options
6. Click "Apply (all displays)" button, will cause this issue: "The value is required if title for this item is defined. "
issues
The problems:
"Is empty(NULL)" or "Is not empty(NULL) operator do not need input value, and could not input value, but the group options validator will check it, so could not setup the label for date filter group options.

However, it's not possible to reproduce at this moment. See #8 and #16.

Given the test coverage for mentioned operators is missing, there is a proposal to add extra test coverage for exposed date filters operators, which are using different values. It'll prove that available operators pass the validation and work as expected.

Proposed resolution

Add additional asserts to check that date filter operators, that uses different value properties.

Here is a list of possible variations:

OperatorsExpected values
<, <=, =, !=, >=, ><code>value
between, not between<code>min, max
empty, not empty-

It should be enough to cover at least 1 operator from each row.


Viewing all articles
Browse latest Browse all 291641

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>