Skip to content

Commit

Permalink
move unclear block to the separetad method
Browse files Browse the repository at this point in the history
  • Loading branch information
musienko-maxim committed Aug 22, 2019
1 parent b398d90 commit f77993f
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions e2e/tests/e2e_happy_path/HappyPath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ suite('Language server validation', async () => {
await ide.waitStatusBarContains('Starting Yaml Language Server');
await ide.waitStatusBarContains('100% Starting Yaml Language Server');
await ide.waitStatusBarTextAbsence('Starting Yaml Language Server');
});
});
});
});

suite('Validation of workspace build and run', async () => {
suite('Validation of workspace build and run', async () => {
test('Build application', async () => {
await runTask('che: build-file-output');
await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'build-output.txt');
Expand All @@ -145,7 +145,7 @@ suite('Language server validation', async () => {

test('Check the running application', async () => {
await previewWidget.waitContentAvailableInAssociatedWorkspace(SpringAppLocators.springTitleLocator, 60000, 10000);
});
});

test('Close preview widget', async () => {
await rightToolbar.clickOnToolIcon('Preview');
Expand Down Expand Up @@ -185,13 +185,11 @@ suite('Display source code changes in the running application', async () => {
await runTask('che: run-with-changes');
await ide.waitNotificationAndConfirm('A new process is now listening on port 8080', 120000);
await ide.waitNotificationAndOpenLink('Redirect is now enabled on port 8080', 120000);


});

test('Check changes are displayed', async () => {
await previewWidget.waitContentAvailableInAssociatedWorkspace(SpringAppLocators.springTitleLocator, 60000, 10000);
checkErrorMessInApplicationController();
checkErrorMessageInApplicationController();
});

test('Close preview widget', async () => {
Expand All @@ -204,7 +202,7 @@ suite('Display source code changes in the running application', async () => {
await terminal.closeTerminalTab('run-with-changes');
await warningDialog.waitAndCloseIfAppear();
});
});
});

suite('Validation of debug functionality', async () => {
test('Open file and activate breakpoint', async () => {
Expand All @@ -221,13 +219,11 @@ suite('Validation of debug functionality', async () => {
});

test('Check content of the launched application', async () => {
await checkErrorMessInApplicationController();
await checkErrorMessageInApplicationController();
});

test('Open debug configuration file', async () => {
try {await topMenu.selectOption('Debug', 'Open Configurations'); } catch (e) {
await topMenu.selectOption('Debug', 'Open Configurations');
}
await isureClickOnDebugMenu();
await editor.waitEditorAvailable('launch.json');
await editor.selectTab('launch.json');
});
Expand Down Expand Up @@ -258,7 +254,7 @@ suite('Validation of debug functionality', async () => {
});
});

async function checkErrorMessInApplicationController() {
async function checkErrorMessageInApplicationController() {
await previewWidget.waitAndSwitchToWidgetFrame();
await previewWidget.waitAndClick(SpringAppLocators.springMenuButtonLocator);
await previewWidget.waitAndClick(SpringAppLocators.springErrorButtonLocator);
Expand Down Expand Up @@ -290,6 +286,13 @@ async function runTask(task: string) {

await quickOpenContainer.clickOnContainerItem(task);
}
//sometimes under high loading the forst click can be failed
async function isureClickOnDebugMenu() {
try { await topMenu.selectOption('Debug', 'Open Configurations'); } catch (e) {
console.log(`After clicking to the Debug top menu the menu has been not opened, try to click again...`);
await topMenu.selectOption('Debug', 'Open Configurations');
}
}

async function checkJavaPathCompletion() {
if (await ide.isNotificationPresent('Classpath is incomplete. Only syntax errors will be reported')) {
Expand Down

0 comments on commit f77993f

Please sign in to comment.