Skip to content

Commit 6ab619d

Browse files
authored
Set confirmExit preference to never in plugin tests (#21531)
1 parent f909021 commit 6ab619d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

tests/e2e/tests/plugins/VscodeXmlPlugin.spec.ts

+7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ import { Editor } from '../../pageobjects/ide/Editor';
1616
import { TestConstants } from '../../TestConstants';
1717
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
1818
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
19+
import { PreferencesHandler } from '../../utils/PreferencesHandler';
1920
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
2021

2122
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
2223
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
2324
const editor: Editor = e2eContainer.get(CLASSES.Editor);
2425
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
2526
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
27+
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
28+
2629
const devfileUrl: string = TestConstants.TS_TEST_WORKSPACE_DEVFILE_REPO || 'https://github.com/che-samples/web-nodejs-sample/tree/xml-plugin';
2730
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
2831
const projectName: string = 'web-nodejs-sample';
@@ -42,6 +45,10 @@ suite('The "VscodeXmlPlugin" userstory', async () => {
4245
});
4346

4447
suite('Check the "vscode-xml" plugin', async () => {
48+
test('Set confirmExit preference to never', async () => {
49+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
50+
});
51+
4552
test('Check autocomplete', async () => {
4653
await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
4754
await editor.waitSuggestion(xmlFileName, 'rollback', 60000, 16, 4);

tests/e2e/tests/plugins/VscodeYamlPlugin.spec.ts

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ suite('The "VscodeYamlPlugin" userstory', async () => {
4646
});
4747

4848
suite('Check the "vscode-yaml" plugin', async () => {
49+
test('Set confirmExit preference to never', async () => {
50+
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
51+
});
52+
4953
test('Set the yaml schema path', async () => {
5054
await preferencesHandler.setPreferenceUsingUI('yaml.schemas', yamlSchema);
5155
});

tests/e2e/testsLibrary/CodeExecutionTests.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export class CodeExecutionTests {
108108
test(`Run command '${taskName}' expecting notification`, async () => {
109109
await this.runTaskUsingQuickOpenContainer(taskName);
110110
await this.ide.waitNotification(notificationText, timeout);
111-
// Need delay because a test application is not accessible immediately - it needs time.
112-
// Later can be improved (we can get and request the app. URL with axios until it is available)
111+
// need delay because a test application is not accessible immediately - it needs time.
112+
// later can be improved (we can get and request the app. URL with axios until it is available)
113113
// 7 sec is approximate value for most cases
114114
await this.driverHelper.wait(7_000);
115115
this.workspaceHandlingTests.setWindowHandle(await this.browserTabsUtil.getCurrentWindowHandle());

0 commit comments

Comments
 (0)