Skip to content

Commit

Permalink
Merge pull request #6051 from r-richardson/move_exclusive_filter_test
Browse files Browse the repository at this point in the history
Move finished jobs filter subtest to correct file
  • Loading branch information
mergify[bot] authored Nov 7, 2024
2 parents 25b7bc0 + 817cdac commit 46542c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 13 additions & 0 deletions t/ui/01-list.t
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,19 @@ subtest 'filter-finished' => sub {
cmp_ok scalar $driver->find_elements('#results tbody tr', 'css'), '>', scalar @jobs, 'all jobs shown again';
};

subtest 'result filter does not affect scheduled and running jobs' => sub {
$driver->get('/tests?resultfilter=Failed');

my @running_jobs = $driver->find_elements('#running tbody tr');
is scalar @running_jobs, 3, 'Running jobs are displayed';

my @scheduled_jobs = $driver->find_elements('#scheduled tbody tr');
is scalar @scheduled_jobs, 3, 'Scheduled jobs are displayed';

my @finished_jobs = $driver->find_elements('#results tbody tr');
is scalar @finished_jobs, 3, 'Finished jobs table is correctly filtered';
};

subtest 'match parameter' => sub {
$driver->get('/tests?match=staging_e');
wait_for_ajax msg => '"All tests" with match parameter';
Expand Down
13 changes: 0 additions & 13 deletions t/ui/10-tests_overview.t
Original file line number Diff line number Diff line change
Expand Up @@ -623,19 +623,6 @@ 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 {
$driver->get('/tests?resultfilter=Failed');

my @running_jobs = $driver->find_elements('#running tbody tr');
is scalar @running_jobs, 2, 'Running jobs are displayed';

my @scheduled_jobs = $driver->find_elements('#scheduled tbody tr');
is scalar @scheduled_jobs, 4, 'Scheduled jobs are displayed';

my @finished_jobs = $driver->find_elements('#results tbody tr');
is scalar @finished_jobs, 6, 'Finished jobs table is correctly filtered';
};

kill_driver();

done_testing();

0 comments on commit 46542c7

Please sign in to comment.