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

Have filter options only affect finished jobs #6044

Conversation

r-richardson
Copy link
Contributor

This PR ensures the result filter options only affects the finished jobs table, meaning the scheduled and running jobs tables are no longer affected.

Related Issue: https://progress.opensuse.org/issues/65205

example_screenshot

This commit ensures the result filter options only affects the finished jobs table, meaning the scheduled and running jobs tables are no longer affected.

Related Issue: https://progress.opensuse.org/issues/65205
@r-richardson r-richardson force-pushed the 65205_test_filtering_affected_tables branch from d7a4eb2 to ef80776 Compare November 4, 2024 13:14
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.98%. Comparing base (ebe44db) to head (ef80776).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6044   +/-   ##
=======================================
  Coverage   98.98%   98.98%           
=======================================
  Files         395      395           
  Lines       39417    39425    +8     
=======================================
+ Hits        39017    39025    +8     
  Misses        400      400           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -402,6 +402,10 @@ function renderTestLists() {

// add a handler for the actual filtering
$.fn.dataTable.ext.search.push(function (settings, data, dataIndex) {
if (settings.nTable.getAttribute('id') !== 'results') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether this could be improved. This function is still called for every entry of each table. Can it be registered only for the finished table?
I don't know myself right now how to do it, and it's not really a problem, as it returns immediately, but maybe you could have a look?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look at https://datatables.net/plug-ins/filtering/ and couldn't find out how to add a function to only one of the tables. Maybe leave it like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look but didn't yet find a way to register a such a function exclusively to a specific table, maybe afnFiltering might work

@mergify mergify bot merged commit 9ae638b into os-autoinst:master Nov 4, 2024
46 checks passed
@r-richardson r-richardson deleted the 65205_test_filtering_affected_tables branch November 5, 2024 01:53
@@ -607,6 +607,19 @@ subtest "job dependencies displayed on 'Test result overview' page" => sub {
'parent job was highlighted correctly';
};

subtest 'result filter does not affect scheduled and running jobs' => sub {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look close enough - I think this test belongs in t/ui/01-list.t.
In t/ui/10-tests_overview.t we are testing /tests/overview, and your added test is the only one testing the /tests "all tests" page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants