Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Change erroneous text for testing error highlighting. Remove LS initi…
Browse files Browse the repository at this point in the history
…alization test.
  • Loading branch information
Katka92 authored and ibuziuk committed Feb 26, 2020
1 parent 3ac42a3 commit 7f347cc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e-saas/mocha-all.opts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--timeout 120000
--reporter 'node_modules/e2e/dist/driver/CheReporter.js'
-u tdd
--spec ./dist/tests/login/Login.spec.js
--spec ./node_modules/e2e/dist/tests/devfiles/JavaVertx.spec.js
--spec ./node_modules/e2e/dist/tests/devfiles/JavaMaven.spec.js
--spec ./dist/tests/login/Login.spec
--spec ./dist/tests/devfiles/JavaMaven.spec
--spec ./node_modules/e2e/dist/tests/devfiles/JavaVertx.spec
45 changes: 45 additions & 0 deletions e2e-saas/tests/devfiles/JavaMaven.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*********************************************************************
* Copyright (c) 2019 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
import 'reflect-metadata';
import { NameGenerator} from 'e2e';
import * as testLibrary from 'e2e';

const workspaceName: string = NameGenerator.generate('wksp-test-', 5);
const sampleName: string = 'console-java-simple';
const fileFolderPath: string = `${sampleName}/src/main/java/org/eclipse/che/examples`;
const tabTitle: string = 'HelloWorld.java';
const codeNavigationClassName: string = 'String.class';
const stack : string = 'Java Maven';
const taskName: string = 'maven build';

suite(`${stack} test`, async () => {
suite (`Create ${stack} workspace ${workspaceName}`, async () => {
testLibrary.createAndOpenWorkspace(workspaceName, stack);
testLibrary.waitWorkspaceReadiness(workspaceName, sampleName, 'src');
});

suite('Validation of workspace build and run', async () => {
testLibrary.runTask(taskName, 120_000);
testLibrary.closeTerminal(taskName);
});

suite('Language server validation', async () => {
testLibrary.openFile(fileFolderPath, tabTitle);
testLibrary.suggestionInvoking(tabTitle, 10, 20, 'append(char c) : PrintStream');
testLibrary.errorHighlighting(tabTitle, 'erroneous_text', 11);
testLibrary.autocomplete(tabTitle, 10, 11, 'System - java.lang');
testLibrary.codeNavigation(tabTitle, 9, 10, codeNavigationClassName);
});

suite ('Stop and remove workspace', async() => {
testLibrary.stopWorkspace(workspaceName);
testLibrary.removeWorkspace(workspaceName);
});
});

0 comments on commit 7f347cc

Please sign in to comment.