Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for handling unexpected pop ups during redirection maven build to editor #14814

Merged
merged 6 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions e2e/files/happy-path/happy-path-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ projects:
- name: petclinic
source:
type: git
location: 'https://github.com/spring-projects/spring-petclinic.git'
location: "https://github.com/spring-projects/spring-petclinic.git"
components:
- type: cheEditor
id: eclipse/che-theia/next
Expand All @@ -28,8 +28,8 @@ components:
- type: dockerimage
alias: maven-container
image: bujhtr5555/maven-with-artifacts:latest
command: ['sleep']
args: ['infinity']
command: ["sleep"]
args: ["infinity"]
env:
- name: MAVEN_CONFIG
value: /home/user/.m2
Expand All @@ -44,13 +44,13 @@ commands:
actions:
- type: exec
component: maven-container
command: mvn clean package >> build.txt
command: mvn clean package >> build.txt && tail -n 40 /projects/petclinic/build.txt | grep 'BUILD SUCCESS' > /projects/petclinic/result-build.txt
workdir: /projects/petclinic
- name: build-file-output
actions:
- type: exec
component: maven-container
command: 'mkdir -p /projects/petclinic/?/.m2 && cp -r /.m2/* /projects/petclinic/?/.m2 && cd /projects/petclinic && mvn package >> build-output.txt'
command: mkdir -p /projects/petclinic/?/.m2 && cp -r /.m2/* /projects/petclinic/?/.m2 && cd /projects/petclinic && mvn package >> build-output.txt && tail -n 40 /projects/petclinic/build-output.txt | grep 'BUILD SUCCESS' > /projects/petclinic/result-build-output.txt
workdir: /projects/petclinic
- name: run
actions:
Expand Down
20 changes: 16 additions & 4 deletions e2e/tests/e2e_happy_path/HappyPath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,13 @@ suite('Language server validation', 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');
await editor.followAndWaitForText('build-output.txt', '[INFO] BUILD SUCCESS', 300000, 10000);

//workaround for issue: https://github.com/eclipse/che/issues/14771

// await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'build-output.txt');
await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'result-build-output.txt', 220000);
await editor.waitText('result-build-output.txt', '[INFO] BUILD SUCCESS');
// await editor.followAndWaitForText('build-output.txt', '[INFO] BUILD SUCCESS', 300000, 10000);
Copy link
Contributor

@Ohrimenko1988 Ohrimenko1988 Oct 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@musienko-maxim Why did you left commented code? In my opinion this is not a very good approach.

});

test('Run application', async () => {
Expand Down Expand Up @@ -188,11 +193,18 @@ suite('Display source code changes in the running application', async () => {

test('Build application with changes', async () => {
await runTask('che: build');
await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'build.txt');
await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'result-build.txt', 300000);
await editor.waitText('result-build.txt', '[INFO] BUILD SUCCESS');

//workaround for issue: https://github.com/eclipse/che/issues/14771

/*await projectTree.expandPathAndOpenFileInAssociatedWorkspace(projectName, 'build.txt');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same question #14814 (review)

await editor.waitEditorAvailable('build.txt');
await editor.clickOnTab('build.txt');
await editor.waitTabFocused('build.txt');
await editor.followAndWaitForText('build.txt', '[INFO] BUILD SUCCESS', 300000, 5000);
await editor.followAndWaitForText('build.txt', '[INFO] BUILD SUCCESS', 300000, 5000);*/


});

test('Run application with changes', async () => {
Expand Down