@@ -30,17 +30,43 @@ suite("Quarto basics", function () {
3030 assert . equal ( before , after ) ;
3131 } ) ;
3232
33- roundtripSnapshotTest ( 'valid-basics.qmd' ) ;
33+ // roundtripSnapshotTest('valid-basics.qmd');
3434
35- roundtripSnapshotTest ( 'valid-basics-2.qmd' ) ;
35+ // roundtripSnapshotTest('valid-basics-2.qmd');
3636
37- roundtripSnapshotTest ( 'valid-nesting.qmd' ) ;
37+ // roundtripSnapshotTest('valid-nesting.qmd');
3838
39- roundtripSnapshotTest ( 'invalid.qmd' ) ;
39+ // roundtripSnapshotTest('invalid.qmd');
4040
41- roundtripSnapshotTest ( 'capsule-leak.qmd' ) ;
41+ // roundtripSnapshotTest('capsule-leak.qmd');
42+
43+ test ( "cell formamtmtamt" , async function ( ) {
44+ const { doc } = await openAndShowTextDocument ( "cell-format.qmd" ) ;
45+
46+ //await vscode.commands.executeCommand("quarto.formatCell");
47+ setCursorPosition ( 3 , 1 ) ;
48+ await vscode . commands . executeCommand ( "quarto.formatCell" ) ;
49+ await wait ( 6300 ) ;
50+ // const { before, after } = await roundtrip(doc);
51+
52+ // assert.equal(before, after);
53+ } ) ;
54+
55+ suiteTeardown ( ( ) => {
56+ vscode . window . showInformationMessage ( 'All tests done!' ) ;
57+ } ) ;
4258} ) ;
4359
60+ function setCursorPosition ( line : number , character : number ) {
61+ const editor = vscode . window . activeTextEditor ;
62+ if ( editor ) {
63+ const position = new vscode . Position ( line , character ) ;
64+ const newSelection = new vscode . Selection ( position , position ) ;
65+ editor . selection = newSelection ;
66+ editor . revealRange ( newSelection , vscode . TextEditorRevealType . InCenter ) ; // Optional: scroll to the new position
67+ }
68+ }
69+
4470/**
4571 *
4672 * When the test is run on the dev's machine for the first time, saves the roundtripped file as a snapshot.
0 commit comments