@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,601 +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 { DriverHelper } from '../../../utils/DriverHelper';
|
|
14
|
-
import { CLASSES } from '../../../inversify.types';
|
|
15
|
-
import { TestConstants } from '../../../TestConstants';
|
|
16
|
-
import { By, Key, error } from 'selenium-webdriver';
|
|
17
|
-
import { Logger } from '../../../utils/Logger';
|
|
18
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
19
|
-
|
|
20
|
-
@injectable()
|
|
21
|
-
export class Editor {
|
|
22
|
-
private static readonly SUGGESTION_WIDGET_BODY_CSS: string = 'div.visible[widgetId=\'editor.widget.suggestWidget\']';
|
|
23
|
-
private static readonly SUGGESTION_LOADING_XPATH: string = '//div[@widgetid=\'editor.widget.suggestWidget\']//div[@class=\'message\' and contains(.,\'Loading...\')]';
|
|
24
|
-
private static readonly ADDITIONAL_SHIFTING_TO_Y: number = 19;
|
|
25
|
-
private static readonly ADDITIONAL_SHIFTING_TO_X: number = 1;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
29
|
-
|
|
30
|
-
public async deleteAllText(editorTab: string) {
|
|
31
|
-
Logger.debug('Editor.deleteAllText');
|
|
32
|
-
|
|
33
|
-
await this.selectTab(editorTab);
|
|
34
|
-
await this.type(editorTab, Key.chord(Key.CONTROL, 'a', Key.DELETE), 1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public async waitSuggestionContainer(timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
38
|
-
Logger.debug('Editor.waitSuggestionContainer');
|
|
39
|
-
|
|
40
|
-
await this.driverHelper.waitVisibility(By.css(Editor.SUGGESTION_WIDGET_BODY_CSS), timeout);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
public async waitSuggestionContainerClosed(timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
44
|
-
Logger.debug('Editor.waitSuggestionContainerClosed');
|
|
45
|
-
|
|
46
|
-
await this.driverHelper.waitDisappearanceWithTimeout(By.css(Editor.SUGGESTION_WIDGET_BODY_CSS), timeout);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public async waitSuggestion(editorTabTitle: string,
|
|
50
|
-
suggestionText: string,
|
|
51
|
-
timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT,
|
|
52
|
-
lineNumber?: number,
|
|
53
|
-
charNumber?: number) {
|
|
54
|
-
|
|
55
|
-
const charInLineNumber: number = (charNumber ? charNumber : 1);
|
|
56
|
-
|
|
57
|
-
// if line defined the method sets cursor to line and char
|
|
58
|
-
// before invoking suggestion container and repeat this
|
|
59
|
-
// cycle if suggestion didn't display
|
|
60
|
-
if (lineNumber) {
|
|
61
|
-
await this.waitSuggestionWithResettingCursor(editorTabTitle, suggestionText, timeout, lineNumber, charInLineNumber);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// if line not defined the method just invoke suggestion container
|
|
66
|
-
// without setting cursor to line and char and repeat this
|
|
67
|
-
// cycle if suggestion didn't display
|
|
68
|
-
await this.waitSuggestionWithoutResettingCursor(editorTabTitle, suggestionText, timeout);
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public async closeSuggestionContainer(editorTabTitle: string, timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
73
|
-
Logger.debug(`Editor.closeSuggestionContainer tabTitle: "${editorTabTitle}"`);
|
|
74
|
-
|
|
75
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
76
|
-
// if container already closed stop the method execution
|
|
77
|
-
try {
|
|
78
|
-
// for avoiding problem when the inner timeout
|
|
79
|
-
// bigger than timeout of the method
|
|
80
|
-
const suggestionContainerTimeout: number = timeout / 2;
|
|
81
|
-
|
|
82
|
-
await this.waitSuggestionContainer(suggestionContainerTimeout);
|
|
83
|
-
} catch (err) {
|
|
84
|
-
if (err instanceof error.TimeoutError) {
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
throw err;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// try to close container
|
|
92
|
-
try {
|
|
93
|
-
await this.pressEscapeButton(editorTabTitle);
|
|
94
|
-
await this.waitSuggestionContainerClosed(2000);
|
|
95
|
-
return true;
|
|
96
|
-
} catch (err) {
|
|
97
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
98
|
-
throw err;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}, timeout);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
public async waitSuggestionWithScrolling(editorTabTitle: string,
|
|
106
|
-
suggestionText: string,
|
|
107
|
-
timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
108
|
-
|
|
109
|
-
Logger.debug(`Editor.waitSuggestion tabTitle: "${editorTabTitle}" suggestion: "${suggestionText}"`);
|
|
110
|
-
|
|
111
|
-
const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
|
|
112
|
-
|
|
113
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
114
|
-
try {
|
|
115
|
-
await this.scrollAndSearchSuggestion(editorTabTitle, suggestionLocator, timeout / 3);
|
|
116
|
-
return true;
|
|
117
|
-
} catch (err) {
|
|
118
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
119
|
-
throw err;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
await this.closeSuggestionContainer(editorTabTitle, TimeoutConstants.TS_CLOSE_SUGGESTION_CONTAINER_TIMEOUT);
|
|
123
|
-
await this.pressControlSpaceCombination(editorTabTitle);
|
|
124
|
-
}
|
|
125
|
-
}, timeout);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
public async pressControlSpaceCombination(editorTabTitle: string) {
|
|
129
|
-
Logger.debug(`Editor.pressControlSpaceCombination "${editorTabTitle}"`);
|
|
130
|
-
|
|
131
|
-
await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.SPACE));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
public async pressEscapeButton(editorTabTitle: string) {
|
|
135
|
-
Logger.debug(`Editor.pressEscapeButton "${editorTabTitle}"`);
|
|
136
|
-
|
|
137
|
-
await this.performKeyCombination(editorTabTitle, Key.ESCAPE);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
public async clickOnSuggestion(suggestionText: string, timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
141
|
-
Logger.debug(`Editor.clickOnSuggestion "${suggestionText}"`);
|
|
142
|
-
|
|
143
|
-
await this.driverHelper.waitAndClick(this.getSuggestionLineXpathLocator(suggestionText), timeout);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
public async waitTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
147
|
-
Logger.debug(`Editor.waitTab "${tabTitle}"`);
|
|
148
|
-
|
|
149
|
-
await this.driverHelper.waitVisibility(By.xpath(this.getTabXpathLocator(tabTitle)), timeout);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public async waitTabDisappearance(tabTitle: string,
|
|
153
|
-
attempt: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
154
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
155
|
-
|
|
156
|
-
Logger.debug(`Editor.waitTabDisappearance "${tabTitle}"`);
|
|
157
|
-
|
|
158
|
-
await this.driverHelper.waitDisappearance(By.xpath(this.getTabXpathLocator(tabTitle)), attempt, polling);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
public async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
162
|
-
Logger.debug(`Editor.clickOnTab "${tabTitle}"`);
|
|
163
|
-
|
|
164
|
-
await this.driverHelper.waitAndClick(By.xpath(this.getTabXpathLocator(tabTitle)), timeout);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
public async waitTabFocused(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
168
|
-
Logger.debug(`Editor.waitTabFocused "${tabTitle}"`);
|
|
169
|
-
|
|
170
|
-
const focusedTabLocator: By = By.xpath(`//li[contains(@class, 'p-TabBar-tab') and contains(@class, 'theia-mod-active')]//div[text()='${tabTitle}']`);
|
|
171
|
-
|
|
172
|
-
await this.driverHelper.waitVisibility(focusedTabLocator, timeout);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
public async selectTab(tabTitle: string) {
|
|
176
|
-
Logger.debug(`Editor.selectTab "${tabTitle}"`);
|
|
177
|
-
|
|
178
|
-
await this.waitTab(tabTitle);
|
|
179
|
-
await this.clickOnTab(tabTitle);
|
|
180
|
-
await this.waitTabFocused(tabTitle);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
async closeTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
184
|
-
Logger.debug(`Editor.closeTab "${tabTitle}"`);
|
|
185
|
-
|
|
186
|
-
const tabCloseButtonLocator: By = By.xpath(`//li[contains(@id,'${tabTitle}')]//div[contains(@class, 'p-TabBar-tabCloseIcon')]`);
|
|
187
|
-
|
|
188
|
-
await this.driverHelper.waitAndClick(tabCloseButtonLocator, timeout);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
async waitTabWithUnsavedStatus(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
192
|
-
Logger.debug(`Editor.waitTabWithUnsavedStatus "${tabTitle}"`);
|
|
193
|
-
|
|
194
|
-
const unsavedTabLocator: By = this.getTabWithUnsavedStatus(tabTitle);
|
|
195
|
-
|
|
196
|
-
await this.driverHelper.waitVisibility(unsavedTabLocator, timeout);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
async waitTabWithSavedStatus(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
200
|
-
Logger.debug(`Editor.waitTabWithSavedStatus "${tabTitle}"`);
|
|
201
|
-
|
|
202
|
-
const unsavedTabLocator: By = this.getTabWithUnsavedStatus(tabTitle);
|
|
203
|
-
|
|
204
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
205
|
-
try {
|
|
206
|
-
await this.driverHelper.waitDisappearanceWithTimeout(unsavedTabLocator, TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
207
|
-
await this.waitTab(tabTitle, timeout);
|
|
208
|
-
return true;
|
|
209
|
-
} catch (err) {
|
|
210
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
211
|
-
throw err;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
console.log(`The editor tab with title "${tabTitle}" has unsaved status, wait once again`);
|
|
215
|
-
}
|
|
216
|
-
}, timeout);
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
async waitEditorOpened(editorTabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
221
|
-
Logger.debug(`Editor.waitEditorOpened "${editorTabTitle}"`);
|
|
222
|
-
|
|
223
|
-
const firstEditorLineLocator: By = By.xpath(this.getEditorLineXpathLocator(1));
|
|
224
|
-
|
|
225
|
-
await this.driverHelper.waitPresence(this.getEditorBodyLocator(editorTabTitle), timeout);
|
|
226
|
-
await this.driverHelper.waitPresence(firstEditorLineLocator, timeout);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
async waitEditorAvailable(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
|
|
230
|
-
Logger.debug(`Editor.waitEditorAvailable "${tabTitle}"`);
|
|
231
|
-
|
|
232
|
-
await this.waitTab(tabTitle, timeout);
|
|
233
|
-
await this.waitEditorOpened(tabTitle, timeout);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async getLineText(tabTitle: string, lineNumber: number): Promise<string> {
|
|
237
|
-
Logger.debug(`Editor.getLineText "${tabTitle}"`);
|
|
238
|
-
|
|
239
|
-
const lineIndex: number = lineNumber - 1;
|
|
240
|
-
const editorText: string = await this.getEditorVisibleText(tabTitle);
|
|
241
|
-
const editorLines: string[] = editorText.split('\n');
|
|
242
|
-
const editorLine = editorLines[lineIndex] + '\n';
|
|
243
|
-
|
|
244
|
-
return editorLine;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
async getEditorVisibleText(tabTitle: string): Promise<string> {
|
|
248
|
-
Logger.debug(`Editor.getEditorVisibleText "${tabTitle}"`);
|
|
249
|
-
|
|
250
|
-
const editorBodyLocator: By = By.xpath(`//div[contains(@data-uri, \'${tabTitle}')]//div[contains(@class,\'view-lines\')]`);
|
|
251
|
-
// const editorBodyLocator: By = By.xpath('//div[@class=\'view-lines\']');
|
|
252
|
-
const editorText: string = await this.driverHelper.waitAndGetText(editorBodyLocator);
|
|
253
|
-
return editorText;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
async waitText(tabTitle: string, expectedText: string,
|
|
257
|
-
timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT,
|
|
258
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
259
|
-
|
|
260
|
-
Logger.debug(`Editor.waitText "${tabTitle}"`);
|
|
261
|
-
|
|
262
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
263
|
-
const editorText: string = await this.getEditorVisibleText(tabTitle);
|
|
264
|
-
const isEditorContainText: boolean = editorText.includes(expectedText);
|
|
265
|
-
|
|
266
|
-
if (isEditorContainText) {
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
await this.driverHelper.wait(polling);
|
|
271
|
-
}, timeout);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
async followAndWaitForText(editorTabTitle: string,
|
|
275
|
-
expectedText: string,
|
|
276
|
-
timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT,
|
|
277
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
278
|
-
|
|
279
|
-
Logger.debug(`Editor.followAndWaitForText title: "${editorTabTitle}" text: "${expectedText}"`);
|
|
280
|
-
|
|
281
|
-
await this.selectTab(editorTabTitle);
|
|
282
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
283
|
-
await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.END));
|
|
284
|
-
const editorText: string = await this.getEditorVisibleText(editorTabTitle);
|
|
285
|
-
|
|
286
|
-
const isEditorContainText: boolean = editorText.includes(expectedText);
|
|
287
|
-
|
|
288
|
-
if (isEditorContainText) {
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
await this.driverHelper.wait(polling);
|
|
293
|
-
}, timeout);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
async moveCursorToLineAndChar(editorTabTitle: string, line: number, char: number) {
|
|
297
|
-
Logger.debug(`Editor.moveCursorToLineAndChar title: "${editorTabTitle}" line: "${line}" char: "${char}"`);
|
|
298
|
-
|
|
299
|
-
// set cursor to the 1:1 position
|
|
300
|
-
await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.HOME));
|
|
301
|
-
|
|
302
|
-
// move cursor to line
|
|
303
|
-
for (let i = 1; i < line; i++) {
|
|
304
|
-
await this.performKeyCombination(editorTabTitle, Key.ARROW_DOWN);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// move cursor to char
|
|
308
|
-
for (let i = 1; i < char; i++) {
|
|
309
|
-
await this.performKeyCombination(editorTabTitle, Key.ARROW_RIGHT);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
async performKeyCombination(editorTabTitle: string, text: string) {
|
|
314
|
-
Logger.debug(`Editor.performKeyCombination title: "${editorTabTitle}" text: "${text}"`);
|
|
315
|
-
|
|
316
|
-
const interactionContainerLocator: By = this.getEditorActionArreaLocator(editorTabTitle);
|
|
317
|
-
await this.driverHelper.type(interactionContainerLocator, text);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
async type(editorTabTitle: string, text: string, line: number) {
|
|
321
|
-
Logger.debug(`Editor.type title: "${editorTabTitle}" text: "${text}"`);
|
|
322
|
-
|
|
323
|
-
await this.selectTab(editorTabTitle);
|
|
324
|
-
await this.moveCursorToLineAndChar(editorTabTitle, line, 1);
|
|
325
|
-
await this.performKeyCombination(editorTabTitle, text);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
async waitErrorInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
329
|
-
Logger.debug(`Editor.waitErrorInLine line: "${lineNumber}"`);
|
|
330
|
-
|
|
331
|
-
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber, fileName);
|
|
332
|
-
await this.driverHelper.waitVisibility(errorInLineLocator, timeout);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
async waitErrorInLineDisappearance(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
336
|
-
Logger.debug(`Editor.waitErrorInLineDisappearance line: "${lineNumber}"`);
|
|
337
|
-
|
|
338
|
-
const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber, fileName);
|
|
339
|
-
await this.driverHelper.waitDisappearanceWithTimeout(errorInLineLocator, timeout);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
async waitWarningInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
343
|
-
Logger.debug(`Editor.waitWarningInLine line: "${lineNumber}"`);
|
|
344
|
-
|
|
345
|
-
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber, fileName);
|
|
346
|
-
await this.driverHelper.waitVisibility(warningInLineLocator, timeout);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
async waitInfoInLine(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
350
|
-
Logger.debug(`Editor.waitInfoInLine line: "${lineNumber}"`);
|
|
351
|
-
|
|
352
|
-
const infoInLineLocator: By = await this.getInfoInLineLocator(lineNumber, fileName);
|
|
353
|
-
await this.driverHelper.waitVisibility(infoInLineLocator, timeout);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
async waitWarningInLineDisappearance(lineNumber: number, fileName: string, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
|
|
357
|
-
Logger.debug(`Editor.waitWarningInLineDisappearance line: "${lineNumber}"`);
|
|
358
|
-
|
|
359
|
-
const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber, fileName);
|
|
360
|
-
await this.driverHelper.waitDisappearanceWithTimeout(warningInLineLocator, timeout);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
async waitStoppedDebugBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
|
|
364
|
-
Logger.debug(`Editor.waitStoppedDebugBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
|
|
365
|
-
|
|
366
|
-
await this.driverHelper.waitUntilTrue(() => this.isBreakpointPresent(tabTitle, lineNumber, true), timeout);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
async waitBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
|
|
370
|
-
Logger.debug(`Editor.waitBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
|
|
371
|
-
|
|
372
|
-
await this.driverHelper.waitUntilTrue(() => this.isBreakpointPresent(tabTitle, lineNumber), timeout);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
async waitBreakpointAbsence(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
|
|
376
|
-
Logger.debug(`Editor.waitBreakpointAbsence title: "${tabTitle}" line: "${lineNumber}"`);
|
|
377
|
-
await this.driverHelper.waitUntilTrue(() => !this.isBreakpointPresent(tabTitle, lineNumber), timeout);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
async activateBreakpoint(tabTitle: string, lineNumber: number) {
|
|
381
|
-
Logger.debug(`Editor.activateBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
|
|
382
|
-
|
|
383
|
-
const attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS;
|
|
384
|
-
const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
385
|
-
const breakpointStatus: boolean = await this.isBreakpointPresent(tabTitle, lineNumber);
|
|
386
|
-
|
|
387
|
-
if (breakpointStatus) { return; }
|
|
388
|
-
|
|
389
|
-
for (let i = 0; i < attempts; i++) {
|
|
390
|
-
try {
|
|
391
|
-
await this.selectTab(tabTitle);
|
|
392
|
-
await this.moveCursorToLineAndChar(tabTitle, lineNumber, 1);
|
|
393
|
-
await this.performKeyCombination(tabTitle, Key.F9);
|
|
394
|
-
await this.waitBreakpoint(tabTitle, lineNumber);
|
|
395
|
-
return;
|
|
396
|
-
} catch (err) {
|
|
397
|
-
if (i === attempts - 1) {
|
|
398
|
-
throw new error.TimeoutError(`Exceeded maximum breakpoint activation attempts`);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
// ignore errors and wait
|
|
402
|
-
Logger.debug(`Editor.activateBreakpoint - Error: ${err}`);
|
|
403
|
-
await this.driverHelper.wait(polling);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
async getLineYCoordinates(lineNumber: number, fileName: string): Promise<number> {
|
|
409
|
-
Logger.debug(`Editor.getLineYCoordinates line: "${lineNumber}"`);
|
|
410
|
-
|
|
411
|
-
const lineNumberLocator: By = By.xpath(`//div[contains(@data-uri, '${fileName}')]` +
|
|
412
|
-
`//div[contains(@class, 'line-numbers') and text()='${lineNumber}']` +
|
|
413
|
-
`//parent::div[contains(@style, 'position')]`);
|
|
414
|
-
let elementStyleValue: string = await this.driverHelper.waitAndGetElementAttribute(lineNumberLocator, 'style', TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
|
|
415
|
-
|
|
416
|
-
Logger.trace(`Editor.getLineYCoordinates style string:${elementStyleValue}`);
|
|
417
|
-
const lineYCoordinate: number = Number.parseInt(elementStyleValue.split('top:')[1].split('px')[0], 10);
|
|
418
|
-
|
|
419
|
-
if (Number.isNaN(lineYCoordinate)) {
|
|
420
|
-
throw new error.UnsupportedOperationError(`Failed to parse the ${elementStyleValue} row to number format`);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
return lineYCoordinate;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
async clickOnLineAndChar(line: number, char: number, fileName: string) {
|
|
427
|
-
Logger.debug(`Editor.clickOnLineAndChar line: "${line}" char: "${char}"`);
|
|
428
|
-
|
|
429
|
-
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
430
|
-
const xPosition: number = char + Editor.ADDITIONAL_SHIFTING_TO_X;
|
|
431
|
-
|
|
432
|
-
this.driverHelper.getAction().move({ x: xPosition, y: yPosition }).click().perform();
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
async goToDefinitionWithMouseClicking(line: number, char: number, fileName: string) {
|
|
436
|
-
Logger.debug(`Editor.goToDefinitionWithMouseClicking line: "${line}" char: "${char}"`);
|
|
437
|
-
|
|
438
|
-
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
439
|
-
const xPosition: number = char + Editor.ADDITIONAL_SHIFTING_TO_X;
|
|
440
|
-
|
|
441
|
-
this.driverHelper.getAction()
|
|
442
|
-
.keyDown(Key.CONTROL)
|
|
443
|
-
.move({ x: xPosition, y: yPosition})
|
|
444
|
-
.click()
|
|
445
|
-
.keyDown(Key.CONTROL)
|
|
446
|
-
.perform();
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
async mouseRightButtonClick(line: number, char: number, fileName: string) {
|
|
450
|
-
Logger.debug(`Editor.mouseRightButtonClick line: "${line}" char: "${char}"`);
|
|
451
|
-
|
|
452
|
-
const yPosition: number = await this.getLineYCoordinates(line, fileName) + Editor.ADDITIONAL_SHIFTING_TO_Y;
|
|
453
|
-
const xPosition: number = char + Editor.ADDITIONAL_SHIFTING_TO_X;
|
|
454
|
-
|
|
455
|
-
this.driverHelper.getAction()
|
|
456
|
-
.move({ x: xPosition, y: yPosition})
|
|
457
|
-
.contextClick()
|
|
458
|
-
.perform();
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
private async scrollAndSearchSuggestion(editorTabTitle: string, suggestionLocator: By, timeout: number = 10000) {
|
|
462
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
463
|
-
const loadingLocator: By = By.xpath(Editor.SUGGESTION_LOADING_XPATH);
|
|
464
|
-
await this.waitSuggestionContainer();
|
|
465
|
-
await this.driverHelper.waitDisappearance(loadingLocator);
|
|
466
|
-
await this.driverHelper.wait(1000);
|
|
467
|
-
|
|
468
|
-
if (await this.driverHelper.isVisible(suggestionLocator)) {
|
|
469
|
-
return true;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
await this.performKeyCombination(editorTabTitle, Key.ARROW_DOWN);
|
|
473
|
-
}, timeout);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
private getTabWithUnsavedStatus(tabTitle: string): By {
|
|
477
|
-
return By.xpath(`//div[text()='${tabTitle}']/parent::li[contains(@class, 'theia-mod-dirty')]`);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
private getEditorBodyLocator(editorTabTitle: string): By {
|
|
481
|
-
const editorXpathLocator: string = `//div[@id='theia-main-content-panel']//div[contains(@class, 'monaco-editor')` +
|
|
482
|
-
` and contains(@data-uri, '${editorTabTitle}')]//*[contains(@class, 'lines-content')]`;
|
|
483
|
-
|
|
484
|
-
return By.xpath(editorXpathLocator);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
private getEditorActionArreaLocator(editorTabTitle: string): By {
|
|
488
|
-
const editorActionArreaXpathLocator: string = `//div[@id='theia-main-content-panel']//div[contains(@class, 'monaco-editor')` +
|
|
489
|
-
` and contains(@data-uri, '${editorTabTitle}')]//textarea`;
|
|
490
|
-
|
|
491
|
-
return By.xpath(editorActionArreaXpathLocator);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
private getEditorLineXpathLocator(lineNumber: number): string {
|
|
495
|
-
return `(//div[contains(@class,'lines-content')]//div[@class='view-lines monaco-mouse-cursor-text']/div[@class='view-line'])[${lineNumber}]`;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
private getSuggestionLineXpathLocator(suggestionText: string): By {
|
|
499
|
-
return By.xpath(`//div[@widgetid='editor.widget.suggestWidget']//span[@class='monaco-highlighted-label' and contains(.,'${suggestionText}')]`);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
private getTabXpathLocator(tabTitle: string): string {
|
|
503
|
-
return `//li[contains(@class, 'p-TabBar-tab')]//div[text()='${tabTitle}']`;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
private async getErrorInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
507
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
508
|
-
|
|
509
|
-
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-error')]`);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
private async getWarningInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
513
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
514
|
-
|
|
515
|
-
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-warning')]`);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
private async getInfoInLineLocator(lineNumber: number, fileName: string): Promise<By> {
|
|
519
|
-
const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber, fileName);
|
|
520
|
-
|
|
521
|
-
return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-info')]`);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
private async waitSuggestionWithResettingCursor(editorTabTitle: string,
|
|
525
|
-
suggestionText: string,
|
|
526
|
-
timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT,
|
|
527
|
-
lineNumber: number,
|
|
528
|
-
charNumber: number) {
|
|
529
|
-
|
|
530
|
-
const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
|
|
531
|
-
|
|
532
|
-
const methodLogText: string = `Editor.waitSuggestion tabTitle: "${editorTabTitle}" ` +
|
|
533
|
-
`suggestion: "${suggestionText}" ` +
|
|
534
|
-
`line: "${lineNumber}" ` +
|
|
535
|
-
`char: "${charNumber}"`;
|
|
536
|
-
|
|
537
|
-
Logger.debug(methodLogText);
|
|
538
|
-
|
|
539
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
540
|
-
await this.selectTab(editorTabTitle);
|
|
541
|
-
await this.moveCursorToLineAndChar(editorTabTitle, lineNumber, charNumber);
|
|
542
|
-
await this.pressControlSpaceCombination(editorTabTitle);
|
|
543
|
-
|
|
544
|
-
try {
|
|
545
|
-
await this.driverHelper.waitVisibility(suggestionLocator, 5000);
|
|
546
|
-
await this.closeSuggestionContainer(editorTabTitle);
|
|
547
|
-
return true;
|
|
548
|
-
} catch (err) {
|
|
549
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
550
|
-
throw err;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}, timeout);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
private async waitSuggestionWithoutResettingCursor(editorTabTitle: string,
|
|
557
|
-
suggestionText: string,
|
|
558
|
-
timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
|
|
559
|
-
|
|
560
|
-
Logger.debug(`Editor.waitSuggestion tabTitle: "${editorTabTitle}" suggestion: "${suggestionText}"`);
|
|
561
|
-
|
|
562
|
-
const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
|
|
563
|
-
|
|
564
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
565
|
-
try {
|
|
566
|
-
await this.driverHelper.waitVisibility(suggestionLocator, 5000);
|
|
567
|
-
await this.closeSuggestionContainer(editorTabTitle);
|
|
568
|
-
return true;
|
|
569
|
-
} catch (err) {
|
|
570
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
571
|
-
throw err;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
await this.closeSuggestionContainer(editorTabTitle, timeout);
|
|
575
|
-
await this.pressControlSpaceCombination(editorTabTitle);
|
|
576
|
-
}
|
|
577
|
-
}, timeout);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Checks for breakpoint presence in currently opened editor on given line.
|
|
582
|
-
*
|
|
583
|
-
* @param lineNumber Line number to check the breakpoint presence on.
|
|
584
|
-
* @param triggered Whether this breakpoint is triggered or not. Default false.
|
|
585
|
-
*/
|
|
586
|
-
|
|
587
|
-
private async isBreakpointPresent(tabTitle: string, lineNumber: number, triggered: boolean = false): Promise<boolean> {
|
|
588
|
-
Logger.debug('Editor.isBreakpointPresent');
|
|
589
|
-
|
|
590
|
-
const linesBarXpathLocator: string = `//div[contains(@id, '${tabTitle}')]//div[@class='margin']`;
|
|
591
|
-
const triggeredBreakpointXpathLocator: string = `//div[contains(@class, 'theia-debug-breakpoint') and contains(@class, 'theia-debug-top-stack-frame')]`;
|
|
592
|
-
const regularBreakpointXpathLocator: string = `//div[contains(@class, 'theia-debug-breakpoint')]`;
|
|
593
|
-
const lineNumberRelativeXpathLocator: string = `/parent::div/div[contains(@class, 'line-numbers') and text()=${lineNumber}]`;
|
|
594
|
-
|
|
595
|
-
const breakpointLocator: string = (triggered ? triggeredBreakpointXpathLocator : regularBreakpointXpathLocator);
|
|
596
|
-
const breakpointLineNumberXpathLocator = linesBarXpathLocator + breakpointLocator + lineNumberRelativeXpathLocator;
|
|
597
|
-
|
|
598
|
-
return await this.driverHelper.isVisible(By.xpath(breakpointLineNumberXpathLocator));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
}
|