@eclipse-che/che-e2e 7.62.0-dev-4f7da12 → 7.62.0-dev-13e3caa
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 -26
- 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,34 +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
|
-
import { injectable, inject } from 'inversify';
|
|
11
|
-
import { CLASSES } from '../../../inversify.types';
|
|
12
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
13
|
-
import { By } from 'selenium-webdriver';
|
|
14
|
-
import { Logger } from '../../../utils/Logger';
|
|
15
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
16
|
-
|
|
17
|
-
@injectable()
|
|
18
|
-
export class RightToolBar {
|
|
19
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
20
|
-
|
|
21
|
-
async waitToolbar(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
|
|
22
|
-
Logger.debug('RightToolbar.waitToolbar');
|
|
23
|
-
|
|
24
|
-
await this.driverHelper.waitVisibility(By.css('div.theia-app-right'), timeout);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async clickOnToolIcon(iconTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
28
|
-
Logger.debug(`RightToolbar.clickOnToolIcon "${iconTitle}"`);
|
|
29
|
-
|
|
30
|
-
const toolIconLocator: By = By.css(`div.theia-app-right .p-TabBar-content li[title='${iconTitle}']`);
|
|
31
|
-
|
|
32
|
-
await this.driverHelper.waitAndClick(toolIconLocator, timeout);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,219 +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 { By, Key, WebElement, error } from 'selenium-webdriver';
|
|
15
|
-
import { Logger } from '../../../utils/Logger';
|
|
16
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
17
|
-
import { TestConstants } from '../../../TestConstants';
|
|
18
|
-
|
|
19
|
-
@injectable()
|
|
20
|
-
export class Terminal {
|
|
21
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
22
|
-
|
|
23
|
-
async waitTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
24
|
-
Logger.debug(`Terminal.waitTab "${tabTitle}"`);
|
|
25
|
-
|
|
26
|
-
const terminalTabLocator: By = By.css(this.getTerminalTabCssLocator(tabTitle));
|
|
27
|
-
|
|
28
|
-
await this.driverHelper.waitVisibility(terminalTabLocator, timeout);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async waitTabAbsence(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
32
|
-
Logger.debug(`Terminal.waitTabAbsence "${tabTitle}"`);
|
|
33
|
-
|
|
34
|
-
const terminalTabLocator: By = By.css(this.getTerminalTabCssLocator(tabTitle));
|
|
35
|
-
|
|
36
|
-
await this.driverHelper.waitDisappearanceWithTimeout(terminalTabLocator, timeout);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
40
|
-
Logger.debug(`Terminal.clickOnTab "${tabTitle}"`);
|
|
41
|
-
|
|
42
|
-
const terminalTabLocator: By = By.css(`${this.getTerminalTabCssLocator(tabTitle)} div.theia-tab-icon-label`);
|
|
43
|
-
|
|
44
|
-
await this, this.driverHelper.waitAndClick(terminalTabLocator, timeout);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async waitTabFocused(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
48
|
-
Logger.debug(`Terminal.waitTabFocused "${tabTitle}"`);
|
|
49
|
-
|
|
50
|
-
const focusedTerminalTabLocator: By = this.getFocusedTerminalTabLocator(tabTitle);
|
|
51
|
-
|
|
52
|
-
await this.driverHelper.waitVisibility(focusedTerminalTabLocator, timeout);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async selectTerminalTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
56
|
-
Logger.debug(`Terminal.selectTerminalTab "${tabTitle}"`);
|
|
57
|
-
|
|
58
|
-
await this.clickOnTab(tabTitle, timeout);
|
|
59
|
-
await this.waitTabFocused(tabTitle, timeout);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async clickOnTabCloseIcon(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
63
|
-
Logger.debug(`Terminal.clickOnTabCloseIcon "${tabTitle}"`);
|
|
64
|
-
|
|
65
|
-
const terminalTabCloseIconLocator: By =
|
|
66
|
-
By.css(`${this.getTerminalTabCssLocator(tabTitle)} div.p-TabBar-tabCloseIcon`);
|
|
67
|
-
|
|
68
|
-
await this.driverHelper.waitAndClick(terminalTabCloseIconLocator, timeout);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async closeTerminalTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
72
|
-
Logger.debug(`Terminal.closeTerminalTab "${tabTitle}"`);
|
|
73
|
-
|
|
74
|
-
await this.clickOnTabCloseIcon(tabTitle, timeout);
|
|
75
|
-
await this.waitTabAbsence(tabTitle, timeout);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
async type(terminalTabTitle: string, text: string) {
|
|
79
|
-
Logger.debug(`Terminal.type "${terminalTabTitle}"`);
|
|
80
|
-
|
|
81
|
-
const terminalID: string = await this.getTerminalID(terminalTabTitle);
|
|
82
|
-
const terminalInteractionContainer: By = this.getTerminalEditorInteractionEditorLocator(terminalID);
|
|
83
|
-
|
|
84
|
-
await this.driverHelper.typeToInvisible(terminalInteractionContainer, text);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async rejectTerminalProcess(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
88
|
-
Logger.debug(`Terminal.rejectTerminalProcess "${tabTitle}"`);
|
|
89
|
-
|
|
90
|
-
await this.selectTerminalTab(tabTitle, timeout);
|
|
91
|
-
await this.type(tabTitle, Key.chord(Key.CONTROL, 'c'));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async getText(terminalTab: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT): Promise<string> {
|
|
95
|
-
Logger.debug(`Terminal.getText tab: ${terminalTab}`);
|
|
96
|
-
|
|
97
|
-
const terminalID: string = await this.getTerminalID(terminalTab);
|
|
98
|
-
const terminalRowsLocator: By = this.getTerminalEditorTerminalRowsLocator(terminalID);
|
|
99
|
-
await this.selectTerminalTab(terminalTab, timeout);
|
|
100
|
-
return await this.driverHelper.waitAndGetText(terminalRowsLocator, timeout);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async getTextFromProblemsTab(timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT): Promise<string> {
|
|
104
|
-
Logger.debug(`Terminal.getTextFromProblemsTab`);
|
|
105
|
-
|
|
106
|
-
const problemsTabBodyLocator: By = By.xpath(`//div[@id='problems']`);
|
|
107
|
-
|
|
108
|
-
return await this.driverHelper.waitAndGetText(problemsTabBodyLocator, timeout);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
async selectTabByPrefixAndWaitText(terminalTab: string, expectedText: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
|
|
112
|
-
Logger.debug(`Terminal.selectTabByPrefixAndWaitText tab: ${terminalTab} text: ${expectedText}`);
|
|
113
|
-
|
|
114
|
-
const terminalTabLocatorWithPreffix: string = `//li[contains(@title, '${terminalTab}')]`;
|
|
115
|
-
const terminalID: string = await this.getTerminalID(terminalTab);
|
|
116
|
-
const terminalRowsLocator: By = this.getTerminalEditorTerminalRowsLocator(terminalID);
|
|
117
|
-
|
|
118
|
-
await this.driverHelper.waitAndClick(By.xpath(terminalTabLocatorWithPreffix), timeout);
|
|
119
|
-
await this.driverHelper.waitUntilTrue(async () => {
|
|
120
|
-
const terminalText: string = await this.driverHelper.waitAndGetText(terminalRowsLocator, timeout);
|
|
121
|
-
return terminalText.includes(expectedText);
|
|
122
|
-
}, timeout);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
async waitText(terminalTab: string, expectedText: string, timeout: number) {
|
|
126
|
-
Logger.debug(`Terminal.waitText tab: ${terminalTab} text: ${expectedText}`);
|
|
127
|
-
|
|
128
|
-
await this.selectTerminalTab(terminalTab, timeout);
|
|
129
|
-
await this.driverHelper.waitUntilTrue(async () => {
|
|
130
|
-
// separates each method iteration to the readable blocks in the terminal log
|
|
131
|
-
Logger.debug('----------------------------------------------');
|
|
132
|
-
|
|
133
|
-
const terminalText: string = await this.getText(terminalTab, timeout);
|
|
134
|
-
|
|
135
|
-
if (terminalText.includes(expectedText)) {
|
|
136
|
-
Logger.debug('Expected text is present in the terminal output');
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
Logger.debug('Expected text is not present in the terminal output');
|
|
141
|
-
await this.driverHelper.wait(1000);
|
|
142
|
-
return false;
|
|
143
|
-
|
|
144
|
-
}, timeout);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
async waitTextInProblemsTab(expectedText: string, timeout: number) {
|
|
148
|
-
Logger.debug(`Terminal.waitTextInProblemsTab`);
|
|
149
|
-
|
|
150
|
-
await this.selectTerminalTab('Problems', timeout);
|
|
151
|
-
await this.driverHelper.waitUntilTrue(async () => {
|
|
152
|
-
// separates each method iteration to the readable blocks in the terminal log
|
|
153
|
-
Logger.debug('----------------------------------------------');
|
|
154
|
-
|
|
155
|
-
const terminalText: string = await this.getTextFromProblemsTab(timeout);
|
|
156
|
-
|
|
157
|
-
if (terminalText.includes(expectedText)) {
|
|
158
|
-
Logger.debug('Expected text is present in the terminal output');
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
Logger.debug('Expected text is not present in the terminal output');
|
|
163
|
-
await this.driverHelper.wait(1000);
|
|
164
|
-
return false;
|
|
165
|
-
|
|
166
|
-
}, timeout);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
public async waitIconSuccess(taskName: string, timeout: number) {
|
|
170
|
-
const terminalTabLocator: By = By.css(`${this.getTerminalTabCssLocator(taskName)} div.p-TabBar-tabIcon`);
|
|
171
|
-
await this.driverHelper.waitVisibility(terminalTabLocator, TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT);
|
|
172
|
-
let terminalClass = await this.driverHelper.waitAndGetElementAttribute(terminalTabLocator, 'class');
|
|
173
|
-
|
|
174
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
175
|
-
terminalClass = await this.driverHelper.waitAndGetElementAttribute(terminalTabLocator, 'class');
|
|
176
|
-
if (terminalClass.includes('fa-check')) { // css for tick icon
|
|
177
|
-
return true;
|
|
178
|
-
}
|
|
179
|
-
if (terminalClass.includes('fa-times-circle')) { // css for failed icon
|
|
180
|
-
Logger.error('Task "' + taskName + '" failed.');
|
|
181
|
-
throw new Error('Task "' + taskName + '" failed.');
|
|
182
|
-
}
|
|
183
|
-
await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5);
|
|
184
|
-
return false;
|
|
185
|
-
}, timeout, 'Timed out waiting for task ' + taskName + ' to succeed.');
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
private getTerminalTabCssLocator(tabTitle: string): string {
|
|
189
|
-
return `li[title='${tabTitle}']`;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
private getFocusedTerminalTabLocator(tabTitle: string): By {
|
|
193
|
-
return By.css(`li[title='${tabTitle}'].p-mod-current.theia-mod-active`);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
private async getTerminalID(terminalTitle: string): Promise<string> {
|
|
197
|
-
const terminalTabXpathLocator: string = `//div[@id='theia-bottom-content-panel']//li[contains(@title, '${terminalTitle}')]`;
|
|
198
|
-
|
|
199
|
-
const terminalTabs: WebElement[] = await this.driverHelper.waitAllPresence(By.xpath(terminalTabXpathLocator));
|
|
200
|
-
|
|
201
|
-
if (terminalTabs.length > 1) {
|
|
202
|
-
throw new error.InvalidSelectorError(`Terminal.getTerminalID Selector is too generic, found more than one terminal with title:${terminalTitle}`);
|
|
203
|
-
}
|
|
204
|
-
if (terminalTabs.length === 1) {
|
|
205
|
-
return await (await terminalTabs[0].getAttribute('id')).replace('shell-tab-', '');
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
throw new error.NoSuchElementError(`The terminal with title '${terminalTitle}' has not been found.`);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
private getTerminalEditorInteractionEditorLocator(terminalID: string): By {
|
|
212
|
-
return By.xpath(`//div[@id='${terminalID}']//textarea[@aria-label='Terminal input']`);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
private getTerminalEditorTerminalRowsLocator(terminalID: string): By {
|
|
216
|
-
return By.xpath(`//div[@id='${terminalID}']//div[@class='xterm-rows xterm-focus']`);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { injectable, inject } from 'inversify';
|
|
2
|
-
import { CLASSES } from '../../../inversify.types';
|
|
3
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
4
|
-
import { By, error } from 'selenium-webdriver';
|
|
5
|
-
import { Logger } from '../../../utils/Logger';
|
|
6
|
-
import { QuickOpenContainer } from './QuickOpenContainer';
|
|
7
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
8
|
-
import { AnimationChecker } from '../../../utils/AnimationChecker';
|
|
9
|
-
|
|
10
|
-
/*********************************************************************
|
|
11
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
12
|
-
*
|
|
13
|
-
* This program and the accompanying materials are made
|
|
14
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
15
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
18
|
-
**********************************************************************/
|
|
19
|
-
|
|
20
|
-
@injectable()
|
|
21
|
-
export class TopMenu {
|
|
22
|
-
private static readonly TOP_MENU_BUTTONS: string[] = ['File', 'Edit', 'Selection', 'View', 'Go', 'Run', 'Terminal', 'Help'];
|
|
23
|
-
|
|
24
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
25
|
-
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer,
|
|
26
|
-
@inject(CLASSES.AnimationChecker) private readonly animationChecker: AnimationChecker) { }
|
|
27
|
-
|
|
28
|
-
public async waitTopMenu(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
|
|
29
|
-
Logger.debug('TopMenu.waitTopMenu');
|
|
30
|
-
|
|
31
|
-
for (const buttonText of TopMenu.TOP_MENU_BUTTONS) {
|
|
32
|
-
const buttonLocator: By = this.getTopMenuButtonLocator(buttonText);
|
|
33
|
-
await this.driverHelper.waitVisibility(buttonLocator, timeout);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public async selectOption(topMenuButtonText: string, submenuItemtext: string) {
|
|
38
|
-
Logger.debug(`TopMenu.selectOption "${topMenuButtonText}"`);
|
|
39
|
-
|
|
40
|
-
await this.clickOnTopMenuButton(topMenuButtonText);
|
|
41
|
-
await this.clickOnSubmenuItem(submenuItemtext);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public async clickOnTopMenuButton(buttonText: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
45
|
-
Logger.debug(`TopMenu.clickOnTopMenuButton "${buttonText}"`);
|
|
46
|
-
|
|
47
|
-
const buttonLocator: By = this.getTopMenuButtonLocator(buttonText);
|
|
48
|
-
|
|
49
|
-
await this.driverHelper.waitAndClick(buttonLocator, timeout);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public async clickOnSubmenuItem(itemText: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
53
|
-
Logger.debug(`TopMenu.clickOnSubmenuItem "${itemText}"`);
|
|
54
|
-
|
|
55
|
-
const submenuItemLocator: By = this.getSubmenuItemLocator(itemText);
|
|
56
|
-
|
|
57
|
-
await this.animationChecker.waitDropDownAnimationEnd();
|
|
58
|
-
await this.driverHelper.waitAndClick(submenuItemLocator, timeout);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public async runTask(task: string) {
|
|
62
|
-
await this.selectOption('Terminal', 'Run Task...');
|
|
63
|
-
|
|
64
|
-
try {
|
|
65
|
-
await this.quickOpenContainer.waitContainer();
|
|
66
|
-
} catch (err) {
|
|
67
|
-
if (err instanceof error.TimeoutError) {
|
|
68
|
-
console.log(`After clicking to the "Terminal" -> "Run Task ..." the "Quick Open Container" has not been displayed, one more try`);
|
|
69
|
-
|
|
70
|
-
await this.selectOption('Terminal', 'Run Task...');
|
|
71
|
-
await this.quickOpenContainer.waitContainer();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
await this.quickOpenContainer.clickOnContainerItem(task);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public async openTerminalForSpecificContainer(containerName: string) {
|
|
79
|
-
await this.selectOption('Terminal', 'Open Terminal in specific container');
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
await this.quickOpenContainer.waitContainer();
|
|
83
|
-
} catch (err) {
|
|
84
|
-
if (err instanceof error.TimeoutError) {
|
|
85
|
-
Logger.info(`After clicking to the "Terminal" -> "Open Terminal in specific container" the "Quick Open Container" has not been displayed, one more try`);
|
|
86
|
-
|
|
87
|
-
await this.selectOption('Terminal', 'Open Terminal in specific container');
|
|
88
|
-
await this.quickOpenContainer.waitContainer();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
await this.quickOpenContainer.clickOnContainerItem(containerName);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
private getTopMenuButtonLocator(buttonText: string): By {
|
|
96
|
-
return By.xpath(`//div[@id='theia:menubar']//div[@class='p-MenuBar-itemLabel' and text()='${buttonText}']`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
private getSubmenuItemLocator(submenuItemtext: string): By {
|
|
100
|
-
return By.xpath(`//ul[@class='p-Menu-content']//li[@data-type='command']//div[text()='${submenuItemtext}']`);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
@@ -1,130 +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 { TestConstants } from '../../../../TestConstants';
|
|
20
|
-
import { TopMenu } from '../TopMenu';
|
|
21
|
-
import { QuickOpenContainer } from '../QuickOpenContainer';
|
|
22
|
-
|
|
23
|
-
@injectable()
|
|
24
|
-
export class GitHubPullRequestPlugin {
|
|
25
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
26
|
-
@inject(CLASSES.LeftToolBar) private readonly leftToolbar: LeftToolBar,
|
|
27
|
-
@inject(CLASSES.TopMenu) private readonly topMenu: TopMenu,
|
|
28
|
-
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer
|
|
29
|
-
) { }
|
|
30
|
-
|
|
31
|
-
async openView(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
32
|
-
Logger.debug(`GithubPullRequestPlugin.openView`);
|
|
33
|
-
|
|
34
|
-
await this.leftToolbar.selectView('GitHub', timeout);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async waitViewIcon(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
38
|
-
Logger.debug(`GithubPullRequestPlugin.waitViewIcon`);
|
|
39
|
-
|
|
40
|
-
await this.leftToolbar.waitToolIcon('GitHub', timeout);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async clickTreeItem(itemTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
44
|
-
Logger.debug(`GithubPullRequestPlugin.clickTreeItem`);
|
|
45
|
-
|
|
46
|
-
await this.driverHelper.waitAndClick(this.getTreeItemLocator(itemTitle), timeout);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async waitTreeItem(itemTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
50
|
-
Logger.debug(`GithubPullRequestPlugin.waitTreeItem`);
|
|
51
|
-
|
|
52
|
-
await this.driverHelper.waitVisibility(this.getTreeItemLocator(itemTitle), timeout);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async waitTreeItemExpanded(itemTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
56
|
-
Logger.debug(`GithubPullRequestPlugin.waitTreeItemExpanded`);
|
|
57
|
-
|
|
58
|
-
await this.driverHelper.waitVisibility(this.getExpandedTreeItemIconLocator(itemTitle), timeout);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async waitTreeItemCollapsed(itemTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
62
|
-
Logger.debug(`GithubPullRequestPlugin.waitTreeItemCollapsed`);
|
|
63
|
-
|
|
64
|
-
await this.driverHelper.waitVisibility(this.getCollapsedTreeItemIconLocator(itemTitle), timeout);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async expandTreeItem(itemTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
68
|
-
Logger.debug(`GithubPullRequestPlugin.expandTreeItem`);
|
|
69
|
-
|
|
70
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
71
|
-
if (await this.isTreeItemCollapsed(itemTitle)) {
|
|
72
|
-
await this.clickTreeItem(itemTitle, timeout);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
try {
|
|
76
|
-
await this.waitTreeItemExpanded(itemTitle, timeout / 4);
|
|
77
|
-
return true;
|
|
78
|
-
} catch (err) {
|
|
79
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
80
|
-
throw err;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
Logger.info(`The '${itemTitle}' item has not been expanded, try again`);
|
|
84
|
-
await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
85
|
-
}
|
|
86
|
-
}, timeout);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
async clickSignInButton(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
|
|
90
|
-
Logger.debug(`GithubPullRequestPlugin.clickSignInButton`);
|
|
91
|
-
|
|
92
|
-
const signInButtonLocator: By = By.xpath(`//div[@id='pr:github']//button[text()='Sign in']`);
|
|
93
|
-
|
|
94
|
-
await this.driverHelper.waitAndClick(signInButtonLocator, timeout);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async createPrFromCommandMenu() {
|
|
98
|
-
Logger.debug(`GithubPullRequestPlugin.createPrFromCommandMenu`);
|
|
99
|
-
|
|
100
|
-
await this.topMenu.selectOption('View', 'Find Command...');
|
|
101
|
-
await this.quickOpenContainer.typeAndSelectSuggestion('pull', 'GitHub Pull Requests: Create Pull Request');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private async isTreeItemCollapsed(itemTitle: string): Promise<boolean> {
|
|
105
|
-
return await this.driverHelper.isVisible(this.getCollapsedTreeItemIconLocator(itemTitle));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
private getTreeItemXpath(itemTitle: string): string {
|
|
109
|
-
return `//div[@id='plugin-view-container:github-pull-requests']//div[@title='${itemTitle}']`;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private getTreeItemLocator(itemTitle: string): By {
|
|
113
|
-
return By.xpath(this.getTreeItemXpath(itemTitle));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
private getCollapsedTreeItemIconLocator(itemTitle: string): By {
|
|
117
|
-
const collapsedTreeItemIconXpath: string = `${this.getTreeItemXpath(itemTitle)}` +
|
|
118
|
-
`/parent::div//div[@data-node-id and contains(@class, 'theia-mod-collapsed')]`;
|
|
119
|
-
|
|
120
|
-
return By.xpath(collapsedTreeItemIconXpath);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
private getExpandedTreeItemIconLocator(itemTitle: string): By {
|
|
124
|
-
const expandedTreeItemIconXpath: string = `${this.getTreeItemXpath(itemTitle)}` +
|
|
125
|
-
`/parent::div//div[@data-node-id and not(contains(@class, 'theia-mod-collapsed'))]`;
|
|
126
|
-
|
|
127
|
-
return By.xpath(expandedTreeItemIconXpath);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
}
|
|
@@ -1,118 +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 { By } from 'selenium-webdriver';
|
|
15
|
-
import { Logger } from '../../../../utils/Logger';
|
|
16
|
-
import { TimeoutConstants } from '../../../../TimeoutConstants';
|
|
17
|
-
import { DialogWindow } from '../DialogWindow';
|
|
18
|
-
import { TopMenu } from '../TopMenu';
|
|
19
|
-
import { QuickOpenContainer } from '../QuickOpenContainer';
|
|
20
|
-
|
|
21
|
-
@injectable()
|
|
22
|
-
export class GitPlugin {
|
|
23
|
-
private static readonly COMMIT_MESSAGE_TEXTAREA_CSS: string = 'textarea#theia-scm-input-message';
|
|
24
|
-
|
|
25
|
-
constructor(
|
|
26
|
-
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
27
|
-
@inject(CLASSES.DialogWindow) private readonly dialogWindow: DialogWindow,
|
|
28
|
-
@inject(CLASSES.TopMenu) private readonly topMenu: TopMenu,
|
|
29
|
-
@inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer
|
|
30
|
-
) { }
|
|
31
|
-
|
|
32
|
-
async openGitPluginContainer(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
33
|
-
Logger.debug('GitPlugin.openGitPluginContainer');
|
|
34
|
-
|
|
35
|
-
const sourceControlGitBtnXpathLocator: string = '//li[@id=\'shell-tab-scm-view-container\' and contains(@style, \'height\')]';
|
|
36
|
-
await this.driverHelper.waitAndClick(By.xpath(sourceControlGitBtnXpathLocator), timeout);
|
|
37
|
-
await this.waitViewOfContainer(timeout);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async waitViewOfContainer(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
41
|
-
Logger.debug('GitPlugin.waitViewOfContainer');
|
|
42
|
-
|
|
43
|
-
const gitHubContainerIdLocator: By = By.id('scm-view-container--scm-view');
|
|
44
|
-
await this.driverHelper.waitVisibility(gitHubContainerIdLocator, timeout);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async waitCommitMessageTextArea(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
48
|
-
Logger.debug('GitPlugin.waitCommitMessageTextArea');
|
|
49
|
-
|
|
50
|
-
const textAreaCssLocator: By = By.css(GitPlugin.COMMIT_MESSAGE_TEXTAREA_CSS);
|
|
51
|
-
await this.driverHelper.waitVisibility(textAreaCssLocator, timeout);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async typeCommitMessage(commitMessage: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
55
|
-
Logger.debug('GitPlugin.typeCommitMessage');
|
|
56
|
-
|
|
57
|
-
await this.waitCommitMessageTextArea(timeout);
|
|
58
|
-
await this.driverHelper.type(By.css(GitPlugin.COMMIT_MESSAGE_TEXTAREA_CSS), commitMessage, timeout);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async selectCommandInMoreActionsMenu(commandName: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
62
|
-
Logger.debug('GitPlugin.selectCommandInMoreActionsMenu');
|
|
63
|
-
|
|
64
|
-
await this.clickOnMoreActions(timeout);
|
|
65
|
-
await this.driverHelper.waitAndClick(By.xpath(`//li[@data-command]/div[text()=\'${commandName}\']`), timeout);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
async clickOnMoreActions(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
69
|
-
Logger.debug('GitPlugin.clickOnMoreActions');
|
|
70
|
-
|
|
71
|
-
await this.driverHelper.waitAndClick(By.id('__more__'), timeout);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async waitChangedFileInChagesList(expectedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
75
|
-
Logger.debug('GitPlugin.waitChangedFileInChagesList');
|
|
76
|
-
|
|
77
|
-
await this.driverHelper.waitPresence(By.xpath(`//span[@class='name' and text()=\'${expectedItem}\']`), timeout);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
async waitStagedFileInStagedChanges(expectedStagedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
81
|
-
Logger.debug('GitPlugin.waitStagedFileInStagedChanges');
|
|
82
|
-
|
|
83
|
-
await this.driverHelper.waitPresence(By.xpath(`//div[text()='Staged Changes']/parent::div/parent::div/parent::div/following-sibling::div//span[text()=\'${expectedStagedItem}\']`), timeout);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
async commitFromCommandMenu() {
|
|
87
|
-
Logger.debug('GitPlugin.commitFromScmView');
|
|
88
|
-
await this.topMenu.selectOption('View', 'Find Command...');
|
|
89
|
-
await this.quickOpenContainer.typeAndSelectSuggestion('Commit', 'Git: Commit');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async pushChangesFromCommandMenu() {
|
|
93
|
-
Logger.debug('GitPlugin.commitFromScmView');
|
|
94
|
-
await this.topMenu.selectOption('View', 'Find Command...');
|
|
95
|
-
await this.quickOpenContainer.typeAndSelectSuggestion('Push', 'Git: Push');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
async stageAllChanges(expectedStagedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
99
|
-
Logger.debug('GitPlugin.stageAllChanges');
|
|
100
|
-
|
|
101
|
-
await this.driverHelper.waitVisibility(By.xpath('//div[@class=\'noWrapInfo theia-TreeNodeSegmentGrow\' and text()=\'Changes\']'), timeout);
|
|
102
|
-
await this.driverHelper.scrollTo(By.xpath('//div[@class=\'noWrapInfo theia-TreeNodeSegmentGrow\' and text()=\'Changes\']'));
|
|
103
|
-
await this.driverHelper.waitAndClick(By.xpath('//a[@title=\'Stage All Changes\']'), timeout);
|
|
104
|
-
await this.waitStagedFileInStagedChanges(expectedStagedItem);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async waitDataIsSynchronized(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
108
|
-
Logger.debug('GitPlugin.waitDataIsSynchronized');
|
|
109
|
-
await this.driverHelper.waitDisappearance(By.xpath(`//div[contains(@title,'Synchronize Changes')]//span[contains(.,' 0↓')]`), timeout);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
async clickOnSelectRepositoryButton(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
|
|
113
|
-
Logger.debug('GitPlugin.clickOnSelectRepositoryButton');
|
|
114
|
-
await this.driverHelper.waitAndClick(By.xpath(`//button[@class='theia-button main' and text()='Select Repository Location']`), timeout);
|
|
115
|
-
await this.dialogWindow.waitDialogDissappearance();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
}
|