@eclipse-che/che-e2e 7.39.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/README.md +86 -0
- package/TestConstants.ts +263 -0
- package/TimeoutConstants.ts +220 -0
- package/dist/TestConstants.d.ts +206 -0
- package/dist/TestConstants.d.ts.map +1 -0
- package/dist/TestConstants.js +216 -0
- package/dist/TestConstants.js.map +1 -0
- package/dist/TimeoutConstants.d.ts +164 -0
- package/dist/TimeoutConstants.d.ts.map +1 -0
- package/dist/TimeoutConstants.js +175 -0
- package/dist/TimeoutConstants.js.map +1 -0
- package/dist/driver/CheReporter.d.ts +18 -0
- package/dist/driver/CheReporter.d.ts.map +1 -0
- package/dist/driver/CheReporter.js +180 -0
- package/dist/driver/CheReporter.js.map +1 -0
- package/dist/driver/ChromeDriver.d.ts +21 -0
- package/dist/driver/ChromeDriver.d.ts.map +1 -0
- package/dist/driver/ChromeDriver.js +75 -0
- package/dist/driver/ChromeDriver.js.map +1 -0
- package/dist/driver/IDriver.d.ts +14 -0
- package/dist/driver/IDriver.d.ts.map +1 -0
- package/dist/driver/IDriver.js +3 -0
- package/dist/driver/IDriver.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +92 -0
- package/dist/index.js.map +1 -0
- package/dist/inversify.config.d.ts +13 -0
- package/dist/inversify.config.d.ts.map +1 -0
- package/dist/inversify.config.js +126 -0
- package/dist/inversify.config.js.map +1 -0
- package/dist/inversify.types.d.ts +68 -0
- package/dist/inversify.types.d.ts.map +1 -0
- package/dist/inversify.types.js +72 -0
- package/dist/inversify.types.js.map +1 -0
- package/dist/pageobjects/dashboard/CreateWorkspace.d.ts +20 -0
- package/dist/pageobjects/dashboard/CreateWorkspace.d.ts.map +1 -0
- package/dist/pageobjects/dashboard/CreateWorkspace.js +65 -0
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -0
- package/dist/pageobjects/dashboard/Dashboard.d.ts +24 -0
- package/dist/pageobjects/dashboard/Dashboard.d.ts.map +1 -0
- package/dist/pageobjects/dashboard/Dashboard.js +111 -0
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -0
- package/dist/pageobjects/dashboard/Workspaces.d.ts +44 -0
- package/dist/pageobjects/dashboard/Workspaces.d.ts.map +1 -0
- package/dist/pageobjects/dashboard/Workspaces.js +157 -0
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.d.ts +42 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.d.ts.map +1 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +138 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.d.ts +29 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.d.ts.map +1 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js +97 -0
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js.map +1 -0
- package/dist/pageobjects/ide/ContextMenu.d.ts +22 -0
- package/dist/pageobjects/ide/ContextMenu.d.ts.map +1 -0
- package/dist/pageobjects/ide/ContextMenu.js +66 -0
- package/dist/pageobjects/ide/ContextMenu.js.map +1 -0
- package/dist/pageobjects/ide/DebugView.d.ts +32 -0
- package/dist/pageobjects/ide/DebugView.d.ts.map +1 -0
- package/dist/pageobjects/ide/DebugView.js +98 -0
- package/dist/pageobjects/ide/DebugView.js.map +1 -0
- package/dist/pageobjects/ide/DialogWindow.d.ts +28 -0
- package/dist/pageobjects/ide/DialogWindow.d.ts.map +1 -0
- package/dist/pageobjects/ide/DialogWindow.js +102 -0
- package/dist/pageobjects/ide/DialogWindow.js.map +1 -0
- package/dist/pageobjects/ide/Editor.d.ts +78 -0
- package/dist/pageobjects/ide/Editor.d.ts.map +1 -0
- package/dist/pageobjects/ide/Editor.js +463 -0
- package/dist/pageobjects/ide/Editor.js.map +1 -0
- package/dist/pageobjects/ide/Ide.d.ts +61 -0
- package/dist/pageobjects/ide/Ide.d.ts.map +1 -0
- package/dist/pageobjects/ide/Ide.js +312 -0
- package/dist/pageobjects/ide/Ide.js.map +1 -0
- package/dist/pageobjects/ide/LeftToolBar.d.ts +23 -0
- package/dist/pageobjects/ide/LeftToolBar.d.ts.map +1 -0
- package/dist/pageobjects/ide/LeftToolBar.js +81 -0
- package/dist/pageobjects/ide/LeftToolBar.js.map +1 -0
- package/dist/pageobjects/ide/NavigationBar.d.ts +9 -0
- package/dist/pageobjects/ide/NavigationBar.d.ts.map +1 -0
- package/dist/pageobjects/ide/NavigationBar.js +57 -0
- package/dist/pageobjects/ide/NavigationBar.js.map +1 -0
- package/dist/pageobjects/ide/NotificationCenter.d.ts +22 -0
- package/dist/pageobjects/ide/NotificationCenter.d.ts.map +1 -0
- package/dist/pageobjects/ide/NotificationCenter.js +76 -0
- package/dist/pageobjects/ide/NotificationCenter.js.map +1 -0
- package/dist/pageobjects/ide/OpenDialogWidget.d.ts +36 -0
- package/dist/pageobjects/ide/OpenDialogWidget.d.ts.map +1 -0
- package/dist/pageobjects/ide/OpenDialogWidget.js +100 -0
- package/dist/pageobjects/ide/OpenDialogWidget.js.map +1 -0
- package/dist/pageobjects/ide/OpenWorkspaceWidget.d.ts +17 -0
- package/dist/pageobjects/ide/OpenWorkspaceWidget.d.ts.map +1 -0
- package/dist/pageobjects/ide/OpenWorkspaceWidget.js +62 -0
- package/dist/pageobjects/ide/OpenWorkspaceWidget.js.map +1 -0
- package/dist/pageobjects/ide/PreviewWidget.d.ts +35 -0
- package/dist/pageobjects/ide/PreviewWidget.d.ts.map +1 -0
- package/dist/pageobjects/ide/PreviewWidget.js +127 -0
- package/dist/pageobjects/ide/PreviewWidget.js.map +1 -0
- package/dist/pageobjects/ide/ProjectTree.d.ts +53 -0
- package/dist/pageobjects/ide/ProjectTree.d.ts.map +1 -0
- package/dist/pageobjects/ide/ProjectTree.js +275 -0
- package/dist/pageobjects/ide/ProjectTree.js.map +1 -0
- package/dist/pageobjects/ide/QuickOpenContainer.d.ts +20 -0
- package/dist/pageobjects/ide/QuickOpenContainer.d.ts.map +1 -0
- package/dist/pageobjects/ide/QuickOpenContainer.js +70 -0
- package/dist/pageobjects/ide/QuickOpenContainer.js.map +1 -0
- package/dist/pageobjects/ide/RightToolBar.d.ts +8 -0
- package/dist/pageobjects/ide/RightToolBar.d.ts.map +1 -0
- package/dist/pageobjects/ide/RightToolBar.js +51 -0
- package/dist/pageobjects/ide/RightToolBar.js.map +1 -0
- package/dist/pageobjects/ide/Terminal.d.ts +36 -0
- package/dist/pageobjects/ide/Terminal.d.ts.map +1 -0
- package/dist/pageobjects/ide/Terminal.js +204 -0
- package/dist/pageobjects/ide/Terminal.js.map +1 -0
- package/dist/pageobjects/ide/TopMenu.d.ts +28 -0
- package/dist/pageobjects/ide/TopMenu.d.ts.map +1 -0
- package/dist/pageobjects/ide/TopMenu.js +109 -0
- package/dist/pageobjects/ide/TopMenu.js.map +1 -0
- package/dist/pageobjects/ide/plugins/GitHubPullRequestPlugin.d.ts +36 -0
- package/dist/pageobjects/ide/plugins/GitHubPullRequestPlugin.d.ts.map +1 -0
- package/dist/pageobjects/ide/plugins/GitHubPullRequestPlugin.js +128 -0
- package/dist/pageobjects/ide/plugins/GitHubPullRequestPlugin.js.map +1 -0
- package/dist/pageobjects/ide/plugins/GitPlugin.d.ts +35 -0
- package/dist/pageobjects/ide/plugins/GitPlugin.d.ts.map +1 -0
- package/dist/pageobjects/ide/plugins/GitPlugin.js +120 -0
- package/dist/pageobjects/ide/plugins/GitPlugin.js.map +1 -0
- package/dist/pageobjects/ide/plugins/KubernetesPlugin.d.ts +32 -0
- package/dist/pageobjects/ide/plugins/KubernetesPlugin.d.ts.map +1 -0
- package/dist/pageobjects/ide/plugins/KubernetesPlugin.js +107 -0
- package/dist/pageobjects/ide/plugins/KubernetesPlugin.js.map +1 -0
- package/dist/pageobjects/ide/plugins/OpenshiftPlugin.d.ts +38 -0
- package/dist/pageobjects/ide/plugins/OpenshiftPlugin.d.ts.map +1 -0
- package/dist/pageobjects/ide/plugins/OpenshiftPlugin.js +99 -0
- package/dist/pageobjects/ide/plugins/OpenshiftPlugin.js.map +1 -0
- package/dist/pageobjects/ide/plugins/PluginsView.d.ts +43 -0
- package/dist/pageobjects/ide/plugins/PluginsView.d.ts.map +1 -0
- package/dist/pageobjects/ide/plugins/PluginsView.js +166 -0
- package/dist/pageobjects/ide/plugins/PluginsView.js.map +1 -0
- package/dist/pageobjects/login/ICheLoginPage.d.ts +13 -0
- package/dist/pageobjects/login/ICheLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/login/ICheLoginPage.js +12 -0
- package/dist/pageobjects/login/ICheLoginPage.js.map +1 -0
- package/dist/pageobjects/login/IOcpLoginPage.d.ts +13 -0
- package/dist/pageobjects/login/IOcpLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/login/IOcpLoginPage.js +12 -0
- package/dist/pageobjects/login/IOcpLoginPage.js.map +1 -0
- package/dist/pageobjects/login/MultiUserLoginPage.d.ts +18 -0
- package/dist/pageobjects/login/MultiUserLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/login/MultiUserLoginPage.js +49 -0
- package/dist/pageobjects/login/MultiUserLoginPage.js.map +1 -0
- package/dist/pageobjects/login/OcpUserLoginPage.d.ts +18 -0
- package/dist/pageobjects/login/OcpUserLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/login/OcpUserLoginPage.js +53 -0
- package/dist/pageobjects/login/OcpUserLoginPage.js.map +1 -0
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.d.ts +20 -0
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js +75 -0
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js.map +1 -0
- package/dist/pageobjects/login/UpdateAccountInformationPage.d.ts +24 -0
- package/dist/pageobjects/login/UpdateAccountInformationPage.d.ts.map +1 -0
- package/dist/pageobjects/login/UpdateAccountInformationPage.js +74 -0
- package/dist/pageobjects/login/UpdateAccountInformationPage.js.map +1 -0
- package/dist/pageobjects/openshift/CheLoginPage.d.ts +27 -0
- package/dist/pageobjects/openshift/CheLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/openshift/CheLoginPage.js +88 -0
- package/dist/pageobjects/openshift/CheLoginPage.js.map +1 -0
- package/dist/pageobjects/openshift/OcpLoginPage.d.ts +30 -0
- package/dist/pageobjects/openshift/OcpLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/openshift/OcpLoginPage.js +106 -0
- package/dist/pageobjects/openshift/OcpLoginPage.js.map +1 -0
- package/dist/pageobjects/third-parties/GitLoginPage.d.ts +27 -0
- package/dist/pageobjects/third-parties/GitLoginPage.d.ts.map +1 -0
- package/dist/pageobjects/third-parties/GitLoginPage.js +85 -0
- package/dist/pageobjects/third-parties/GitLoginPage.js.map +1 -0
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.d.ts +33 -0
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.d.ts.map +1 -0
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js +110 -0
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js.map +1 -0
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.d.ts +12 -0
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.js +74 -0
- package/dist/tests/devfiles/CSlashCPlusPlus.spec.js.map +1 -0
- package/dist/tests/devfiles/DevfileSmoke.spec.d.ts +11 -0
- package/dist/tests/devfiles/DevfileSmoke.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/DevfileSmoke.spec.js +48 -0
- package/dist/tests/devfiles/DevfileSmoke.spec.js.map +1 -0
- package/dist/tests/devfiles/DotNetCore.spec.d.ts +12 -0
- package/dist/tests/devfiles/DotNetCore.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/DotNetCore.spec.js +82 -0
- package/dist/tests/devfiles/DotNetCore.spec.js.map +1 -0
- package/dist/tests/devfiles/Go.spec.d.ts +2 -0
- package/dist/tests/devfiles/Go.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/Go.spec.js +73 -0
- package/dist/tests/devfiles/Go.spec.js.map +1 -0
- package/dist/tests/devfiles/JavaMaven.spec.d.ts +11 -0
- package/dist/tests/devfiles/JavaMaven.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/JavaMaven.spec.js +61 -0
- package/dist/tests/devfiles/JavaMaven.spec.js.map +1 -0
- package/dist/tests/devfiles/JavaSpringBoot.spec.d.ts +11 -0
- package/dist/tests/devfiles/JavaSpringBoot.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/JavaSpringBoot.spec.js +67 -0
- package/dist/tests/devfiles/JavaSpringBoot.spec.js.map +1 -0
- package/dist/tests/devfiles/JavaVertx.spec.d.ts +11 -0
- package/dist/tests/devfiles/JavaVertx.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/JavaVertx.spec.js +61 -0
- package/dist/tests/devfiles/JavaVertx.spec.js.map +1 -0
- package/dist/tests/devfiles/NodeJS.spec.d.ts +2 -0
- package/dist/tests/devfiles/NodeJS.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/NodeJS.spec.js +65 -0
- package/dist/tests/devfiles/NodeJS.spec.js.map +1 -0
- package/dist/tests/devfiles/PHPSimple.spec.d.ts +12 -0
- package/dist/tests/devfiles/PHPSimple.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/PHPSimple.spec.js +75 -0
- package/dist/tests/devfiles/PHPSimple.spec.js.map +1 -0
- package/dist/tests/devfiles/Python.spec.d.ts +2 -0
- package/dist/tests/devfiles/Python.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/Python.spec.js +59 -0
- package/dist/tests/devfiles/Python.spec.js.map +1 -0
- package/dist/tests/devfiles/PythonDjango.spec.d.ts +2 -0
- package/dist/tests/devfiles/PythonDjango.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/PythonDjango.spec.js +62 -0
- package/dist/tests/devfiles/PythonDjango.spec.js.map +1 -0
- package/dist/tests/devfiles/Quarkus.spec.d.ts +2 -0
- package/dist/tests/devfiles/Quarkus.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/Quarkus.spec.js +70 -0
- package/dist/tests/devfiles/Quarkus.spec.js.map +1 -0
- package/dist/tests/devfiles/Scala.spec.d.ts +11 -0
- package/dist/tests/devfiles/Scala.spec.d.ts.map +1 -0
- package/dist/tests/devfiles/Scala.spec.js +67 -0
- package/dist/tests/devfiles/Scala.spec.js.map +1 -0
- package/dist/tests/e2e/FactoryUrl.spec.d.ts +2 -0
- package/dist/tests/e2e/FactoryUrl.spec.d.ts.map +1 -0
- package/dist/tests/e2e/FactoryUrl.spec.js +45 -0
- package/dist/tests/e2e/FactoryUrl.spec.js.map +1 -0
- package/dist/tests/e2e/GitPublishBranch.spec.d.ts +11 -0
- package/dist/tests/e2e/GitPublishBranch.spec.d.ts.map +1 -0
- package/dist/tests/e2e/GitPublishBranch.spec.js +88 -0
- package/dist/tests/e2e/GitPublishBranch.spec.js.map +1 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.d.ts +11 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.d.ts.map +1 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.js +83 -0
- package/dist/tests/e2e/GitSelfSignCert.spec.js.map +1 -0
- package/dist/tests/e2e/GitSsh.spec.d.ts +11 -0
- package/dist/tests/e2e/GitSsh.spec.d.ts.map +1 -0
- package/dist/tests/e2e/GitSsh.spec.js +118 -0
- package/dist/tests/e2e/GitSsh.spec.js.map +1 -0
- package/dist/tests/e2e/OpenshiftConnector.spec.d.ts +11 -0
- package/dist/tests/e2e/OpenshiftConnector.spec.d.ts.map +1 -0
- package/dist/tests/e2e/OpenshiftConnector.spec.js +122 -0
- package/dist/tests/e2e/OpenshiftConnector.spec.js.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.d.ts +2 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.d.ts.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js +53 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.d.ts +2 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.d.ts.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js +51 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.d.ts +2 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.d.ts.map +1 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js +51 -0
- package/dist/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +1 -0
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.d.ts +2 -0
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.d.ts.map +1 -0
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js +200 -0
- package/dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js.map +1 -0
- package/dist/tests/e2e_happy_path/HappyPath.spec.d.ts +11 -0
- package/dist/tests/e2e_happy_path/HappyPath.spec.d.ts.map +1 -0
- package/dist/tests/e2e_happy_path/HappyPath.spec.js +309 -0
- package/dist/tests/e2e_happy_path/HappyPath.spec.js.map +1 -0
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.d.ts +11 -0
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.d.ts.map +1 -0
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js +43 -0
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js.map +1 -0
- package/dist/tests/load_test/LoadTest.spec.d.ts +11 -0
- package/dist/tests/load_test/LoadTest.spec.d.ts.map +1 -0
- package/dist/tests/load_test/LoadTest.spec.js +44 -0
- package/dist/tests/load_test/LoadTest.spec.js.map +1 -0
- package/dist/tests/login/LinkCheAndOcpUsers.spec.d.ts +11 -0
- package/dist/tests/login/LinkCheAndOcpUsers.spec.d.ts.map +1 -0
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js +39 -0
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js.map +1 -0
- package/dist/tests/login/Login.spec.d.ts +11 -0
- package/dist/tests/login/Login.spec.d.ts.map +1 -0
- package/dist/tests/login/Login.spec.js +26 -0
- package/dist/tests/login/Login.spec.js.map +1 -0
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js +122 -0
- package/dist/tests/plugins/GitHubPullRequestPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/InstallPluginUsingUI.spec.d.ts +11 -0
- package/dist/tests/plugins/InstallPluginUsingUI.spec.d.ts.map +1 -0
- package/dist/tests/plugins/InstallPluginUsingUI.spec.js +69 -0
- package/dist/tests/plugins/InstallPluginUsingUI.spec.js.map +1 -0
- package/dist/tests/plugins/JavaPlugin.spec.d.ts +2 -0
- package/dist/tests/plugins/JavaPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/JavaPlugin.spec.js +82 -0
- package/dist/tests/plugins/JavaPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/PhpPlugin.spec.d.ts +2 -0
- package/dist/tests/plugins/PhpPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/PhpPlugin.spec.js +94 -0
- package/dist/tests/plugins/PhpPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/PythonPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/PythonPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/PythonPlugin.spec.js +80 -0
- package/dist/tests/plugins/PythonPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/TypescriptPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/TypescriptPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/TypescriptPlugin.spec.js +147 -0
- package/dist/tests/plugins/TypescriptPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.js +76 -0
- package/dist/tests/plugins/VscodeKubernetesPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.js +89 -0
- package/dist/tests/plugins/VscodeShellcheckPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/VscodeValePlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/VscodeValePlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/VscodeValePlugin.spec.js +77 -0
- package/dist/tests/plugins/VscodeValePlugin.spec.js.map +1 -0
- package/dist/tests/plugins/VscodeXmlPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/VscodeXmlPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/VscodeXmlPlugin.spec.js +98 -0
- package/dist/tests/plugins/VscodeXmlPlugin.spec.js.map +1 -0
- package/dist/tests/plugins/VscodeYamlPlugin.spec.d.ts +11 -0
- package/dist/tests/plugins/VscodeYamlPlugin.spec.d.ts.map +1 -0
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js +96 -0
- package/dist/tests/plugins/VscodeYamlPlugin.spec.js.map +1 -0
- package/dist/testsLibrary/CodeExecutionTests.d.ts +49 -0
- package/dist/testsLibrary/CodeExecutionTests.d.ts.map +1 -0
- package/dist/testsLibrary/CodeExecutionTests.js +222 -0
- package/dist/testsLibrary/CodeExecutionTests.js.map +1 -0
- package/dist/testsLibrary/LanguageServerTests.d.ts +36 -0
- package/dist/testsLibrary/LanguageServerTests.d.ts.map +1 -0
- package/dist/testsLibrary/LanguageServerTests.js +237 -0
- package/dist/testsLibrary/LanguageServerTests.js.map +1 -0
- package/dist/testsLibrary/ProjectAndFileTests.d.ts +28 -0
- package/dist/testsLibrary/ProjectAndFileTests.d.ts.map +1 -0
- package/dist/testsLibrary/ProjectAndFileTests.js +100 -0
- package/dist/testsLibrary/ProjectAndFileTests.js.map +1 -0
- package/dist/testsLibrary/WorkspaceHandlingTests.d.ts +29 -0
- package/dist/testsLibrary/WorkspaceHandlingTests.d.ts.map +1 -0
- package/dist/testsLibrary/WorkspaceHandlingTests.js +87 -0
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +1 -0
- package/dist/utils/AnimationChecker.d.ts +16 -0
- package/dist/utils/AnimationChecker.d.ts.map +1 -0
- package/dist/utils/AnimationChecker.js +45 -0
- package/dist/utils/AnimationChecker.js.map +1 -0
- package/dist/utils/BrowserTabsUtil.d.ts +28 -0
- package/dist/utils/BrowserTabsUtil.d.ts.map +1 -0
- package/dist/utils/BrowserTabsUtil.js +115 -0
- package/dist/utils/BrowserTabsUtil.js.map +1 -0
- package/dist/utils/DriverHelper.d.ts +76 -0
- package/dist/utils/DriverHelper.d.ts.map +1 -0
- package/dist/utils/DriverHelper.js +616 -0
- package/dist/utils/DriverHelper.js.map +1 -0
- package/dist/utils/KeycloackUrlHandler.d.ts +15 -0
- package/dist/utils/KeycloackUrlHandler.d.ts.map +1 -0
- package/dist/utils/KeycloackUrlHandler.js +30 -0
- package/dist/utils/KeycloackUrlHandler.js.map +1 -0
- package/dist/utils/Logger.d.ts +39 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +84 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/PreferencesHandler.d.ts +52 -0
- package/dist/utils/PreferencesHandler.d.ts.map +1 -0
- package/dist/utils/PreferencesHandler.js +139 -0
- package/dist/utils/PreferencesHandler.js.map +1 -0
- package/dist/utils/Sanitizer.d.ts +13 -0
- package/dist/utils/Sanitizer.d.ts.map +1 -0
- package/dist/utils/Sanitizer.js +29 -0
- package/dist/utils/Sanitizer.js.map +1 -0
- package/dist/utils/ScreenCatcher.d.ts +12 -0
- package/dist/utils/ScreenCatcher.d.ts.map +1 -0
- package/dist/utils/ScreenCatcher.js +107 -0
- package/dist/utils/ScreenCatcher.js.map +1 -0
- package/dist/utils/VCS/CheGitApi.d.ts +8 -0
- package/dist/utils/VCS/CheGitApi.d.ts.map +1 -0
- package/dist/utils/VCS/CheGitApi.js +42 -0
- package/dist/utils/VCS/CheGitApi.js.map +1 -0
- package/dist/utils/VCS/github/GitHubUtil.d.ts +15 -0
- package/dist/utils/VCS/github/GitHubUtil.d.ts.map +1 -0
- package/dist/utils/VCS/github/GitHubUtil.js +106 -0
- package/dist/utils/VCS/github/GitHubUtil.js.map +1 -0
- package/dist/utils/WorkspaceNameHandler.d.ts +17 -0
- package/dist/utils/WorkspaceNameHandler.d.ts.map +1 -0
- package/dist/utils/WorkspaceNameHandler.js +60 -0
- package/dist/utils/WorkspaceNameHandler.js.map +1 -0
- package/dist/utils/requestHandlers/CheApiRequestHandler.d.ts +28 -0
- package/dist/utils/requestHandlers/CheApiRequestHandler.d.ts.map +1 -0
- package/dist/utils/requestHandlers/CheApiRequestHandler.js +100 -0
- package/dist/utils/requestHandlers/CheApiRequestHandler.js.map +1 -0
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.d.ts +18 -0
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.d.ts.map +1 -0
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js +33 -0
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.d.ts +14 -0
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.d.ts.map +1 -0
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.js +12 -0
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.d.ts +5 -0
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.d.ts.map +1 -0
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js +50 -0
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js.map +1 -0
- package/dist/utils/requestHandlers/tokens/ITokenHandler.d.ts +13 -0
- package/dist/utils/requestHandlers/tokens/ITokenHandler.d.ts.map +1 -0
- package/dist/utils/requestHandlers/tokens/ITokenHandler.js +12 -0
- package/dist/utils/requestHandlers/tokens/ITokenHandler.js.map +1 -0
- package/dist/utils/workspace/ITestWorkspaceUtil.d.ts +25 -0
- package/dist/utils/workspace/ITestWorkspaceUtil.d.ts.map +1 -0
- package/dist/utils/workspace/ITestWorkspaceUtil.js +12 -0
- package/dist/utils/workspace/ITestWorkspaceUtil.js.map +1 -0
- package/dist/utils/workspace/TestWorkspaceUtil.d.ts +34 -0
- package/dist/utils/workspace/TestWorkspaceUtil.d.ts.map +1 -0
- package/dist/utils/workspace/TestWorkspaceUtil.js +233 -0
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -0
- package/dist/utils/workspace/WorkspaceStatus.d.ts +15 -0
- package/dist/utils/workspace/WorkspaceStatus.d.ts.map +1 -0
- package/dist/utils/workspace/WorkspaceStatus.js +19 -0
- package/dist/utils/workspace/WorkspaceStatus.js.map +1 -0
- package/driver/CheReporter.ts +202 -0
- package/driver/ChromeDriver.ts +71 -0
- package/driver/IDriver.ts +14 -0
- package/files/devfiles/plugins/GitHubPullRequestPlugin.yaml +11 -0
- package/files/devfiles/plugins/InstallPluginUsingUI.yaml +3 -0
- package/files/devfiles/plugins/Java11PluginTest.yaml +17 -0
- package/files/devfiles/plugins/PhpPluginTest.yaml +47 -0
- package/files/devfiles/plugins/PythonPluginTest.yaml +14 -0
- package/files/devfiles/plugins/TypescriptNodeDebug2PluginTest.yaml +49 -0
- package/files/devfiles/plugins/VscodeKubernetesPlugin.yaml +12 -0
- package/files/devfiles/plugins/VscodeShellcheckPlugin.yaml +12 -0
- package/files/devfiles/plugins/VscodeValePlugin.yaml +42 -0
- package/files/devfiles/plugins/VscodeXmlPlugin.yaml +12 -0
- package/files/devfiles/plugins/VscodeYamlPlugin.yaml +12 -0
- package/files/happy-path/containers-happy-path.yaml +127 -0
- package/files/happy-path/happy-path-workspace.yaml +95 -0
- package/files/happy-path/petclinic-classpath.txt +49 -0
- package/generateIndex.sh +35 -0
- package/index.ts +67 -0
- package/initDefaultValues.sh +27 -0
- package/initDevfileTests.sh +48 -0
- package/initPluginTest.sh +9 -0
- package/inversify.config.ts +134 -0
- package/inversify.types.ts +71 -0
- package/mocha-all-devfiles.opts +8 -0
- package/mocha-all-factories.opts +8 -0
- package/mocha-all-plugins.opts +7 -0
- package/mocha-connector.opts +7 -0
- package/mocha-devworkspace-happy-path.opts +7 -0
- package/mocha-factory.opts +7 -0
- package/mocha-git-publish-branch.opts +7 -0
- package/mocha-git-self-sign-cert.opts +7 -0
- package/mocha-git-ssh.opts +7 -0
- package/mocha-happy-path.opts +8 -0
- package/mocha-java-vertx.opts +7 -0
- package/mocha-load.opts +7 -0
- package/mocha-single-devfile.opts +6 -0
- package/mocha-wkspc-creation-and-ls.opts +7 -0
- package/mocha.intelij.opts +7 -0
- package/mocha.ocp.link.opts +6 -0
- package/mocha.opts +7 -0
- package/mocha.single.plugin.opts +5 -0
- package/package.json +59 -0
- package/pageobjects/dashboard/CreateWorkspace.ts +58 -0
- package/pageobjects/dashboard/Dashboard.ts +112 -0
- package/pageobjects/dashboard/Workspaces.ts +189 -0
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +153 -0
- package/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +96 -0
- package/pageobjects/ide/ContextMenu.ts +55 -0
- package/pageobjects/ide/DebugView.ts +88 -0
- package/pageobjects/ide/DialogWindow.ts +101 -0
- package/pageobjects/ide/Editor.ts +601 -0
- package/pageobjects/ide/Ide.ts +370 -0
- package/pageobjects/ide/LeftToolBar.ts +81 -0
- package/pageobjects/ide/NavigationBar.ts +41 -0
- package/pageobjects/ide/NotificationCenter.ts +75 -0
- package/pageobjects/ide/OpenDialogWidget.ts +92 -0
- package/pageobjects/ide/OpenWorkspaceWidget.ts +48 -0
- package/pageobjects/ide/PreviewWidget.ts +135 -0
- package/pageobjects/ide/ProjectTree.ts +335 -0
- package/pageobjects/ide/QuickOpenContainer.ts +59 -0
- package/pageobjects/ide/RightToolBar.ts +34 -0
- package/pageobjects/ide/Terminal.ts +245 -0
- package/pageobjects/ide/TopMenu.ts +103 -0
- package/pageobjects/ide/plugins/GitHubPullRequestPlugin.ts +130 -0
- package/pageobjects/ide/plugins/GitPlugin.ts +118 -0
- package/pageobjects/ide/plugins/KubernetesPlugin.ts +113 -0
- package/pageobjects/ide/plugins/OpenshiftPlugin.ts +87 -0
- package/pageobjects/ide/plugins/PluginsView.ts +191 -0
- package/pageobjects/login/ICheLoginPage.ts +13 -0
- package/pageobjects/login/IOcpLoginPage.ts +13 -0
- package/pageobjects/login/MultiUserLoginPage.ts +33 -0
- package/pageobjects/login/OcpUserLoginPage.ts +38 -0
- package/pageobjects/login/RegularUserOcpCheLoginPage.ts +61 -0
- package/pageobjects/login/UpdateAccountInformationPage.ts +70 -0
- package/pageobjects/openshift/CheLoginPage.ts +91 -0
- package/pageobjects/openshift/OcpLoginPage.ts +113 -0
- package/pageobjects/third-parties/GitLoginPage.ts +81 -0
- package/pageobjects/third-parties/GitOauthAppsSettings.ts +110 -0
- package/tests/devfiles/CSlashCPlusPlus.spec.ts +81 -0
- package/tests/devfiles/DevfileSmoke.spec.ts +53 -0
- package/tests/devfiles/DotNetCore.spec.ts +90 -0
- package/tests/devfiles/Go.spec.ts +84 -0
- package/tests/devfiles/JavaMaven.spec.ts +67 -0
- package/tests/devfiles/JavaSpringBoot.spec.ts +74 -0
- package/tests/devfiles/JavaVertx.spec.ts +68 -0
- package/tests/devfiles/NodeJS.spec.ts +74 -0
- package/tests/devfiles/PHPSimple.spec.ts +83 -0
- package/tests/devfiles/Python.spec.ts +67 -0
- package/tests/devfiles/PythonDjango.spec.ts +70 -0
- package/tests/devfiles/Quarkus.spec.ts +79 -0
- package/tests/devfiles/Scala.spec.ts +74 -0
- package/tests/e2e/FactoryUrl.spec.ts +51 -0
- package/tests/e2e/GitPublishBranch.spec.ts +107 -0
- package/tests/e2e/GitSelfSignCert.spec.ts +107 -0
- package/tests/e2e/GitSsh.spec.ts +143 -0
- package/tests/e2e/OpenshiftConnector.spec.ts +142 -0
- package/tests/e2e/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +61 -0
- package/tests/e2e/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +59 -0
- package/tests/e2e/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +61 -0
- package/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts +204 -0
- package/tests/e2e_happy_path/HappyPath.spec.ts +342 -0
- package/tests/intelij/IntelijOpenWorkspace.spec.ts +49 -0
- package/tests/load_test/LoadTest.spec.ts +54 -0
- package/tests/login/LinkCheAndOcpUsers.spec.ts +47 -0
- package/tests/login/Login.spec.ts +27 -0
- package/tests/plugins/GitHubPullRequestPlugin.spec.ts +150 -0
- package/tests/plugins/InstallPluginUsingUI.spec.ts +83 -0
- package/tests/plugins/JavaPlugin.spec.ts +108 -0
- package/tests/plugins/PhpPlugin.spec.ts +121 -0
- package/tests/plugins/PythonPlugin.spec.ts +92 -0
- package/tests/plugins/TypescriptPlugin.spec.ts +179 -0
- package/tests/plugins/VscodeKubernetesPlugin.spec.ts +89 -0
- package/tests/plugins/VscodeShellcheckPlugin.spec.ts +106 -0
- package/tests/plugins/VscodeValePlugin.spec.ts +91 -0
- package/tests/plugins/VscodeXmlPlugin.spec.ts +120 -0
- package/tests/plugins/VscodeYamlPlugin.spec.ts +117 -0
- package/testsLibrary/CodeExecutionTests.ts +196 -0
- package/testsLibrary/LanguageServerTests.ts +210 -0
- package/testsLibrary/ProjectAndFileTests.ts +82 -0
- package/testsLibrary/WorkspaceHandlingTests.ts +68 -0
- package/tsconfig.json +16 -0
- package/tslint.json +123 -0
- package/utils/AnimationChecker.ts +27 -0
- package/utils/BrowserTabsUtil.ts +120 -0
- package/utils/DriverHelper.ts +753 -0
- package/utils/KeycloackUrlHandler.ts +32 -0
- package/utils/Logger.ts +87 -0
- package/utils/PreferencesHandler.ts +120 -0
- package/utils/Sanitizer.ts +20 -0
- package/utils/ScreenCatcher.ts +74 -0
- package/utils/VCS/CheGitApi.ts +26 -0
- package/utils/VCS/github/GitHubUtil.ts +91 -0
- package/utils/WorkspaceNameHandler.ts +48 -0
- package/utils/requestHandlers/CheApiRequestHandler.ts +83 -0
- package/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +27 -0
- package/utils/requestHandlers/headers/IAuthorizationHeaderHandler.ts +15 -0
- package/utils/requestHandlers/tokens/CheMultiuserTokenHandler.ts +39 -0
- package/utils/requestHandlers/tokens/ITokenHandler.ts +14 -0
- package/utils/workspace/ITestWorkspaceUtil.ts +26 -0
- package/utils/workspace/TestWorkspaceUtil.ts +275 -0
- package/utils/workspace/WorkspaceStatus.ts +15 -0
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
|
|
12
|
+
export interface ITokenHandler {
|
|
13
|
+
get(): Promise<string>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { WorkspaceStatus } from './WorkspaceStatus';
|
|
12
|
+
import { che } from '@eclipse-che/api';
|
|
13
|
+
|
|
14
|
+
export interface ITestWorkspaceUtil {
|
|
15
|
+
cleanUpAllWorkspaces() : void;
|
|
16
|
+
cleanUpRunningWorkspace(workspaceName: string) : void;
|
|
17
|
+
waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus) : void;
|
|
18
|
+
waitPluginAdding(namespace: string, workspaceName: string, pluginId: string) : void;
|
|
19
|
+
removeWorkspaceById(id: string) : void;
|
|
20
|
+
stopWorkspaceById(id: string) : void;
|
|
21
|
+
getIdOfRunningWorkspace(workspaceName: string): Promise<string>;
|
|
22
|
+
getIdOfRunningWorkspaces(): Promise<Array<string>>;
|
|
23
|
+
createWsFromDevFile(customTemplate: che.workspace.devfile.Devfile): void;
|
|
24
|
+
getBaseDevfile(): Promise<che.workspace.devfile.Devfile>;
|
|
25
|
+
startWorkspace(workspaceId: string): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
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 { che } from '@eclipse-che/api';
|
|
12
|
+
import { TestConstants } from '../../TestConstants';
|
|
13
|
+
import { injectable, inject } from 'inversify';
|
|
14
|
+
import { DriverHelper } from '../DriverHelper';
|
|
15
|
+
import 'reflect-metadata';
|
|
16
|
+
import { WorkspaceStatus } from './WorkspaceStatus';
|
|
17
|
+
import { ITestWorkspaceUtil } from './ITestWorkspaceUtil';
|
|
18
|
+
import { error } from 'selenium-webdriver';
|
|
19
|
+
import { CheApiRequestHandler } from '../requestHandlers/CheApiRequestHandler';
|
|
20
|
+
import { CLASSES } from '../../inversify.types';
|
|
21
|
+
import { Logger } from '../Logger';
|
|
22
|
+
|
|
23
|
+
@injectable()
|
|
24
|
+
export class TestWorkspaceUtil implements ITestWorkspaceUtil {
|
|
25
|
+
|
|
26
|
+
static readonly WORKSPACE_API_URL: string = 'api/workspace';
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
30
|
+
@inject(CLASSES.CheApiRequestHandler) private readonly processRequestHandler: CheApiRequestHandler
|
|
31
|
+
) { }
|
|
32
|
+
|
|
33
|
+
public async waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus) {
|
|
34
|
+
Logger.debug('TestWorkspaceUtil.waitWorkspaceStatus');
|
|
35
|
+
|
|
36
|
+
const workspaceStatusApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${namespace}:${workspaceName}`;
|
|
37
|
+
const attempts: number = TestConstants.TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS;
|
|
38
|
+
const polling: number = TestConstants.TS_SELENIUM_WORKSPACE_STATUS_POLLING;
|
|
39
|
+
let workspaceStatus: string = '';
|
|
40
|
+
|
|
41
|
+
for (let i = 0; i < attempts; i++) {
|
|
42
|
+
const response = await this.processRequestHandler.get(workspaceStatusApiUrl);
|
|
43
|
+
|
|
44
|
+
if (response.status !== 200) {
|
|
45
|
+
await this.driverHelper.wait(polling);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
workspaceStatus = await response.data.status;
|
|
50
|
+
|
|
51
|
+
if (workspaceStatus === expectedWorkspaceStatus) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
await this.driverHelper.wait(polling);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
throw new error.TimeoutError(`Exceeded the maximum number of checking attempts, workspace status is: '${workspaceStatus}' different to '${expectedWorkspaceStatus}'`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public async waitPluginAdding(namespace: string, workspaceName: string, pluginName: string) {
|
|
62
|
+
Logger.debug('TestWorkspaceUtil.waitPluginAdding');
|
|
63
|
+
|
|
64
|
+
const workspaceStatusApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${namespace}:${workspaceName}`;
|
|
65
|
+
const attempts: number = TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS;
|
|
66
|
+
const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
67
|
+
|
|
68
|
+
for (let i = 0; i < attempts; i++) {
|
|
69
|
+
const response = await this.processRequestHandler.get(workspaceStatusApiUrl);
|
|
70
|
+
|
|
71
|
+
if (response.status !== 200) {
|
|
72
|
+
await this.driverHelper.wait(polling);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const machines: string = JSON.stringify(response.data.runtime.machines);
|
|
77
|
+
const isPluginPresent: boolean = machines.search(pluginName) > 0;
|
|
78
|
+
|
|
79
|
+
if (isPluginPresent) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (i === attempts - 1) {
|
|
84
|
+
throw new error.TimeoutError(`Exceeded maximum tries attempts, the '${pluginName}' plugin is not present in the workspace runtime.`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
await this.driverHelper.wait(polling);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public async getListOfWorkspaceId(): Promise<string[]> {
|
|
92
|
+
Logger.debug('TestWorkspaceUtil.getListOfWorkspaceId');
|
|
93
|
+
|
|
94
|
+
const getAllWorkspacesResponse = await this.processRequestHandler.get(TestWorkspaceUtil.WORKSPACE_API_URL);
|
|
95
|
+
|
|
96
|
+
interface IMyObj {
|
|
97
|
+
id: string;
|
|
98
|
+
status: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let stringified = JSON.stringify(getAllWorkspacesResponse.data);
|
|
102
|
+
let arrayOfWorkspaces = <IMyObj[]>JSON.parse(stringified);
|
|
103
|
+
let wsList: Array<string> = [];
|
|
104
|
+
|
|
105
|
+
for (let entry of arrayOfWorkspaces) {
|
|
106
|
+
wsList.push(entry.id);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return wsList;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public async getIdOfRunningWorkspace(wsName: string): Promise<string> {
|
|
113
|
+
Logger.debug('TestWorkspaceUtil.getIdOfRunningWorkspace');
|
|
114
|
+
|
|
115
|
+
const getWorkspacesByNameResponse = await this.processRequestHandler.get(`${TestWorkspaceUtil.WORKSPACE_API_URL}/:${wsName}`);
|
|
116
|
+
return getWorkspacesByNameResponse.data.id;
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public async getIdOfRunningWorkspaces(): Promise<Array<string>> {
|
|
121
|
+
Logger.debug('TestWorkspaceUtil.getIdOfRunningWorkspaces');
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const getAllWorkspacesResponse = await this.processRequestHandler.get(TestWorkspaceUtil.WORKSPACE_API_URL);
|
|
125
|
+
|
|
126
|
+
interface IMyObj {
|
|
127
|
+
id: string;
|
|
128
|
+
status: string;
|
|
129
|
+
}
|
|
130
|
+
let stringified = JSON.stringify(getAllWorkspacesResponse.data);
|
|
131
|
+
let arrayOfWorkspaces = <IMyObj[]>JSON.parse(stringified);
|
|
132
|
+
let idOfRunningWorkspace: Array<string> = new Array();
|
|
133
|
+
|
|
134
|
+
for (let entry of arrayOfWorkspaces) {
|
|
135
|
+
if (entry.status === 'RUNNING') {
|
|
136
|
+
idOfRunningWorkspace.push(entry.id);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return idOfRunningWorkspace;
|
|
141
|
+
} catch (err) {
|
|
142
|
+
console.log(`Getting id of running workspaces failed. URL used: ${TestWorkspaceUtil.WORKSPACE_API_URL}`);
|
|
143
|
+
throw err;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public async removeWorkspaceById(id: string) {
|
|
148
|
+
Logger.debug('TestWorkspaceUtil.removeWorkspaceById');
|
|
149
|
+
|
|
150
|
+
const workspaceIdUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${id}`;
|
|
151
|
+
try {
|
|
152
|
+
const deleteWorkspaceResponse = await this.processRequestHandler.delete(workspaceIdUrl);
|
|
153
|
+
// response code 204: "No Content" expected
|
|
154
|
+
if (deleteWorkspaceResponse.status !== 204) {
|
|
155
|
+
throw new Error(`Can not remove workspace. Code: ${deleteWorkspaceResponse.status} Data: ${deleteWorkspaceResponse.data}`);
|
|
156
|
+
}
|
|
157
|
+
} catch (err) {
|
|
158
|
+
console.log(`Removing of workspace failed.`);
|
|
159
|
+
throw err;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public async stopWorkspaceById(id: string) {
|
|
164
|
+
Logger.debug('TestWorkspaceUtil.stopWorkspaceById');
|
|
165
|
+
|
|
166
|
+
const stopWorkspaceApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${id}`;
|
|
167
|
+
let stopWorkspaceResponse;
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
stopWorkspaceResponse = await this.processRequestHandler.delete(`${stopWorkspaceApiUrl}/runtime`);
|
|
171
|
+
} catch (err) {
|
|
172
|
+
console.log(`Stop workspace call failed. URL used: ${stopWorkspaceApiUrl}/runtime`);
|
|
173
|
+
throw err;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// if workspace is already stopped, it will return 409: "Conflict"
|
|
177
|
+
if (stopWorkspaceResponse.status === 409) {
|
|
178
|
+
Logger.warn(`TestWorkspaceUtil.stopWorkspaceById Workspace {${id}} is already STOPPED`);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// response code 204: "No Content" expected
|
|
183
|
+
if (stopWorkspaceResponse.status !== 204) {
|
|
184
|
+
throw new Error(`Can not stop workspace. Code: ${stopWorkspaceResponse.status} Data: ${stopWorkspaceResponse.data}`);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let stopped: boolean = false;
|
|
188
|
+
let wsStatus = await this.processRequestHandler.get(stopWorkspaceApiUrl);
|
|
189
|
+
for (let i = 0; i < TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS; i++) {
|
|
190
|
+
wsStatus = await this.processRequestHandler.get(stopWorkspaceApiUrl);
|
|
191
|
+
if (wsStatus.data.status === 'STOPPED') {
|
|
192
|
+
stopped = true;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (!stopped) {
|
|
199
|
+
let waitTime = TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS * TestConstants.TS_SELENIUM_DEFAULT_POLLING;
|
|
200
|
+
throw new error.TimeoutError(`The workspace was not stopped in ${waitTime} ms. Currnet status is: ${wsStatus.data.status}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
public async cleanUpAllWorkspaces() {
|
|
205
|
+
Logger.debug('TestWorkspaceUtil.cleanUpAllWorkspaces');
|
|
206
|
+
|
|
207
|
+
let listOfRunningWorkspaces: Array<string> = await this.getIdOfRunningWorkspaces();
|
|
208
|
+
for (const entry of listOfRunningWorkspaces) {
|
|
209
|
+
await this.stopWorkspaceById(entry);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let listAllWorkspaces: Array<string> = await this.getListOfWorkspaceId();
|
|
213
|
+
|
|
214
|
+
for (const entry of listAllWorkspaces) {
|
|
215
|
+
await this.removeWorkspaceById(entry);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public async cleanUpRunningWorkspace(workspaceName: string) {
|
|
221
|
+
if (workspaceName === undefined || workspaceName.length === 0) {
|
|
222
|
+
Logger.warn(`Could nod delete workspace because workspaceName is undefined or empty`);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
Logger.debug(`TestWorkspaceUtil.cleanUpRunningWorkspace ${workspaceName}`);
|
|
227
|
+
const workspaceID: string = await this.getIdOfRunningWorkspace(workspaceName);
|
|
228
|
+
|
|
229
|
+
if (workspaceID === undefined || workspaceID.length === 0) {
|
|
230
|
+
Logger.error(`Could nod delete workspace with name ${workspaceName} because workspaceID is undefined or empty`);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
Logger.trace(`TestWorkspaceUtil.cleanUpRunningWorkspace Stopping workspace:${workspaceName} with ID:${workspaceID}`);
|
|
235
|
+
await this.stopWorkspaceById(workspaceID);
|
|
236
|
+
Logger.trace(`TestWorkspaceUtil.cleanUpRunningWorkspace Deleting workspace ${workspaceName}`);
|
|
237
|
+
await this.removeWorkspaceById(workspaceID);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
async createWsFromDevFile(customTemplate: che.workspace.devfile.Devfile) {
|
|
241
|
+
Logger.debug('TestWorkspaceUtil.createWsFromDevFile');
|
|
242
|
+
|
|
243
|
+
try {
|
|
244
|
+
await this.processRequestHandler.post(TestWorkspaceUtil.WORKSPACE_API_URL + '/devfile', customTemplate);
|
|
245
|
+
} catch (error) {
|
|
246
|
+
console.error(error);
|
|
247
|
+
throw error;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
async getBaseDevfile(): Promise<che.workspace.devfile.Devfile> {
|
|
252
|
+
Logger.debug('TestWorkspaceUtil.getBaseDevfile');
|
|
253
|
+
|
|
254
|
+
const baseDevfile: che.workspace.devfile.Devfile = {
|
|
255
|
+
apiVersion: '1.0.0',
|
|
256
|
+
metadata: {
|
|
257
|
+
name: 'test-workspace'
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
return baseDevfile;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
async startWorkspace(workspaceId: string) {
|
|
265
|
+
Logger.debug('TestWorkspaceUtil.startWorkspace');
|
|
266
|
+
|
|
267
|
+
try {
|
|
268
|
+
await this.processRequestHandler.post(`${TestWorkspaceUtil.WORKSPACE_API_URL}/${workspaceId}/runtime`);
|
|
269
|
+
} catch (error) {
|
|
270
|
+
console.error(error);
|
|
271
|
+
throw error;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export enum WorkspaceStatus {
|
|
12
|
+
RUNNING = 'RUNNING',
|
|
13
|
+
STOPPED = 'STOPPED',
|
|
14
|
+
STARTING = 'STARTING'
|
|
15
|
+
}
|