@@ -4,7 +4,7 @@ import { exampleWorkspacePath, exampleWorkspaceOutPath, copyFile, wait } from ".
4
4
import { isQuartoDoc } from "../core/doc" ;
5
5
import { extension } from "./extension" ;
6
6
7
- const APPROX_TIME_TO_OPEN_VISUAL_EDITOR = 1600 ;
7
+ const APPROX_TIME_TO_OPEN_VISUAL_EDITOR = 1700 ;
8
8
9
9
suite ( "Quarto basics" , function ( ) {
10
10
// Before we run any tests, we should copy any files that get edited in the tests to file under `exampleWorkspaceOutPath`
@@ -24,11 +24,13 @@ suite("Quarto basics", function () {
24
24
// Note: the following tests may be flaky. They rely on waiting estimated amounts of time for commands to complete.
25
25
test ( "Can edit in visual mode" , async function ( ) {
26
26
// don't run this in CI for now because we haven't figured out how to get the LSP to start
27
- if ( process . env [ 'CI' ] ) this . skip ( ) ;
27
+ // if (process.env['CI']) this.skip();
28
28
29
29
const doc = await vscode . workspace . openTextDocument ( exampleWorkspaceOutPath ( "hello.qmd" ) ) ;
30
30
const editor = await vscode . window . showTextDocument ( doc ) ;
31
31
32
+ await extension ( ) . activate ( ) ;
33
+
32
34
// manually confirm visual mode so dialogue pop-up doesn't show because dialogues cause test errors
33
35
// and switch to visual editor
34
36
await vscode . commands . executeCommand ( "quarto.test_setkVisualModeConfirmedTrue" ) ;
@@ -43,11 +45,13 @@ suite("Quarto basics", function () {
43
45
// does in `/examples`.
44
46
test ( "Roundtrip doesn't change hello.qmd" , async function ( ) {
45
47
// don't run this in CI for now because we haven't figured out how to get the LSP to start
46
- if ( process . env [ 'CI' ] ) this . skip ( ) ;
48
+ // if (process.env['CI']) this.skip();
47
49
48
50
const doc = await vscode . workspace . openTextDocument ( exampleWorkspaceOutPath ( "hello.qmd" ) ) ;
49
51
const editor = await vscode . window . showTextDocument ( doc ) ;
50
52
53
+ await extension ( ) . activate ( ) ;
54
+
51
55
const docTextBefore = doc . getText ( ) ;
52
56
53
57
// switch to visual editor and back
@@ -59,6 +63,6 @@ suite("Quarto basics", function () {
59
63
await wait ( 300 ) ;
60
64
61
65
const docTextAfter = doc . getText ( ) ;
62
- assert . ok ( docTextBefore === docTextAfter ) ;
66
+ assert . ok ( docTextBefore === docTextAfter , docTextAfter ) ;
63
67
} ) ;
64
68
} ) ;
0 commit comments