Skip to content

Commit

Permalink
Never show exit confirmation popup in DevfileSmoke test (#20540)
Browse files Browse the repository at this point in the history
* Set 'application.confirmExit' user preferences to 'never' in DevfileSmoke test
* Don't wait on 'Do you trust the authors of' notification

Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>
  • Loading branch information
dmytro-ndp authored Sep 28, 2021
1 parent f83b4c7 commit b58799a
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/CSlashCPlusPlus.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
});

suite('Test opening file', async () => {
Expand Down
8 changes: 7 additions & 1 deletion tests/e2e/tests/devfiles/DevfileSmoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import 'reflect-metadata';
import { CLASSES } from '../../inversify.types';
import CheReporter from '../../driver/CheReporter';
import { e2eContainer } from '../../inversify.config';
import { PreferencesHandler } from '../../utils/PreferencesHandler';
import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';

const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);

const workspaceSampleName: string = 'console-java-simple';
Expand All @@ -31,7 +33,11 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);

test('Set application.confirmExit user preferences to "never"', async () => {
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
});
});

suite ('Stopping and deleting the workspace', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/DotNetCore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ suite(`Test ${stack}`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/Go.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ suite(`${workspaceStack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceSubfolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceSubfolderName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/JavaMaven.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/JavaSpringBoot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/JavaVertx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/NodeJS.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ suite(`${workspaceStack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/PHPSimple.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ suite(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/Python.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ suite(`${workspaceStack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
});

suite('Test opening file', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/PythonDjango.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ suite(`${workspaceStack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Install dependencies', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/Quarkus.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ suite(`${workspaceStack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite(`Test opening the file`, async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/devfiles/Scala.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ suite.skip(`${stack} test`, async () => {
CheReporter.registerRunningWorkspace(workspaceName);
});

projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
});

suite('Test opening file', async () => {
Expand Down

0 comments on commit b58799a

Please sign in to comment.