-
Notifications
You must be signed in to change notification settings - Fork 208
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
Have filter options only affect finished jobs #6044
Conversation
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
d7a4eb2
to
ef80776
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
@@ -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') { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
@@ -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 { |
There was a problem hiding this comment.
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.
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