Skip to content

Regression: Filter-by seems to not pull through only cases matching filter type. #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luke-hill opened this issue Aug 5, 2021 · 3 comments
Labels

Comments

@luke-hill
Copy link
Contributor

Previously in cucumber 5.3 -> cucumber-html-formatter 9 this functionality worked
Currently in cucumber 7 -> cucumber-html-formatter 16 this functionality is no longer working

Describe the bug
Filter-by passed seems to pull in additional test cases

To Reproduce
Steps to reproduce the behavior:
I have a report that has the following
passed 128 scenarios
skipped 24 scenarios
unknown 59 scenarios

Expected behavior
Filtering works returns only the ones checked

Screenshots
Can pair and show video

Desktop (please complete the following information):

Implementation	cucumber-ruby - 7.0.0
Runtime	ruby - 2.7.3
OS	linux - cucumber/cucumber-react#1 SMP Tue Jun 15 20:57:50 UTC 2021
CPU	x86_64

Additional context
In console we get one warning

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform
@aslakhellesoy aslakhellesoy transferred this issue from cucumber/react-components Aug 12, 2021
@mattwynne mattwynne transferred this issue from cucumber/common Apr 1, 2022
@pk
Copy link

pk commented Apr 11, 2022

I'm running on Cucumber JS 8.0.0 which uses @cucumber/html-formatter 19.0.0 and I have same problem when searching the report.

We tag some of our scenarios with the @bug tag or @JIRA-ID tags and I thought we will be easily search all the scenarios related to the bugs just by searching by the @bug tag.

But search returns some random selection of the scenarios where the tag does not even appear. Is this related to the cucumber/react or the cucumber/html-formatter? It almost seems the React app is responsible for search?

@mpkorstanje mpkorstanje transferred this issue from cucumber/html-formatter Apr 11, 2022
@mpkorstanje
Copy link
Contributor

Indeed, search is implemented in the react app.

Here specifically for any one who wants to take a look:

https://github.com/cucumber/cucumber-react/blob/main/src/search/Search.ts

@pk
Copy link

pk commented Apr 11, 2022

I've looked into the source code and more specifically to the specs for the tag search and those specs are quite convincing, in terms of what they test and if they pass it should be working...

HOWEVER:
It seems that the filters and search are very much confused with the Features which use the Rule keyword. When I effectively tell the report not to show any issues (unticking all the filters) what is left are the Features with the Rule in them.

Search for Features without the Rule keyword seems to work as expected, it's just that the Features with Rule are always mixed in to the results.

I think that changing the test suite fixture to the following would reveal the problems.

@system
Feature: Solar System
  @star
  Scenario: Sun
    Given is the center of galaxy

  Rule: Our Galaxy
    @planet
    Scenario: Earth
      Given is the sixth planet from the Sun

    @dwarf
    Scenario: Pluto
      Given it is not really a planet

This fixture would produce report where the feature would be visible all the time regardless of the Filters.

I'll verify this by trying to run the test suite later.

Dbuggerx added a commit to Dbuggerx/gherkin-utils that referenced this issue Dec 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants