-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added browser view tests, refactoring, added securestorage password
- Loading branch information
Showing
19 changed files
with
724 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/com.redhat.fabric8analytics.lsp.eclipse.ui.itests/resources/securepass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
masterpassword |
55 changes: 55 additions & 0 deletions
55
...m/redhat/fabric8analytics/lsp/eclipse/ui/itests/EnableFabric8AnalyticsLSPServerTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2017 Red Hat Inc.. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat Incorporated - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.fabric8analytics.lsp.eclipse.ui.itests; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
import org.eclipse.reddeer.common.logging.Logger; | ||
import org.eclipse.reddeer.junit.runner.RedDeerSuite; | ||
import org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.pages.OpenshiftServicesPreferencePage; | ||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.requirements.OSIOLoginRequirement; | ||
|
||
@RunWith(RedDeerSuite.class) | ||
public class EnableFabric8AnalyticsLSPServerTests { | ||
|
||
private static final Logger log = Logger.getLogger(EnableFabric8AnalyticsLSPServerTests.class); | ||
|
||
@Test | ||
public void enableFabric8AnalyticsLSPServerTest() { | ||
log.info("Check if '" + OpenshiftServicesPreferencePage.CHECKBOX_LABEL + "' is checkable and proper action follows (osio login dialog shows up)"); | ||
OSIOLoginRequirement.removeAccountFromOpenShiftIOPreferencePage(); | ||
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog(); | ||
preferences.open(); | ||
OpenshiftServicesPreferencePage osServicesPreferences = new OpenshiftServicesPreferencePage(preferences); | ||
preferences.select(osServicesPreferences); | ||
|
||
if(osServicesPreferences.isFabric8AnalyticsLSPServerEnabled()) { | ||
osServicesPreferences.disableFabric8AnalyticsLSPServer(); | ||
} | ||
osServicesPreferences.enableFabric8AnalyticsLSPServer(); | ||
|
||
// open preferences anew | ||
preferences.open(); | ||
preferences.select(osServicesPreferences); | ||
|
||
assertTrue("Fabric8Analytics LSP server chekbox in Openshift services preferences page should be checked but it is not",osServicesPreferences.isFabric8AnalyticsLSPServerEnabled()); | ||
|
||
osServicesPreferences.disableFabric8AnalyticsLSPServer(); | ||
osServicesPreferences.apply(); | ||
//TODO add check that LSP server is disabled | ||
OSIOLoginRequirement.removeAccountFromOpenShiftIOPreferencePage(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...edhat/fabric8analytics/lsp/eclipse/ui/itests/Fabric8AnalysisModuleTabWithErrorsTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2017 Red Hat Inc.. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat Incorporated - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.fabric8analytics.lsp.eclipse.ui.itests; | ||
|
||
import org.eclipse.reddeer.junit.runner.RedDeerSuite; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.requirements.ImportProjectsRequirements.ImportProjects; | ||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.requirements.OSIOLoginRequirement.OSIOLogin; | ||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.tabs.Fabric8AnalysisTab; | ||
|
||
@RunWith(RedDeerSuite.class) | ||
@OSIOLogin | ||
@ImportProjects(projectsNames = { "maven-project-test-modules-with-errors" }) | ||
public class Fabric8AnalysisModuleTabWithErrorsTests extends StackAnalysesTestProjectBase { | ||
|
||
@Test | ||
public void validateFabric8AnalysisTabTest() { | ||
log.info("Validating that tab can be opened for project " + getProjectName()); | ||
getProject(getProjectName()).getProjectItem("pom.xml").open(); | ||
Fabric8AnalysisTab fat = Fabric8AnalysisTab.openTab(); | ||
fat.generateStackReport(); | ||
validateResults("/maven-project-test-modules-with-errors/pom.xml", "commons-collections:commons-collections", | ||
"ch.qos.logback:logback-core", "CVE-2015-6420", "CVE-2017-5929"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...c/com/redhat/fabric8analytics/lsp/eclipse/ui/itests/StackAnalysesModuleProjectsTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2017 Red Hat Inc.. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat Incorporated - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.fabric8analytics.lsp.eclipse.ui.itests; | ||
|
||
import org.eclipse.reddeer.junit.runner.RedDeerSuite; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.requirements.ImportProjectsRequirements.ImportProjects; | ||
import com.redhat.fabric8analytics.lsp.eclipse.ui.itests.requirements.OSIOLoginRequirement.OSIOLogin; | ||
|
||
@RunWith(RedDeerSuite.class) | ||
@OSIOLogin | ||
@ImportProjects(projectsNames={"maven-project-test-modules"}) | ||
public class StackAnalysesModuleProjectsTests extends StackAnalysesTestProjectBase { | ||
|
||
@Test | ||
public void runAnalysesForMainProjectTest() { | ||
log.info("Validate that project with modules is imported, stack analyses is running and has propper results"); | ||
runStackAnalyses("maven-project-test-modules", "/"); | ||
validateResults("/maven-project-test-modules/pom.xml", "/maven-project-test-modules/module-1/pom.xml", | ||
"/maven-project-test-modules/module-2/pom.xml"); | ||
} | ||
|
||
@Test | ||
public void runAnalysesForModule1Test() { | ||
log.info( | ||
"Validate that project with modules is imported, stack analyses is running and has propper results for module-1"); | ||
// project module name is 'maven-project-test-modules-module-1' | ||
runStackAnalyses("maven-project-test-modules-module-1", "/"); | ||
validateResults("/maven-project-test-modules-module-1/pom.xml"); | ||
} | ||
|
||
@Test | ||
public void runAnalysesForModule2Test() { | ||
log.info( | ||
"Validate that project with modules is imported, stack analyses is running and has propper results for module-2"); | ||
// project module name is 'maven-project-test-modules-module-2' | ||
runStackAnalyses("maven-project-test-modules-module-2", "/"); | ||
validateResults("/maven-project-test-modules-module-2/pom.xml"); | ||
} | ||
|
||
} |
Oops, something went wrong.