Skip to content

Commit

Permalink
make conflict warning message non-modal and more consistent with the …
Browse files Browse the repository at this point in the history
…rest of the doc
  • Loading branch information
connectdotz committed Feb 21, 2024
1 parent 243581b commit 5349178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/JestExt/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface JestCommandSettings {
jestCommandLine: string;
}

const AUTO_FOCUS_WARNING = `The Test Results panel has auto-focus enabled, which may cause unexpected focus shifts during the current run mode. If this becomes a problem, you can disable the autofocus using the command "Jest: Disable Auto Focus Test Output". Alternatively, click on the action link below. For more details, see ${OUTPUT_CONFIG_HELP_URL}`;
const AUTO_FOCUS_WARNING = `The TEST RESULTS panel has auto-focus enabled, which may cause frequent focus shifts during the current run mode. If this becomes a problem, you can disable the auto-focus using the command "Jest: Disable Auto Focus Test Output". Alternatively, click on the action link below. For more details, see ${OUTPUT_CONFIG_HELP_URL}`;

/** extract lines starts and end with [] */
export class JestExt {
Expand Down
5 changes: 2 additions & 3 deletions src/output-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class OutputManager {
}

const detail =
`test-results panel setting \r\n"testing.openTesting: ${this.openTesting}"\r\n` +
`Output Config Conflict Detected: test-results panel setting "testing.openTesting: ${this.openTesting}" ` +
`conflicts with jest.outputConfig:\r\n ${JSON.stringify(this.config, undefined, 4)}.`;
console.warn(detail);

Expand All @@ -228,8 +228,7 @@ export class OutputManager {

const buttons: string[] = [actions.fixIt, actions.help, actions.cancel];
const selection = await vscode.window.showWarningMessage(
`Output Config Conflict Detected:`,
{ modal: true, detail },
`Output Config Conflict Detected (see console log for more details)`,
...buttons
);
switch (selection) {
Expand Down

0 comments on commit 5349178

Please sign in to comment.