@@ -37,7 +37,6 @@ test.use({
3737for ( const { env, data, rowIndexOffset : indexOffset , tags : testTags = [ ] } of testCases ) {
3838 test . describe ( 'Data Explorer: Copy/Paste' , { tag : [ tags . WEB , tags . DATA_EXPLORER , ...testTags ] } , ( ) => {
3939
40-
4140 test . beforeEach ( async function ( { app, openDataFile, hotKeys } ) {
4241 const { dataExplorer, console, sessions, variables } = app . workbench ;
4342
@@ -68,7 +67,7 @@ for (const { env, data, rowIndexOffset: indexOffset, tags: testTags = [] } of te
6867 await clipboard . expectClipboardTextToBe ( expectedData [ 'col3' ] , '\n' ) ;
6968
7069 // verify copy and paste on rows
71- await dataExplorer . grid . clickRowHeader ( 9 + indexOffset ) ;
70+ await dataExplorer . grid . clickRowHeader ( 9 ) ;
7271 await clipboard . copy ( ) ;
7372 await clipboard . expectClipboardTextToBe ( expectedData [ 'row9' ] , '\n' ) ;
7473
@@ -83,21 +82,19 @@ for (const { env, data, rowIndexOffset: indexOffset, tags: testTags = [] } of te
8382 await clipboard . expectClipboardTextToBe ( expectedData [ 'col0_col1' ] , '\n' ) ;
8483 } ) ;
8584
86- test . skip ( `${ env } - Copy and paste works on cells, rows, columns, and ranges of sorted data` , {
87- annotation : [ { type : 'issue' , description : 'https://github.com/posit-dev/positron/issues/9344' } ]
88- } , async function ( { app } ) {
85+ test ( `${ env } - Copy and paste works on cells, rows, columns, and ranges of sorted data` , async function ( { app } ) {
8986 const { dataExplorer, clipboard } = app . workbench ;
9087
9188 // verify copy and paste on columns
9289 await dataExplorer . grid . selectColumnAction ( 4 , 'Sort Descending' ) ;
9390 await dataExplorer . grid . clickColumnHeader ( 'column3' ) ;
9491 await clipboard . copy ( ) ;
95- await clipboard . expectClipboardTextToBe ( expectedData [ 'col3' ] ) ;
92+ await clipboard . expectClipboardTextToBe ( expectedData [ 'col3_sorted_desc' ] , '\n' ) ;
9693
97- // verify copy and paste on rows - issue 9344
98- await dataExplorer . grid . clickRowHeader ( 4 + indexOffset ) ;
94+ // verify copy and paste on rows
95+ await dataExplorer . grid . clickRowHeader ( 4 ) ;
9996 await clipboard . copy ( ) ;
100- await clipboard . expectClipboardTextToBe ( expectedData [ 'row4' ] ) ;
97+ await clipboard . expectClipboardTextToBe ( expectedData [ 'row4' ] , '\n' ) ;
10198
10299 // verify copy and paste on cell
103100 await dataExplorer . grid . clickCell ( 6 , 4 ) ;
@@ -107,7 +104,7 @@ for (const { env, data, rowIndexOffset: indexOffset, tags: testTags = [] } of te
107104 // verify copy and paste on range
108105 await dataExplorer . grid . selectRange ( { start : { row : 0 , col : 2 } , end : { row : 1 , col : 3 } } ) ;
109106 await clipboard . copy ( ) ;
110- await clipboard . expectClipboardTextToBe ( 'column2\tcolumn3\n47\t99\n8\t89' ) ;
107+ await clipboard . expectClipboardTextToBe ( 'column2\tcolumn3\n47\t99\n8\t89' , '\n' ) ;
111108 } ) ;
112109
113110 test ( `${ env } - Copy and paste of ranges works with pinned data` , async function ( { app } ) {
0 commit comments