@@ -54,61 +54,61 @@ describe('JobsList', () => {
5454 await fireEvent . change ( projectFilter , { target : { value : '1' } } ) ;
5555 table = result . getByRole ( 'table' ) ;
5656 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 1 ) ;
57- expect ( table . querySelectorAll ( 'tbody tr td' ) [ 6 ] . textContent ) . eq ( 'input1' ) ;
57+ expect ( table . querySelectorAll ( 'tbody tr td' ) [ 7 ] . textContent ) . eq ( 'input1' ) ;
5858 await clearFilters ( result ) ;
5959
6060 // Filter by workflow
6161 await fireEvent . change ( workflowFilter , { target : { value : '2' } } ) ;
6262 table = result . getByRole ( 'table' ) ;
6363 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 2 ) ;
64- expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 6 ] . textContent ) . eq ( 'input3' ) ;
65- expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 6 ] . textContent ) . eq ( 'input2' ) ;
64+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 7 ] . textContent ) . eq ( 'input3' ) ;
65+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 7 ] . textContent ) . eq ( 'input2' ) ;
6666 await clearFilters ( result ) ;
6767
6868 // Filter by input dataset
6969 await fireEvent . change ( inputDatasetFilter , { target : { value : '3' } } ) ;
7070 table = result . getByRole ( 'table' ) ;
7171 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 1 ) ;
72- expect ( table . querySelectorAll ( 'tbody tr td' ) [ 6 ] . textContent ) . eq ( 'input2' ) ;
72+ expect ( table . querySelectorAll ( 'tbody tr td' ) [ 7 ] . textContent ) . eq ( 'input2' ) ;
7373 await clearFilters ( result ) ;
7474
7575 // Filter by output dataset
7676 await fireEvent . change ( outputDatasetFilter , { target : { value : '4' } } ) ;
7777 table = result . getByRole ( 'table' ) ;
7878 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 1 ) ;
79- expect ( table . querySelectorAll ( 'tbody tr td' ) [ 7 ] . textContent ) . eq ( 'output2' ) ;
79+ expect ( table . querySelectorAll ( 'tbody tr td' ) [ 8 ] . textContent ) . eq ( 'output2' ) ;
8080 await clearFilters ( result ) ;
8181
8282 // Filter by job status
8383 await fireEvent . change ( statusFilter , { target : { value : 'submitted' } } ) ;
8484 table = result . getByRole ( 'table' ) ;
8585 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 1 ) ;
86- expect ( table . querySelectorAll ( 'tbody tr td' ) [ 6 ] . textContent ) . eq ( 'input3' ) ;
86+ expect ( table . querySelectorAll ( 'tbody tr td' ) [ 7 ] . textContent ) . eq ( 'input3' ) ;
8787 await clearFilters ( result ) ;
8888
8989 // Verify default sorting
9090 table = result . getByRole ( 'table' ) ;
91- expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 2 ] . textContent ) . eq (
91+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 3 ] . textContent ) . eq (
9292 '10/30/2023, 10:30:38 AM'
9393 ) ;
94- expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 2 ] . textContent ) . eq (
94+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 3 ] . textContent ) . eq (
9595 '10/30/2023, 10:15:38 AM'
9696 ) ;
97- expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 2 ] . textContent ) . eq (
97+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 3 ] . textContent ) . eq (
9898 '10/30/2023, 10:00:38 AM'
9999 ) ;
100100
101101 // Sort by start date
102- const startDateSorter = table . querySelector ( 'thead th:nth-child(3 )' ) ;
102+ const startDateSorter = table . querySelector ( 'thead th:nth-child(4 )' ) ;
103103 await fireEvent . click ( startDateSorter ) ;
104104 table = result . getByRole ( 'table' ) ;
105- expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 2 ] . textContent ) . eq (
105+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 3 ] . textContent ) . eq (
106106 '10/30/2023, 10:00:38 AM'
107107 ) ;
108- expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 2 ] . textContent ) . eq (
108+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 3 ] . textContent ) . eq (
109109 '10/30/2023, 10:15:38 AM'
110110 ) ;
111- expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 2 ] . textContent ) . eq (
111+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 3 ] . textContent ) . eq (
112112 '10/30/2023, 10:30:38 AM'
113113 ) ;
114114 } ) ;
@@ -169,19 +169,19 @@ describe('JobsList', () => {
169169 } ) ;
170170 let table = result . getByRole ( 'table' ) ;
171171 expect ( table . querySelectorAll ( 'tbody tr' ) . length ) . eq ( 3 ) ;
172- expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 0 ] . textContent ) . contain ( 'submitted' ) ;
173- expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 0 ] . textContent ) . contain ( 'failed' ) ;
174- expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 0 ] . textContent ) . contain ( 'done' ) ;
172+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 1 ] . textContent ) . contain ( 'submitted' ) ;
173+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 1 ] . textContent ) . contain ( 'failed' ) ;
174+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 1 ] . textContent ) . contain ( 'done' ) ;
175175
176176 vi . advanceTimersByTime ( 3500 ) ;
177177 vi . useRealTimers ( ) ;
178178 // trigger table update
179179 await new Promise ( setTimeout ) ;
180180
181181 table = result . getByRole ( 'table' ) ;
182- expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 0 ] . textContent ) . contain ( 'done' ) ;
183- expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 0 ] . textContent ) . contain ( 'failed' ) ;
184- expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 0 ] . textContent ) . contain ( 'done' ) ;
182+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(1) td' ) [ 1 ] . textContent ) . contain ( 'done' ) ;
183+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(2) td' ) [ 1 ] . textContent ) . contain ( 'failed' ) ;
184+ expect ( table . querySelectorAll ( 'tbody tr:nth-child(3) td' ) [ 1 ] . textContent ) . contain ( 'done' ) ;
185185 } finally {
186186 vi . useRealTimers ( ) ;
187187 }
0 commit comments