@eclipse-che/che-e2e 7.62.0 → 7.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/inversify.config.ts +88 -0
- package/{inversify.types.ts → configs/inversify.types.ts} +6 -9
- package/configs/mocharc.ts +21 -0
- package/{generateIndex.sh → configs/sh-scripts/generateIndex.sh} +8 -10
- package/{initDevfileTests.sh → configs/sh-scripts/initDevfileTests.sh} +18 -27
- package/{TestConstants.ts → constants/TestConstants.ts} +1 -1
- package/{TimeoutConstants.ts → constants/TimeoutConstants.ts} +1 -1
- package/dist/configs/inversify.config.js +81 -0
- package/dist/configs/inversify.config.js.map +1 -0
- package/dist/{inversify.types.js → configs/inversify.types.js} +5 -8
- package/dist/configs/inversify.types.js.map +1 -0
- package/dist/configs/mocharc.js +20 -0
- package/dist/configs/mocharc.js.map +1 -0
- package/dist/{TestConstants.js → constants/TestConstants.js} +1 -1
- package/dist/constants/TestConstants.js.map +1 -0
- package/dist/{TimeoutConstants.js → constants/TimeoutConstants.js} +1 -1
- package/dist/constants/TimeoutConstants.js.map +1 -0
- package/dist/driver/ChromeDriver.js +2 -2
- package/dist/driver/ChromeDriver.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +4 -4
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +4 -4
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +3 -3
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +10 -8
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js +3 -3
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js.map +1 -1
- package/dist/pageobjects/login/ICheLoginPage.js +1 -1
- package/dist/pageobjects/login/IOcpLoginPage.js +1 -1
- package/dist/pageobjects/login/MultiUserLoginPage.js +3 -3
- package/dist/pageobjects/login/MultiUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/OcpUserLoginPage.js +3 -3
- package/dist/pageobjects/login/OcpUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js +4 -4
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js.map +1 -1
- package/dist/pageobjects/login/UpdateAccountInformationPage.js +2 -2
- package/dist/pageobjects/login/UpdateAccountInformationPage.js.map +1 -1
- package/dist/pageobjects/openshift/CheLoginPage.js +3 -3
- package/dist/pageobjects/openshift/CheLoginPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpLoginPage.js +4 -4
- package/dist/pageobjects/openshift/OcpLoginPage.js.map +1 -1
- package/dist/pageobjects/third-parties/GitLoginPage.js +4 -4
- package/dist/pageobjects/third-parties/GitLoginPage.js.map +1 -1
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js +3 -3
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js.map +1 -1
- package/dist/{tests → specs}/MochaHooks.js +32 -18
- package/dist/specs/MochaHooks.js.map +1 -0
- package/dist/{tests/devfiles/che-code → specs/devfiles}/EmptyWorkspace.spec.js +10 -11
- package/dist/specs/devfiles/EmptyWorkspace.spec.js.map +1 -0
- package/dist/{tests → specs}/login/LinkCheAndOcpUsers.spec.js +13 -12
- package/dist/specs/login/LinkCheAndOcpUsers.spec.js.map +1 -0
- package/dist/{utils/AnimationChecker.js → tests-library/LoginTests.js} +26 -18
- package/dist/tests-library/LoginTests.js.map +1 -0
- package/dist/{testsLibrary/che-code/ProjectAndFileTestsCheCode.js → tests-library/ProjectAndFileTests.js} +11 -11
- package/dist/tests-library/ProjectAndFileTests.js.map +1 -0
- package/dist/{testsLibrary → tests-library}/WorkspaceHandlingTests.js +4 -4
- package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -0
- package/dist/utils/BrowserTabsUtil.js +3 -3
- package/dist/utils/BrowserTabsUtil.js.map +1 -1
- package/dist/{driver → utils}/CheReporter.js +6 -10
- package/dist/utils/CheReporter.js.map +1 -0
- package/dist/utils/DriverHelper.js +3 -3
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/Logger.js +2 -2
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/Sanitizer.js +1 -1
- package/dist/utils/ScreenCatcher.js +7 -7
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/WorkspaceNameHandler.js +2 -2
- package/dist/utils/WorkspaceNameHandler.js.map +1 -1
- package/dist/utils/{requestHandlers → request-handlers}/CheApiRequestHandler.js +3 -3
- package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/headers/CheMultiuserAuthorizationHeaderHandler.js +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/headers/IAuthorizationHeaderHandler.js +1 -1
- package/dist/utils/request-handlers/headers/IAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/tokens/CheMultiuserTokenHandler.js +2 -2
- package/dist/utils/request-handlers/tokens/CheMultiuserTokenHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/tokens/ITokenHandler.js +1 -1
- package/dist/utils/request-handlers/tokens/ITokenHandler.js.map +1 -0
- package/dist/utils/{VCS → vsc}/CheGitApi.js +2 -2
- package/dist/utils/vsc/CheGitApi.js.map +1 -0
- package/dist/utils/{VCS → vsc}/github/GitHubUtil.js.map +1 -1
- package/dist/utils/workspace/ApiUrlResolver.js +3 -3
- package/dist/utils/workspace/ApiUrlResolver.js.map +1 -1
- package/dist/utils/workspace/ITestWorkspaceUtil.js +1 -1
- package/dist/utils/workspace/TestWorkspaceUtil.js +4 -4
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/dist/utils/workspace/WorkspaceStatus.js +1 -1
- package/driver/ChromeDriver.ts +2 -2
- package/driver/IDriver.ts +1 -1
- package/package.json +6 -37
- package/pageobjects/dashboard/CreateWorkspace.ts +4 -4
- package/pageobjects/dashboard/Dashboard.ts +4 -4
- package/pageobjects/dashboard/Workspaces.ts +3 -3
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +8 -8
- package/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +3 -4
- package/pageobjects/login/ICheLoginPage.ts +1 -1
- package/pageobjects/login/IOcpLoginPage.ts +1 -1
- package/pageobjects/login/MultiUserLoginPage.ts +3 -3
- package/pageobjects/login/OcpUserLoginPage.ts +3 -3
- package/pageobjects/login/RegularUserOcpCheLoginPage.ts +4 -4
- package/pageobjects/login/UpdateAccountInformationPage.ts +2 -2
- package/pageobjects/openshift/CheLoginPage.ts +3 -3
- package/pageobjects/openshift/OcpLoginPage.ts +4 -4
- package/pageobjects/third-parties/GitLoginPage.ts +4 -4
- package/pageobjects/third-parties/GitOauthAppsSettings.ts +3 -3
- package/specs/MochaHooks.ts +72 -0
- package/{tests/devfiles/che-code → specs/devfiles}/EmptyWorkspace.spec.ts +12 -9
- package/{tests → specs}/login/LinkCheAndOcpUsers.spec.ts +5 -4
- package/tests-library/LoginTests.ts +35 -0
- package/{testsLibrary/che-code/ProjectAndFileTestsCheCode.ts → tests-library/ProjectAndFileTests.ts} +6 -6
- package/{testsLibrary → tests-library}/WorkspaceHandlingTests.ts +4 -4
- package/utils/BrowserTabsUtil.ts +3 -3
- package/{driver → utils}/CheReporter.ts +10 -15
- package/utils/DriverHelper.ts +4 -4
- package/utils/Logger.ts +2 -2
- package/utils/Sanitizer.ts +1 -1
- package/utils/ScreenCatcher.ts +3 -3
- package/utils/WorkspaceNameHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/CheApiRequestHandler.ts +3 -3
- package/utils/{requestHandlers → request-handlers}/headers/CheMultiuserAuthorizationHeaderHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/headers/IAuthorizationHeaderHandler.ts +1 -1
- package/utils/{requestHandlers → request-handlers}/tokens/CheMultiuserTokenHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/tokens/ITokenHandler.ts +1 -1
- package/utils/{VCS → vsc}/CheGitApi.ts +2 -6
- package/utils/workspace/ApiUrlResolver.ts +3 -3
- package/utils/workspace/ITestWorkspaceUtil.ts +1 -1
- package/utils/workspace/TestWorkspaceUtil.ts +4 -4
- package/utils/workspace/WorkspaceStatus.ts +1 -1
- package/dist/TestConstants.js.map +0 -1
- package/dist/TimeoutConstants.js.map +0 -1
- package/dist/driver/CheReporter.js.map +0 -1
- package/dist/index.js +0 -94
- package/dist/index.js.map +0 -1
- package/dist/inversify.config.js +0 -133
- package/dist/inversify.config.js.map +0 -1
- package/dist/inversify.types.js.map +0 -1
- package/dist/pageobjects/ide/theia/ContextMenu.js +0 -66
- package/dist/pageobjects/ide/theia/ContextMenu.js.map +0 -1
- package/dist/pageobjects/ide/theia/DebugView.js +0 -98
- package/dist/pageobjects/ide/theia/DebugView.js.map +0 -1
- package/dist/pageobjects/ide/theia/DialogWindow.js +0 -102
- package/dist/pageobjects/ide/theia/DialogWindow.js.map +0 -1
- package/dist/pageobjects/ide/theia/Editor.js +0 -463
- package/dist/pageobjects/ide/theia/Editor.js.map +0 -1
- package/dist/pageobjects/ide/theia/Ide.js +0 -336
- package/dist/pageobjects/ide/theia/Ide.js.map +0 -1
- package/dist/pageobjects/ide/theia/LeftToolBar.js +0 -81
- package/dist/pageobjects/ide/theia/LeftToolBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/NavigationBar.js +0 -57
- package/dist/pageobjects/ide/theia/NavigationBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/NotificationCenter.js +0 -76
- package/dist/pageobjects/ide/theia/NotificationCenter.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenDialogWidget.js +0 -100
- package/dist/pageobjects/ide/theia/OpenDialogWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenEditors.js +0 -73
- package/dist/pageobjects/ide/theia/OpenEditors.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenWorkspaceWidget.js +0 -62
- package/dist/pageobjects/ide/theia/OpenWorkspaceWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/PreviewWidget.js +0 -134
- package/dist/pageobjects/ide/theia/PreviewWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/ProjectTree.js +0 -282
- package/dist/pageobjects/ide/theia/ProjectTree.js.map +0 -1
- package/dist/pageobjects/ide/theia/QuickOpenContainer.js +0 -70
- package/dist/pageobjects/ide/theia/QuickOpenContainer.js.map +0 -1
- package/dist/pageobjects/ide/theia/RightToolBar.js +0 -51
- package/dist/pageobjects/ide/theia/RightToolBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/Terminal.js +0 -184
- package/dist/pageobjects/ide/theia/Terminal.js.map +0 -1
- package/dist/pageobjects/ide/theia/TopMenu.js +0 -109
- package/dist/pageobjects/ide/theia/TopMenu.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.js +0 -128
- package/dist/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/GitPlugin.js +0 -120
- package/dist/pageobjects/ide/theia/plugins/GitPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/KubernetesPlugin.js +0 -107
- package/dist/pageobjects/ide/theia/plugins/KubernetesPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/OpenshiftPlugin.js +0 -99
- package/dist/pageobjects/ide/theia/plugins/OpenshiftPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/PluginsView.js +0 -166
- package/dist/pageobjects/ide/theia/plugins/PluginsView.js.map +0 -1
- package/dist/tests/MochaHooks.js.map +0 -1
- package/dist/tests/devfiles/che-code/EmptyWorkspace.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/CSlashCPlusPlus.spec.js +0 -73
- package/dist/tests/devfiles/theia/CSlashCPlusPlus.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/DevfileSmoke.spec.js +0 -47
- package/dist/tests/devfiles/theia/DevfileSmoke.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/DotNetCore.spec.js +0 -81
- package/dist/tests/devfiles/theia/DotNetCore.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Go.spec.js +0 -72
- package/dist/tests/devfiles/theia/Go.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaMaven.spec.js +0 -60
- package/dist/tests/devfiles/theia/JavaMaven.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaSpringBoot.spec.js +0 -66
- package/dist/tests/devfiles/theia/JavaSpringBoot.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaVertx.spec.js +0 -60
- package/dist/tests/devfiles/theia/JavaVertx.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/NodeJS.spec.js +0 -64
- package/dist/tests/devfiles/theia/NodeJS.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/PHPSimple.spec.js +0 -74
- package/dist/tests/devfiles/theia/PHPSimple.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Python.spec.js +0 -58
- package/dist/tests/devfiles/theia/Python.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/PythonDjango.spec.js +0 -61
- package/dist/tests/devfiles/theia/PythonDjango.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Quarkus.spec.js +0 -69
- package/dist/tests/devfiles/theia/Quarkus.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Scala.spec.js +0 -66
- package/dist/tests/devfiles/theia/Scala.spec.js.map +0 -1
- package/dist/tests/e2e/theia/FactoryUrl.spec.js +0 -40
- package/dist/tests/e2e/theia/FactoryUrl.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitPublishBranch.spec.js +0 -90
- package/dist/tests/e2e/theia/GitPublishBranch.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitSelfSignCert.spec.js +0 -90
- package/dist/tests/e2e/theia/GitSelfSignCert.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitSsh.spec.js +0 -120
- package/dist/tests/e2e/theia/GitSsh.spec.js.map +0 -1
- package/dist/tests/e2e/theia/OpenshiftConnector.spec.js +0 -124
- package/dist/tests/e2e/theia/OpenshiftConnector.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js +0 -50
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.js +0 -48
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js +0 -48
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +0 -1
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js +0 -277
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js.map +0 -1
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js +0 -314
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js.map +0 -1
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js +0 -39
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js.map +0 -1
- package/dist/tests/load_test/theia/LoadTest.spec.js +0 -41
- package/dist/tests/load_test/theia/LoadTest.spec.js.map +0 -1
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js.map +0 -1
- package/dist/tests/login/Login.spec.js +0 -28
- package/dist/tests/login/Login.spec.js.map +0 -1
- package/dist/tests/plugins/theia/GitHubPullRequestPlugin.spec.js +0 -117
- package/dist/tests/plugins/theia/GitHubPullRequestPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/InstallPluginUsingUI.spec.js +0 -62
- package/dist/tests/plugins/theia/InstallPluginUsingUI.spec.js.map +0 -1
- package/dist/tests/plugins/theia/JavaPlugin.spec.js +0 -82
- package/dist/tests/plugins/theia/JavaPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/PhpPlugin.spec.js +0 -96
- package/dist/tests/plugins/theia/PhpPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/PythonPlugin.spec.js +0 -72
- package/dist/tests/plugins/theia/PythonPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/TypescriptPlugin.spec.js +0 -135
- package/dist/tests/plugins/theia/TypescriptPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeKubernetesPlugin.spec.js +0 -69
- package/dist/tests/plugins/theia/VscodeKubernetesPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeShellcheckPlugin.spec.js +0 -82
- package/dist/tests/plugins/theia/VscodeShellcheckPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeValePlugin.spec.js +0 -70
- package/dist/tests/plugins/theia/VscodeValePlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeXmlPlugin.spec.js +0 -81
- package/dist/tests/plugins/theia/VscodeXmlPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeYamlPlugin.spec.js +0 -78
- package/dist/tests/plugins/theia/VscodeYamlPlugin.spec.js.map +0 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +0 -1
- package/dist/testsLibrary/che-code/ProjectAndFileTestsCheCode.js.map +0 -1
- package/dist/testsLibrary/theia/CodeExecutionTestsTheia.js +0 -248
- package/dist/testsLibrary/theia/CodeExecutionTestsTheia.js.map +0 -1
- package/dist/testsLibrary/theia/LanguageServerTestsTheia.js +0 -230
- package/dist/testsLibrary/theia/LanguageServerTestsTheia.js.map +0 -1
- package/dist/testsLibrary/theia/ProjectAndFileTestsTheia.js +0 -133
- package/dist/testsLibrary/theia/ProjectAndFileTestsTheia.js.map +0 -1
- package/dist/utils/AnimationChecker.js.map +0 -1
- package/dist/utils/VCS/CheGitApi.js.map +0 -1
- package/dist/utils/requestHandlers/CheApiRequestHandler.js.map +0 -1
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +0 -1
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.js.map +0 -1
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js.map +0 -1
- package/dist/utils/requestHandlers/tokens/ITokenHandler.js.map +0 -1
- package/dist/utils/theia/PreferencesHandlerTheia.js +0 -142
- package/dist/utils/theia/PreferencesHandlerTheia.js.map +0 -1
- package/index.ts +0 -69
- package/initPluginTest.sh +0 -9
- package/inversify.config.ts +0 -141
- package/mocha-all-devfiles-che-code.json +0 -12
- package/mocha-all-devfiles-theia.json +0 -15
- package/mocha-all-factories-che-code.json +0 -14
- package/mocha-all-factories-theia.json +0 -16
- package/mocha-all-plugins-che-code.json +0 -13
- package/mocha-all-plugins-theia.json +0 -15
- package/mocha-che-code.json +0 -12
- package/mocha-connector-theia.json +0 -12
- package/mocha-devworkspace-happy-path-che-code.json +0 -13
- package/mocha-devworkspace-happy-path-theia.json +0 -14
- package/mocha-empty-workspace-devworkspace-happy-path-che-code.json +0 -14
- package/mocha-factory-che-code.json +0 -13
- package/mocha-factory-theia.json +0 -14
- package/mocha-git-publish-branch-theia.json +0 -14
- package/mocha-git-self-sign-cert-theia.json +0 -14
- package/mocha-git-ssh-theia.json +0 -14
- package/mocha-happy-path-che-code.json +0 -14
- package/mocha-happy-path-theia.json +0 -15
- package/mocha-java-maven.json +0 -13
- package/mocha-java-springboot-che-code.json +0 -12
- package/mocha-java-springboot-theia.json +0 -13
- package/mocha-java-vertx-che-code.json +0 -12
- package/mocha-java-vertx-theia.json +0 -13
- package/mocha-load-theia.json +0 -12
- package/mocha-scala.json +0 -13
- package/mocha-single-devfile.json +0 -11
- package/mocha-theia.json +0 -12
- package/mocha-ws-creation-and-ls-theia.json +0 -12
- package/mocha.intelij.json +0 -13
- package/mocha.ocp.link.json +0 -11
- package/mocha.single.plugin.json +0 -8
- package/pageobjects/ide/theia/ContextMenu.ts +0 -55
- package/pageobjects/ide/theia/DebugView.ts +0 -88
- package/pageobjects/ide/theia/DialogWindow.ts +0 -101
- package/pageobjects/ide/theia/Editor.ts +0 -601
- package/pageobjects/ide/theia/Ide.ts +0 -393
- package/pageobjects/ide/theia/LeftToolBar.ts +0 -81
- package/pageobjects/ide/theia/NavigationBar.ts +0 -41
- package/pageobjects/ide/theia/NotificationCenter.ts +0 -75
- package/pageobjects/ide/theia/OpenDialogWidget.ts +0 -92
- package/pageobjects/ide/theia/OpenEditors.ts +0 -63
- package/pageobjects/ide/theia/OpenWorkspaceWidget.ts +0 -48
- package/pageobjects/ide/theia/PreviewWidget.ts +0 -142
- package/pageobjects/ide/theia/ProjectTree.ts +0 -338
- package/pageobjects/ide/theia/QuickOpenContainer.ts +0 -59
- package/pageobjects/ide/theia/RightToolBar.ts +0 -34
- package/pageobjects/ide/theia/Terminal.ts +0 -219
- package/pageobjects/ide/theia/TopMenu.ts +0 -103
- package/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.ts +0 -130
- package/pageobjects/ide/theia/plugins/GitPlugin.ts +0 -118
- package/pageobjects/ide/theia/plugins/KubernetesPlugin.ts +0 -113
- package/pageobjects/ide/theia/plugins/OpenshiftPlugin.ts +0 -87
- package/pageobjects/ide/theia/plugins/PluginsView.ts +0 -191
- package/tests/MochaHooks.ts +0 -57
- package/tests/devfiles/theia/CSlashCPlusPlus.spec.ts +0 -78
- package/tests/devfiles/theia/DevfileSmoke.spec.ts +0 -50
- package/tests/devfiles/theia/DotNetCore.spec.ts +0 -87
- package/tests/devfiles/theia/Go.spec.ts +0 -81
- package/tests/devfiles/theia/JavaMaven.spec.ts +0 -64
- package/tests/devfiles/theia/JavaSpringBoot.spec.ts +0 -71
- package/tests/devfiles/theia/JavaVertx.spec.ts +0 -65
- package/tests/devfiles/theia/NodeJS.spec.ts +0 -71
- package/tests/devfiles/theia/PHPSimple.spec.ts +0 -80
- package/tests/devfiles/theia/Python.spec.ts +0 -64
- package/tests/devfiles/theia/PythonDjango.spec.ts +0 -67
- package/tests/devfiles/theia/Quarkus.spec.ts +0 -76
- package/tests/devfiles/theia/Scala.spec.ts +0 -70
- package/tests/e2e/theia/FactoryUrl.spec.ts +0 -47
- package/tests/e2e/theia/GitPublishBranch.spec.ts +0 -109
- package/tests/e2e/theia/GitSelfSignCert.spec.ts +0 -110
- package/tests/e2e/theia/GitSsh.spec.ts +0 -144
- package/tests/e2e/theia/OpenshiftConnector.spec.ts +0 -144
- package/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +0 -60
- package/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +0 -57
- package/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +0 -57
- package/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.ts +0 -294
- package/tests/e2e_happy_path/theia/HappyPath.spec.ts +0 -348
- package/tests/intelij/IntelijOpenWorkspace.spec.ts +0 -47
- package/tests/load_test/theia/LoadTest.spec.ts +0 -55
- package/tests/login/Login.spec.ts +0 -31
- package/tests/plugins/theia/GitHubPullRequestPlugin.spec.ts +0 -147
- package/tests/plugins/theia/InstallPluginUsingUI.spec.ts +0 -77
- package/tests/plugins/theia/JavaPlugin.spec.ts +0 -100
- package/tests/plugins/theia/PhpPlugin.spec.ts +0 -115
- package/tests/plugins/theia/PythonPlugin.spec.ts +0 -86
- package/tests/plugins/theia/TypescriptPlugin.spec.ts +0 -168
- package/tests/plugins/theia/VscodeKubernetesPlugin.spec.ts +0 -83
- package/tests/plugins/theia/VscodeShellcheckPlugin.spec.ts +0 -100
- package/tests/plugins/theia/VscodeValePlugin.spec.ts +0 -85
- package/tests/plugins/theia/VscodeXmlPlugin.spec.ts +0 -104
- package/tests/plugins/theia/VscodeYamlPlugin.spec.ts +0 -99
- package/testsLibrary/theia/CodeExecutionTestsTheia.ts +0 -220
- package/testsLibrary/theia/LanguageServerTestsTheia.ts +0 -205
- package/testsLibrary/theia/ProjectAndFileTestsTheia.ts +0 -113
- package/utils/AnimationChecker.ts +0 -27
- package/utils/theia/PreferencesHandlerTheia.ts +0 -123
- /package/{initDefaultValues.sh → configs/sh-scripts/initDefaultValues.sh} +0 -0
- /package/dist/utils/{VCS → vsc}/github/GitHubUtil.js +0 -0
- /package/utils/{VCS → vsc}/github/GitHubUtil.ts +0 -0
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import 'reflect-metadata';
|
|
12
|
-
import { injectable, inject } from 'inversify';
|
|
13
|
-
import { CLASSES } from '../../../../inversify.types';
|
|
14
|
-
import { DriverHelper } from '../../../../utils/DriverHelper';
|
|
15
|
-
import { Logger } from '../../../../utils/Logger';
|
|
16
|
-
import { By } from 'selenium-webdriver';
|
|
17
|
-
import { TimeoutConstants } from '../../../../TimeoutConstants';
|
|
18
|
-
import { LeftToolBar } from '../LeftToolBar';
|
|
19
|
-
|
|
20
|
-
@injectable()
|
|
21
|
-
export class KubernetesPlugin {
|
|
22
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
23
|
-
@inject(CLASSES.LeftToolBar) private readonly leftToolbar: LeftToolBar) { }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
async openView(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
27
|
-
Logger.debug(`KubernetesPlugin.openView`);
|
|
28
|
-
|
|
29
|
-
await this.leftToolbar.selectView('Kubernetes', timeout);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async clickToSection(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
33
|
-
Logger.debug(`KubernetesPlugin.clickToSection ${sectionTitle}`);
|
|
34
|
-
|
|
35
|
-
const sectionLocator: By = By.xpath(this.getSectionLocator(sectionTitle));
|
|
36
|
-
|
|
37
|
-
await this.driverHelper.waitAndClick(sectionLocator, timeout);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async isSectionExpanded(sectionTitle: string): Promise<boolean> {
|
|
41
|
-
Logger.debug(`KubernetesPlugin.isSectionExpanded ${sectionTitle}`);
|
|
42
|
-
|
|
43
|
-
const expandedsectionLocator: By = this.getExpandedSectionLocator(sectionTitle);
|
|
44
|
-
|
|
45
|
-
return await this.driverHelper.isVisible(expandedsectionLocator);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async waitSectionExpanded(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
49
|
-
Logger.debug(`KubernetesPlugin.waitSectionExpanded ${sectionTitle}`);
|
|
50
|
-
|
|
51
|
-
await this.driverHelper.waitVisibility(this.getExpandedSectionLocator(sectionTitle), timeout);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async waitSectionCollapsed(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
55
|
-
Logger.debug(`KubernetesPlugin.waitSectionCollapsed ${sectionTitle}`);
|
|
56
|
-
|
|
57
|
-
await this.driverHelper.waitVisibility(this.getCollapsedSectionLocator(sectionTitle), timeout);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async expandSection(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
61
|
-
Logger.debug(`KubernetesPlugin.expandSection ${sectionTitle}`);
|
|
62
|
-
|
|
63
|
-
if (await this.isSectionExpanded(sectionTitle)) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
await this.clickToSection(sectionTitle, timeout);
|
|
68
|
-
await this.waitSectionExpanded(sectionTitle, timeout);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async clickToRefreshButton(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
72
|
-
Logger.debug(`KubernetesPlugin.clickToRefreshButton`);
|
|
73
|
-
|
|
74
|
-
const refreshButtonLocator: By = By.xpath(`//div[contains(@class, 'theia-header')]//div[contains(@class, 'theia-view-container-part-title')]//div[@title='Refresh']`);
|
|
75
|
-
const sectionTitleLocator: By = By.xpath(this.getSectionLocator(sectionTitle));
|
|
76
|
-
|
|
77
|
-
await this.driverHelper.scrollTo(sectionTitleLocator, timeout);
|
|
78
|
-
await this.driverHelper.waitAndClick(refreshButtonLocator, timeout);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async waitListItemContains(partialText: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
82
|
-
Logger.debug(`KubernetesPlugin.waitListItemContains ${partialText}`);
|
|
83
|
-
|
|
84
|
-
await this.driverHelper.waitVisibility(this.getListItemPartialTextLocator(partialText), timeout);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async waitListItem(expectedText: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
88
|
-
Logger.debug(`KubernetesPlugin.waitListItem ${expectedText}`);
|
|
89
|
-
|
|
90
|
-
await this.driverHelper.waitVisibility(this.getListItemTextLocator(expectedText), timeout);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private getSectionLocator(sectionTitle: string): string {
|
|
94
|
-
return `//div[contains(@class, 'theia-header')]//span[@title='${sectionTitle}']`;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
private getExpandedSectionLocator(sectionTitle: string): By {
|
|
98
|
-
return By.xpath(`${this.getSectionLocator(sectionTitle)}/parent::div/span[contains(@class, 'theia-ExpansionToggle') and not(contains(@class, 'theia-mod-collapsed'))]`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
private getCollapsedSectionLocator(sectionTitle: string): By {
|
|
102
|
-
return By.xpath(`${this.getSectionLocator(sectionTitle)}/parent::div/span[contains(@class, 'theia-ExpansionToggle') and contains(@class, 'theia-mod-collapsed')]`);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
private getListItemPartialTextLocator(partialText: string): By {
|
|
106
|
-
return By.xpath(`//div[@id='extension.vsKubernetesExplorer']//div[contains(text(), "${partialText}")]`);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
private getListItemTextLocator(expectedText: string): By {
|
|
110
|
-
return By.xpath(`//div[contains(@class, 'body')]//div[@class='theia-TreeContainer']//div[@class='theia-TreeNodeContent']//span[text()='${expectedText}']`);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import { injectable, inject } from 'inversify';
|
|
12
|
-
import { CLASSES } from '../../../../inversify.types';
|
|
13
|
-
import { DriverHelper } from '../../../../utils/DriverHelper';
|
|
14
|
-
import { Ide, LeftToolbarButton } from '../Ide';
|
|
15
|
-
import { Logger } from '../../../../utils/Logger';
|
|
16
|
-
import { By } from 'selenium-webdriver';
|
|
17
|
-
import { ContextMenu } from '../ContextMenu';
|
|
18
|
-
import { TimeoutConstants } from '../../../../TimeoutConstants';
|
|
19
|
-
|
|
20
|
-
export enum OpenshiftAppExplorerToolbar {
|
|
21
|
-
ReportExtensionIssueOnGitHub = 'Report Extension Issue on GitHub',
|
|
22
|
-
RefreshView = 'Refresh View',
|
|
23
|
-
SwitchContexts = 'Switch Contexts',
|
|
24
|
-
LogIntoCluster = 'Login into Cluster'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export enum OpenshiftContextMenuItems {
|
|
28
|
-
NewComponent = 'New Component',
|
|
29
|
-
Push = 'Push'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@injectable()
|
|
33
|
-
export class OpenshiftPlugin {
|
|
34
|
-
|
|
35
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
36
|
-
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
37
|
-
@inject(CLASSES.ContextMenu) private readonly contextMenu: ContextMenu
|
|
38
|
-
) {
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async clickOnOpenshiftToollBarIcon(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
|
|
42
|
-
Logger.debug(`OpenshiftPlugin.clickOnOpenshiftTollBar`);
|
|
43
|
-
await this.ide.waitAndClickLeftToolbarButton(LeftToolbarButton.Openshift, timeout);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async waitOpenshiftConnectorTree(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
|
|
47
|
-
Logger.debug(`OpenshiftPlugin.waitOpenshiftConnectorTree`);
|
|
48
|
-
await this.driverHelper.waitPresence(By.id('openshiftProjectExplorer'), timeout);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async clickOnOpenshiftConnectorTree(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
|
|
52
|
-
Logger.debug(`OpenshiftPlugin.clickOnOpenshiftConnectorTree`);
|
|
53
|
-
await this.driverHelper.waitAndClick(By.id('plugin-view:openshiftProjectExplorer'), timeout);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async clickOnApplicationToolbarItem(item: OpenshiftAppExplorerToolbar, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
57
|
-
Logger.debug(`OpenshiftPlugin.clickOnApplicationToolbarItem`);
|
|
58
|
-
await this.driverHelper.waitAndClick(By.css(`div [title='${item}']`), timeout);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async getClusterIP(timeout: number = TimeoutConstants.TS_GET_CLUSTER_IP_TIMEOUT): Promise<string> {
|
|
62
|
-
Logger.debug(`OpenshiftPlugin.getClusterIP`);
|
|
63
|
-
return await this.driverHelper.waitAndGetText(By.xpath('//div[@id=\'openshiftProjectExplorer\']//div[@title [contains(text(), https)]]'), timeout);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async waitItemInTree(item: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
67
|
-
Logger.debug(`OpenshiftPlugin.waitItemInTree`);
|
|
68
|
-
await this.driverHelper.waitPresence(By.xpath(`//div[contains(@id, ':${item}')]`), timeout);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async clickOnItemInTree(item: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
72
|
-
Logger.debug(`OpenshiftPlugin.clickOnItemInTree`);
|
|
73
|
-
await this.driverHelper.waitAndClick(By.xpath(`//div[contains(@id, ':${item}')]`), timeout);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
async invokeContextMenuOnItem(treeItem: string) {
|
|
77
|
-
Logger.debug(`OpenshiftPlugin.invokeContextMenuOnItem`);
|
|
78
|
-
await this.contextMenu.invokeContextMenuOnTheElementWithMouse(By.xpath(`//div[contains(@id, ':${treeItem}')]`));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async invokeContextMenuCommandOnItem(treeItem: string, menuItem: OpenshiftContextMenuItems) {
|
|
82
|
-
Logger.debug(`OpenshiftPlugin.clickOnItemInTree`);
|
|
83
|
-
await this.contextMenu.invokeContextMenuOnTheElementWithMouse(By.xpath(`//div[contains(@id, ':${treeItem}')]`));
|
|
84
|
-
await this.contextMenu.waitContextMenuAndClickOnItem(menuItem);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import 'reflect-metadata';
|
|
12
|
-
import { injectable, inject } from 'inversify';
|
|
13
|
-
import { CLASSES } from '../../../../inversify.types';
|
|
14
|
-
import { DriverHelper } from '../../../../utils/DriverHelper';
|
|
15
|
-
import { Logger } from '../../../../utils/Logger';
|
|
16
|
-
import { By, error } from 'selenium-webdriver';
|
|
17
|
-
import { TimeoutConstants } from '../../../../TimeoutConstants';
|
|
18
|
-
import { LeftToolBar } from '../LeftToolBar';
|
|
19
|
-
import { TopMenu } from '../TopMenu';
|
|
20
|
-
|
|
21
|
-
@injectable()
|
|
22
|
-
export class PluginsView {
|
|
23
|
-
private static readonly SEARCH_FIELD_LOCATOR: By = By.xpath(`//div[@class='che-plugin-control-panel']//input`);
|
|
24
|
-
private static readonly PLUGINS_LOADER: By = By.xpath(`//div[@id='theia-left-side-panel']//div[@class='spinnerContainer']`);
|
|
25
|
-
|
|
26
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
27
|
-
@inject(CLASSES.LeftToolBar) private readonly leftToolbar: LeftToolBar,
|
|
28
|
-
@inject(CLASSES.TopMenu) private readonly topMenu: TopMenu) { }
|
|
29
|
-
|
|
30
|
-
async waitTitle(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
31
|
-
Logger.debug('PluginsView.waitTitle');
|
|
32
|
-
|
|
33
|
-
await this.driverHelper.waitVisibility(By.xpath(`//div[@title='Plugins']`), timeout);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async waitPluginsLoader(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
37
|
-
Logger.debug('PluginsView.waitPluginsLoader');
|
|
38
|
-
|
|
39
|
-
await this.driverHelper.waitVisibility(PluginsView.PLUGINS_LOADER, timeout);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async waitPluginsLoaderDisappearance(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
43
|
-
Logger.debug('PluginsView.waitPluginsLoaderDisappearance');
|
|
44
|
-
|
|
45
|
-
await this.driverHelper.waitDisappearance(PluginsView.PLUGINS_LOADER, timeout);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async openView(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
49
|
-
Logger.debug('PluginsView.openView');
|
|
50
|
-
|
|
51
|
-
await this.openViewByTopMenu();
|
|
52
|
-
await this.waitPluginsLoader(timeout);
|
|
53
|
-
await this.waitPluginsLoaderDisappearance(timeout);
|
|
54
|
-
await this.waitView(timeout);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async clickPluginsViewButton(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
58
|
-
Logger.debug('PluginsView.clickPluginsViewButton');
|
|
59
|
-
|
|
60
|
-
await this.leftToolbar.clickOnToolIcon('Plugins', timeout);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
async selectPlugins(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
64
|
-
Logger.debug('PluginsView.selectPlugins');
|
|
65
|
-
|
|
66
|
-
await this.leftToolbar.selectView('Plugins', timeout);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async waitSearchField(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
70
|
-
Logger.debug('PluginsView.waitSearchField');
|
|
71
|
-
|
|
72
|
-
await this.driverHelper.waitVisibility(PluginsView.SEARCH_FIELD_LOCATOR, timeout);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async typeTextToSearchField(text: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
76
|
-
Logger.debug('PluginsView.typeTextToSearchField');
|
|
77
|
-
|
|
78
|
-
// search field performs searching during typing
|
|
79
|
-
// if try to write whole word at once
|
|
80
|
-
// it will cause to the random result
|
|
81
|
-
for (let i: number = 0; i < text.length; i++) {
|
|
82
|
-
await this.driverHelper.type(PluginsView.SEARCH_FIELD_LOCATOR, text.charAt(i), timeout);
|
|
83
|
-
await this.driverHelper.wait(2000);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async waitView(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
88
|
-
Logger.debug('PluginsView.waitView');
|
|
89
|
-
|
|
90
|
-
await this.waitTitle(timeout);
|
|
91
|
-
await this.waitSearchField(timeout);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async waitPlugin(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
95
|
-
Logger.debug('PluginsView.waitPlugin');
|
|
96
|
-
|
|
97
|
-
const pluginLocator: By = By.xpath(`${this.getPluginBaseLocator(pluginTitle)}`);
|
|
98
|
-
|
|
99
|
-
await this.driverHelper.waitVisibility(pluginLocator, timeout);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
async waitInstallButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
103
|
-
Logger.debug('PluginsView.waitInstallButton');
|
|
104
|
-
|
|
105
|
-
const installButtonLocator: By = this.getInstallButtonLocator(pluginTitle);
|
|
106
|
-
|
|
107
|
-
await this.driverHelper.waitVisibility(installButtonLocator, timeout);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async clickInstallButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
111
|
-
Logger.debug('PluginsView.clickInstallButton');
|
|
112
|
-
|
|
113
|
-
const installButtonLocator: By = this.getInstallButtonLocator(pluginTitle);
|
|
114
|
-
|
|
115
|
-
await this.driverHelper.waitAndClick(installButtonLocator, timeout);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
async waitInstalledButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
119
|
-
Logger.debug('PluginsView.waitInstalledButton');
|
|
120
|
-
|
|
121
|
-
const installedButtonLocator: By = this.getInstalledButtonLocator(pluginTitle);
|
|
122
|
-
|
|
123
|
-
await this.driverHelper.waitVisibility(installedButtonLocator, timeout);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
async clickInstalledButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
127
|
-
Logger.debug('PluginsView.clickInstalledButton');
|
|
128
|
-
|
|
129
|
-
const installedButtonLocator: By = this.getInstalledButtonLocator(pluginTitle);
|
|
130
|
-
|
|
131
|
-
await this.driverHelper.waitAndClick(installedButtonLocator, timeout);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async waitPluginNotification(notificationText: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
135
|
-
Logger.debug('PluginsView.waitPluginNotification');
|
|
136
|
-
|
|
137
|
-
const pluginNotificationLocator: By = this.getPluginNotificationLocator(notificationText);
|
|
138
|
-
|
|
139
|
-
await this.driverHelper.waitVisibility(pluginNotificationLocator);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
async clickPluginNotification(notificationText: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
143
|
-
Logger.debug('PluginsView.clickPluginNotification');
|
|
144
|
-
|
|
145
|
-
const pluginNotificationLocator: By = this.getPluginNotificationLocator(notificationText);
|
|
146
|
-
|
|
147
|
-
await this.driverHelper.waitAndClick(pluginNotificationLocator);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
private async openViewByTopMenu() {
|
|
151
|
-
await this.topMenu.clickOnTopMenuButton('View');
|
|
152
|
-
|
|
153
|
-
try {
|
|
154
|
-
await this.topMenu.clickOnSubmenuItem('Plugins');
|
|
155
|
-
} catch (err) {
|
|
156
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
157
|
-
throw err;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
Logger.debug('The "View" menu is not opened, try again');
|
|
161
|
-
|
|
162
|
-
await this.topMenu.clickOnTopMenuButton('View');
|
|
163
|
-
await this.topMenu.clickOnSubmenuItem('Plugins');
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
private getPluginNotificationLocator(notificationText: string): By {
|
|
168
|
-
const pluginNotificationXpath: string = `//div[@class='che-plugins-notification']//div[@class='notification-message-text' and text()='${notificationText}']`;
|
|
169
|
-
|
|
170
|
-
return By.xpath(pluginNotificationXpath);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
private getPluginBaseLocator(pluginTitle: string): string {
|
|
174
|
-
return `//div[@class='che-plugin-content']//div[@class='che-plugin-name']/span[text()='${pluginTitle}']/parent::div/parent::div/parent::div/parent::div`;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private getInstallButtonLocator(pluginTitle: string): By {
|
|
178
|
-
const basePluginXpath: string = this.getPluginBaseLocator(pluginTitle);
|
|
179
|
-
const relativeInstallButtonXpath: string = `//div[@class='che-plugin-action-add' and text()='Install']`;
|
|
180
|
-
|
|
181
|
-
return By.xpath(`${basePluginXpath}${relativeInstallButtonXpath}`);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
private getInstalledButtonLocator(pluginTitle: string): By {
|
|
185
|
-
const basePluginXpath: string = this.getPluginBaseLocator(pluginTitle);
|
|
186
|
-
const relativeInstalledButtonXpath: string = `//div[@class='che-plugin-action-remove' and text()='Installed']`;
|
|
187
|
-
|
|
188
|
-
return By.xpath(`${basePluginXpath}${relativeInstalledButtonXpath}`);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
}
|
package/tests/MochaHooks.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2023 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import 'reflect-metadata';
|
|
12
|
-
import { CLASSES } from '../inversify.types';
|
|
13
|
-
import { EditorType, TestConstants } from '../TestConstants';
|
|
14
|
-
import { AskForConfirmationTypeTheia, PreferencesHandlerTheia, TerminalRendererTypeTheia } from '../utils/theia/PreferencesHandlerTheia';
|
|
15
|
-
import { CheApiRequestHandler } from '../utils/requestHandlers/CheApiRequestHandler';
|
|
16
|
-
import { TimeoutConstants } from '../TimeoutConstants';
|
|
17
|
-
import * as monacoPageObjects from 'monaco-page-objects';
|
|
18
|
-
import * as vscodeExtensionTesterLocators from 'vscode-extension-tester-locators';
|
|
19
|
-
import { e2eContainer } from '../inversify.config';
|
|
20
|
-
import { DriverHelper } from '../utils/DriverHelper';
|
|
21
|
-
|
|
22
|
-
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
|
23
|
-
const preferencesHandler: PreferencesHandlerTheia = e2eContainer.get(CLASSES.PreferencesHandlerTheia);
|
|
24
|
-
|
|
25
|
-
exports.mochaHooks = {
|
|
26
|
-
beforeAll: [
|
|
27
|
-
async function enableRequestInterceptor() {
|
|
28
|
-
if (TestConstants.TS_SELENIUM_REQUEST_INTERCEPTOR) {
|
|
29
|
-
CheApiRequestHandler.enableRequestInteceptor();
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
async function enableResponseInterceptor() {
|
|
33
|
-
if (TestConstants.TS_SELENIUM_RESPONSE_INTERCEPTOR) {
|
|
34
|
-
CheApiRequestHandler.enableResponseInterceptor();
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
async function setTheiaSpecificPreferences() {
|
|
38
|
-
if (TestConstants.TS_SELENIUM_EDITOR === EditorType.THEIA) {
|
|
39
|
-
await preferencesHandler.setConfirmExit(AskForConfirmationTypeTheia.never);
|
|
40
|
-
await preferencesHandler.setTerminalType(TerminalRendererTypeTheia.dom);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
async function initMonacoPageObjects() {
|
|
44
|
-
if (TestConstants.TS_SELENIUM_EDITOR === EditorType.CHE_CODE) {
|
|
45
|
-
// init vscode-extension-tester monaco-page-objects
|
|
46
|
-
monacoPageObjects.initPageObjects(TestConstants.TS_SELENIUM_MONACO_PAGE_OBJECTS_USE_VERSION, TestConstants.TS_SELENIUM_MONACO_PAGE_OBJECTS_BASE_VERSION, vscodeExtensionTesterLocators.getLocatorsPath(), driverHelper.getDriver(), 'google-chrome');
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
async function prolongTimeoutConstantsInDebugMode() {
|
|
50
|
-
if (TestConstants.TS_DEBUG_MODE === true) {
|
|
51
|
-
for (let [timeout, seconds] of Object.entries(TimeoutConstants)) {
|
|
52
|
-
Object.defineProperty(TimeoutConstants, timeout, {value: seconds * 100});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
]
|
|
57
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2020 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
import 'reflect-metadata';
|
|
11
|
-
import { e2eContainer } from '../../../inversify.config';
|
|
12
|
-
import { CLASSES } from '../../../inversify.types';
|
|
13
|
-
import { Editor } from '../../../pageobjects/ide/theia/Editor';
|
|
14
|
-
import { LanguageServerTestsTheia } from '../../../testsLibrary/theia/LanguageServerTestsTheia';
|
|
15
|
-
import { CodeExecutionTestsTheia } from '../../../testsLibrary/theia/CodeExecutionTestsTheia';
|
|
16
|
-
import { ProjectAndFileTestsTheia } from '../../../testsLibrary/theia/ProjectAndFileTestsTheia';
|
|
17
|
-
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
-
import CheReporter from '../../../driver/CheReporter';
|
|
19
|
-
|
|
20
|
-
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
21
|
-
const projectAndFileTests: ProjectAndFileTestsTheia = e2eContainer.get(CLASSES.ProjectAndFileTestsTheia);
|
|
22
|
-
const commonLanguageServerTests: LanguageServerTestsTheia = e2eContainer.get(CLASSES.LanguageServerTestsTheia);
|
|
23
|
-
const codeExecutionTests: CodeExecutionTestsTheia = e2eContainer.get(CLASSES.CodeExecutionTestsTheia);
|
|
24
|
-
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
25
|
-
|
|
26
|
-
const workspaceSampleName: string = 'cpp-hello-world';
|
|
27
|
-
const fileFolderPath: string = `${workspaceSampleName}`;
|
|
28
|
-
const tabTitle: string = 'hello.cpp';
|
|
29
|
-
const buildTaskName: string = 'build';
|
|
30
|
-
const runTaskName: string = 'run';
|
|
31
|
-
const stack: string = 'C/C++';
|
|
32
|
-
|
|
33
|
-
suite(`${stack} test`, async () => {
|
|
34
|
-
suite(`Create ${stack} workspace`, async () => {
|
|
35
|
-
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
36
|
-
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
37
|
-
test('Register running workspace', async () => {
|
|
38
|
-
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
39
|
-
});
|
|
40
|
-
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
suite('Test opening file', async () => {
|
|
44
|
-
// opening file that soon should give time for LS to initialize
|
|
45
|
-
projectAndFileTests.openFile(fileFolderPath, tabTitle);
|
|
46
|
-
prepareEditorForLanguageServerTests();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
suite('Validation of project build', async () => {
|
|
50
|
-
codeExecutionTests.runTask(buildTaskName, 30_000);
|
|
51
|
-
codeExecutionTests.runTask(runTaskName, 30_000);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
suite('Language server validation', async () => {
|
|
55
|
-
commonLanguageServerTests.errorHighlighting(tabTitle, `error_text;`, 12);
|
|
56
|
-
commonLanguageServerTests.suggestionInvoking(tabTitle, 15, 22, 'test');
|
|
57
|
-
commonLanguageServerTests.autocomplete(tabTitle, 15, 9, 'printf');
|
|
58
|
-
// commonLanguageServerTests.goToImplementations(tabTitle, 15, 9, 'stdio.h'); currently not working because of LS not exposing Ctrl + F12 combination
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
suite('Stopping and deleting the workspace', async () => {
|
|
62
|
-
test(`Stop and remowe workspace`, async () => {
|
|
63
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export function prepareEditorForLanguageServerTests() {
|
|
70
|
-
test(`Prepare file for LS tests`, async () => {
|
|
71
|
-
await editor.moveCursorToLineAndChar(tabTitle, 6, 1);
|
|
72
|
-
await editor.performKeyCombination(tabTitle, '#include <cstdio>\n');
|
|
73
|
-
await editor.moveCursorToLineAndChar(tabTitle, 10, 1);
|
|
74
|
-
await editor.performKeyCombination(tabTitle, '\nchar const *test = "test";\n');
|
|
75
|
-
await editor.moveCursorToLineAndChar(tabTitle, 15, 5);
|
|
76
|
-
await editor.performKeyCombination(tabTitle, 'printf("%s\\n", test);\n');
|
|
77
|
-
});
|
|
78
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2020 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
import 'reflect-metadata';
|
|
11
|
-
import { CLASSES } from '../../../inversify.types';
|
|
12
|
-
import { e2eContainer } from '../../../inversify.config';
|
|
13
|
-
import { PreferencesHandlerTheia } from '../../../utils/theia/PreferencesHandlerTheia';
|
|
14
|
-
import { ProjectAndFileTestsTheia } from '../../../testsLibrary/theia/ProjectAndFileTestsTheia';
|
|
15
|
-
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
16
|
-
import { NavigationBar } from '../../../pageobjects/ide/theia/NavigationBar';
|
|
17
|
-
import { Dashboard } from '../../../pageobjects/dashboard/Dashboard';
|
|
18
|
-
import CheReporter from '../../../driver/CheReporter';
|
|
19
|
-
|
|
20
|
-
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
21
|
-
const preferencesHandler: PreferencesHandlerTheia = e2eContainer.get(CLASSES.PreferencesHandlerTheia);
|
|
22
|
-
const projectAndFileTests: ProjectAndFileTestsTheia = e2eContainer.get(CLASSES.ProjectAndFileTestsTheia);
|
|
23
|
-
const navigationBar: NavigationBar = e2eContainer.get(CLASSES.NavigationBar);
|
|
24
|
-
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
|
25
|
-
|
|
26
|
-
const workspaceSampleName: string = 'console-java-simple';
|
|
27
|
-
const workspaceRootFolderName: string = 'src';
|
|
28
|
-
const stack: string = 'Java Maven';
|
|
29
|
-
|
|
30
|
-
suite(`${stack} test`, async () => {
|
|
31
|
-
suite (`Create ${stack} workspace`, async () => {
|
|
32
|
-
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
33
|
-
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
34
|
-
test('Register running workspace', async () => {
|
|
35
|
-
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
36
|
-
});
|
|
37
|
-
projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName, false);
|
|
38
|
-
|
|
39
|
-
test('Set application.confirmExit user preferences to "never"', async () => {
|
|
40
|
-
await preferencesHandler.setPreferenceUsingUI('application.confirmExit', 'never');
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
suite ('Stopping and deleting the workspace', async () => {
|
|
45
|
-
test(`Stop and remowe workspace`, async () => {
|
|
46
|
-
await navigationBar.openNavigationBar();
|
|
47
|
-
await dashboard.stopAndRemoveWorkspaceByUI(WorkspaceHandlingTests.getWorkspaceName());
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2020 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
import 'reflect-metadata';
|
|
11
|
-
import { CLASSES } from '../../../inversify.types';
|
|
12
|
-
import { e2eContainer } from '../../../inversify.config';
|
|
13
|
-
import { Editor } from '../../../pageobjects/ide/theia/Editor';
|
|
14
|
-
import { LanguageServerTestsTheia } from '../../../testsLibrary/theia/LanguageServerTestsTheia';
|
|
15
|
-
import { CodeExecutionTestsTheia } from '../../../testsLibrary/theia/CodeExecutionTestsTheia';
|
|
16
|
-
import { ProjectAndFileTestsTheia } from '../../../testsLibrary/theia/ProjectAndFileTestsTheia';
|
|
17
|
-
import { WorkspaceHandlingTests } from '../../../testsLibrary/WorkspaceHandlingTests';
|
|
18
|
-
import CheReporter from '../../../driver/CheReporter';
|
|
19
|
-
|
|
20
|
-
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
|
|
21
|
-
const projectAndFileTests: ProjectAndFileTestsTheia = e2eContainer.get(CLASSES.ProjectAndFileTestsTheia);
|
|
22
|
-
const commonLanguageServerTests: LanguageServerTestsTheia = e2eContainer.get(CLASSES.LanguageServerTestsTheia);
|
|
23
|
-
const codeExecutionTests: CodeExecutionTestsTheia = e2eContainer.get(CLASSES.CodeExecutionTestsTheia);
|
|
24
|
-
const editor: Editor = e2eContainer.get(CLASSES.Editor);
|
|
25
|
-
|
|
26
|
-
const workspaceSampleName: string = 'dotnet-web-simple';
|
|
27
|
-
const fileFolderPath: string = `${workspaceSampleName}`;
|
|
28
|
-
const tabTitle: string = 'Program.cs';
|
|
29
|
-
// const codeNavigationClassName: string = '[metadata] Console.cs';
|
|
30
|
-
const stack: string = 'ASP.NET Core Web Application';
|
|
31
|
-
const updateDependenciesTaskName: string = 'update dependencies';
|
|
32
|
-
const buildTaskName: string = 'build';
|
|
33
|
-
const runTaskName: string = 'run';
|
|
34
|
-
const runTaskNameExpectedString: string = 'Process 5000-tcp is now listening on port 5000. Open it ?';
|
|
35
|
-
|
|
36
|
-
suite(`Test ${stack}`, async () => {
|
|
37
|
-
suite (`Create ${stack} workspace`, async () => {
|
|
38
|
-
workspaceHandlingTests.createAndOpenWorkspace(stack);
|
|
39
|
-
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
40
|
-
test('Register running workspace', async () => {
|
|
41
|
-
CheReporter.registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
42
|
-
});
|
|
43
|
-
projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName, false);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
suite('Test opening file', async () => {
|
|
47
|
-
// opening file that soon should give time for LS to initialize
|
|
48
|
-
projectAndFileTests.openFile(fileFolderPath, tabTitle);
|
|
49
|
-
prepareEditorForLanguageServerTests();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
suite('Installing dependencies', async () => {
|
|
53
|
-
codeExecutionTests.runTask(updateDependenciesTaskName, 120_000);
|
|
54
|
-
codeExecutionTests.closeTerminal(updateDependenciesTaskName);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
suite('Validation of workspace build', async () => {
|
|
58
|
-
codeExecutionTests.runTask(buildTaskName, 30_000);
|
|
59
|
-
codeExecutionTests.closeTerminal(buildTaskName);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
suite('Run .NET Core example application', async () => {
|
|
63
|
-
codeExecutionTests.runTaskWithNotification(runTaskName, runTaskNameExpectedString , 30_000);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
suite('Language server validation', async () => {
|
|
67
|
-
commonLanguageServerTests.suggestionInvoking(tabTitle, 22, 33, 'test');
|
|
68
|
-
commonLanguageServerTests.errorHighlighting(tabTitle, 'error_text;', 23);
|
|
69
|
-
commonLanguageServerTests.autocomplete(tabTitle, 22, 27, 'WriteLine');
|
|
70
|
-
// commonLanguageServerTests.goToImplementations(tabTitle, 22, 27, codeNavigationClassName); // codenavigation is inconsistent https://github.com/eclipse/che/issues/16929
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
suite ('Stopping and deleting the workspace', async () => {
|
|
74
|
-
test(`Stop and remowe workspace`, async () => {
|
|
75
|
-
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
export function prepareEditorForLanguageServerTests() {
|
|
81
|
-
test(`Prepare file for LS tests`, async () => {
|
|
82
|
-
await editor.moveCursorToLineAndChar(tabTitle, 18, 6);
|
|
83
|
-
await editor.performKeyCombination(tabTitle, '\nprivate static String test = "test";');
|
|
84
|
-
await editor.moveCursorToLineAndChar(tabTitle, 21, 10);
|
|
85
|
-
await editor.performKeyCombination(tabTitle, '\nConsole.WriteLine(test);\n');
|
|
86
|
-
});
|
|
87
|
-
}
|