Skip to content
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

Filter by feature #295

Closed
mgalbis opened this issue Sep 12, 2024 · 0 comments
Closed

Filter by feature #295

mgalbis opened this issue Sep 12, 2024 · 0 comments
Labels
enhancement New feature or request plugin:html-report HTML report plugin functionality
Milestone

Comments

@mgalbis
Copy link
Collaborator

mgalbis commented Sep 12, 2024

Include functionality so that the text input for filtering scenarios can also filter tags and feature names.

The funcionality should be included in plugins/html-report-wakamiti-plugin/src/main/resources/lib/global.js:183.

Suggestion:

if (text) {
        const search = o => o.n.toLowerCase().includes(text)
            || o.g?.some((it) => ('@' + it).toLowerCase().includes(text))
            || o.l?.some((it) => it.toLowerCase().includes(text));
        
        aux = aux.reduce((rf, f) => {
            const filtered = f.c.reduce((rs, sc) => {
                if (sc.t === "AGGREGATOR") {
                    sc.c = sc.c.filter(search);
                    if (sc.c.length > 0) rs.push(sc);
                } else if (search(sc)) {
                    rs.push(sc);
                }
                return rs;
            }, []);
            if (filtered.length > 0) f.c = filtered;
            if (filtered.length > 0 || search(f)) rf.push(f);
            return rf;
        }, []);
    }
@mgalbis mgalbis added enhancement New feature or request plugin:html-report HTML report plugin functionality labels Sep 12, 2024
@mgalbis mgalbis added this to the v2.7.0 milestone Sep 12, 2024
@mgalbis mgalbis closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin:html-report HTML report plugin functionality
Projects
None yet
Development

No branches or pull requests

1 participant