@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,189 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made
|
|
5
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
+
**********************************************************************/
|
|
10
|
+
|
|
11
|
+
import { injectable, inject } from 'inversify';
|
|
12
|
+
import { DriverHelper } from '../../utils/DriverHelper';
|
|
13
|
+
import { CLASSES } from '../../inversify.types';
|
|
14
|
+
import { By } from 'selenium-webdriver';
|
|
15
|
+
import { Logger } from '../../utils/Logger';
|
|
16
|
+
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
17
|
+
|
|
18
|
+
export enum WorkspaceStatusUI {
|
|
19
|
+
Running = 'green',
|
|
20
|
+
Stopped = 'grey'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@injectable()
|
|
24
|
+
export class Workspaces {
|
|
25
|
+
private static readonly ADD_WORKSPACE_BUTTON_XPATH: string = `//button[text()='Add Workspace']`;
|
|
26
|
+
|
|
27
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
28
|
+
|
|
29
|
+
async waitPage(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
|
|
30
|
+
Logger.debug('Workspaces.waitPage');
|
|
31
|
+
|
|
32
|
+
await this.driverHelper.waitVisibility(By.xpath(Workspaces.ADD_WORKSPACE_BUTTON_XPATH), timeout);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async clickAddWorkspaceButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
36
|
+
Logger.debug('Workspaces.clickAddWorkspaceButton');
|
|
37
|
+
|
|
38
|
+
await this.driverHelper.waitAndClick(By.xpath(Workspaces.ADD_WORKSPACE_BUTTON_XPATH), timeout);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async clickOpenButton(workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
|
|
42
|
+
Logger.debug('Workspaces.clickOpenButton');
|
|
43
|
+
|
|
44
|
+
await this.driverHelper.waitAndClick(this.getOpenButtonLocator(workspaceName), timeout);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async waitWorkspaceListItem(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
48
|
+
Logger.debug(`Workspaces.waitWorkspaceListItem "${workspaceName}"`);
|
|
49
|
+
|
|
50
|
+
const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
|
|
51
|
+
|
|
52
|
+
await this.driverHelper.waitVisibility(workspaceListItemLocator, timeout);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async waitWorkspaceWithRunningStatus(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
56
|
+
Logger.debug(`Workspaces.waitWorkspaceWithRunningStatus "${workspaceName}"`);
|
|
57
|
+
|
|
58
|
+
const runningStatusLocator: By = this.getWorkspaceStatusLocator(workspaceName, WorkspaceStatusUI.Running);
|
|
59
|
+
|
|
60
|
+
await this.driverHelper.waitVisibility(runningStatusLocator, timeout);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async waitWorkspaceWithStoppedStatus(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
64
|
+
Logger.debug(`Workspaces.waitWorkspaceWithStoppedStatus "${workspaceName}"`);
|
|
65
|
+
|
|
66
|
+
const stoppedStatusLocator: By = this.getWorkspaceStatusLocator(workspaceName, WorkspaceStatusUI.Stopped);
|
|
67
|
+
|
|
68
|
+
await this.driverHelper.waitVisibility(stoppedStatusLocator, timeout);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async clickWorkspaceListItem(workspaceName: string, timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
72
|
+
Logger.debug(`Workspaces.clickWorkspaceListItem "${workspaceName}"`);
|
|
73
|
+
|
|
74
|
+
const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
|
|
75
|
+
|
|
76
|
+
await this.driverHelper.waitAndClick(workspaceListItemLocator, timeout);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async clickActionsButton(workspaceName: string) {
|
|
80
|
+
Logger.debug(`Workspaces.clickActionsButton of the '${workspaceName}' list item`);
|
|
81
|
+
|
|
82
|
+
await this.driverHelper.waitAndClick(this.getActionsLocator(workspaceName));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async waitActionsPopup(workspaceName: string, timeout: number = TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT) {
|
|
86
|
+
Logger.debug(`Workspaces.waitActionsPopup of the '${workspaceName}' list item`);
|
|
87
|
+
|
|
88
|
+
await this.driverHelper.waitVisibility(this.getExpandedActionsLocator(workspaceName), timeout);
|
|
89
|
+
await this.driverHelper.wait(5000);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async openActionsPopup(workspaceName: string, timeout: number = TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT) {
|
|
93
|
+
Logger.debug(`Workspaces.openActionsPopup for the '${workspaceName}' list item`);
|
|
94
|
+
|
|
95
|
+
await this.clickActionsButton(workspaceName);
|
|
96
|
+
await this.waitActionsPopup(workspaceName, timeout);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async clickActionsDeleteButton(workspaceName: string) {
|
|
100
|
+
Logger.debug(`Workspaces.clickActionsDeleteButton for the '${workspaceName}' list item`);
|
|
101
|
+
|
|
102
|
+
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Delete Workspace'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async clickActionsStopWorkspaceButton(workspaceName: string) {
|
|
106
|
+
Logger.debug(`Workspaces.clickActionsStopWorkspaceButton for the '${workspaceName}' list item`);
|
|
107
|
+
|
|
108
|
+
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Stop Workspace'));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async waitDeleteWorkspaceConfirmationWindow(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
112
|
+
Logger.debug(`Workspaces.waitDeleteWorkspaceConfirmationWindow`);
|
|
113
|
+
|
|
114
|
+
const confirmationWindowLocator: By = By.xpath(`//div[@aria-label='Delete workspaces confirmation window']`);
|
|
115
|
+
|
|
116
|
+
await this.driverHelper.waitVisibility(confirmationWindowLocator, timeout);
|
|
117
|
+
await this.driverHelper.wait(5000);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async clickToDeleteConfirmationCheckbox(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
122
|
+
Logger.debug(`Workspaces.clickToDeleteConfirmationCheckbox`);
|
|
123
|
+
|
|
124
|
+
const deleteConfirmationCheckboxLocator: By = By.xpath(`//input[@data-testid='confirmation-checkbox']`);
|
|
125
|
+
|
|
126
|
+
await this.driverHelper.waitAndClick(deleteConfirmationCheckboxLocator, timeout);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async waitAndClickEnabledConfirmationWindowDeleteButton(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
130
|
+
Logger.debug(`Workspaces.waitEnabledConfirmationWindowDeleteButton`);
|
|
131
|
+
|
|
132
|
+
const enabledConfirmationWindowDeleteButton: By = By.xpath(`//button[@data-testid='delete-workspace-button' and not(@disabled)]`);
|
|
133
|
+
|
|
134
|
+
await this.driverHelper.waitAndClick(enabledConfirmationWindowDeleteButton, timeout);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async deleteWorkspaceByActionsButton(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
139
|
+
Logger.debug('Workspaces.deleteWorkspaceByActionsButton');
|
|
140
|
+
|
|
141
|
+
await this.waitWorkspaceListItem(workspaceName, timeout);
|
|
142
|
+
await this.openActionsPopup(workspaceName, timeout);
|
|
143
|
+
await this.clickActionsDeleteButton(workspaceName);
|
|
144
|
+
await this.waitDeleteWorkspaceConfirmationWindow(timeout);
|
|
145
|
+
await this.clickToDeleteConfirmationCheckbox(timeout);
|
|
146
|
+
await this.waitAndClickEnabledConfirmationWindowDeleteButton(timeout);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
async stopWorkspaceByActionsButton(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
|
|
150
|
+
Logger.debug('Workspaces.stopWorkspaceByActionsButton');
|
|
151
|
+
|
|
152
|
+
await this.waitWorkspaceListItem(workspaceName, timeout);
|
|
153
|
+
await this.openActionsPopup(workspaceName, timeout);
|
|
154
|
+
await this.clickActionsStopWorkspaceButton(workspaceName);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
async waitWorkspaceListItemAbcence(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
158
|
+
Logger.debug(`Workspaces.waitWorkspaceListItemAbcence "${workspaceName}"`);
|
|
159
|
+
|
|
160
|
+
const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
|
|
161
|
+
|
|
162
|
+
await this.driverHelper.waitDisappearance(workspaceListItemLocator, timeout);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
private getWorkspaceListItemLocator(workspaceName: string): string {
|
|
166
|
+
return `//tr[td/span/a[text()='${workspaceName}']]`;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private getWorkspaceStatusLocator(workspaceName: string, workspaceStatus: WorkspaceStatusUI): By {
|
|
170
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//span[@data-testid='workspace-status-indicator']//*[local-name()='svg' and @fill='${workspaceStatus}']`);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
private getActionsLocator(workspaceName: string): By {
|
|
174
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}/td/div/button[@aria-label='Actions']`);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private getExpandedActionsLocator(workspaceName: string): By {
|
|
178
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//button[@aria-label='Actions' and @aria-expanded='true']`);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
private getActionsPopupButtonLocator(workspaceName: string, buttonText: string): By {
|
|
182
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//li[@role='menuitem']//button[text()='${buttonText}']`);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
private getOpenButtonLocator(workspaceName: string) {
|
|
186
|
+
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//td[@data-key=5]//a[text()='Open']`);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made
|
|
5
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
+
**********************************************************************/
|
|
10
|
+
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
11
|
+
import { injectable, inject } from 'inversify';
|
|
12
|
+
import { CLASSES, TYPES } from '../../../inversify.types';
|
|
13
|
+
import 'reflect-metadata';
|
|
14
|
+
import { TestConstants } from '../../../TestConstants';
|
|
15
|
+
import { By } from 'selenium-webdriver';
|
|
16
|
+
import { Ide } from '../../ide/Ide';
|
|
17
|
+
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
18
|
+
import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
|
|
19
|
+
import { Logger } from '../../../utils/Logger';
|
|
20
|
+
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@injectable()
|
|
24
|
+
export class WorkspaceDetails {
|
|
25
|
+
private static readonly RUN_BUTTON_CSS: string = '#run-workspace-button[che-button-title=\'Run\']';
|
|
26
|
+
private static readonly OPEN_BUTTON_CSS: string = '#open-in-ide-button[che-button-title=\'Open\']';
|
|
27
|
+
private static readonly SAVE_BUTTON_CSS: string = 'button[name=\'save-button\']';
|
|
28
|
+
private static readonly ENABLED_SAVE_BUTTON_CSS: string = 'button[name=\'save-button\'][aria-disabled=\'false\']';
|
|
29
|
+
private static readonly WORKSPACE_DETAILS_LOADER_CSS: string = 'workspace-details-overview md-progress-linear';
|
|
30
|
+
|
|
31
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
32
|
+
@inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
|
|
33
|
+
|
|
34
|
+
async waitLoaderDisappearance(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
35
|
+
Logger.debug('WorkspaceDetails.waitLoaderDisappearance');
|
|
36
|
+
|
|
37
|
+
await this.driverHelper.waitDisappearance(By.css(WorkspaceDetails.WORKSPACE_DETAILS_LOADER_CSS), attempts, polling);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async saveChanges() {
|
|
41
|
+
Logger.debug('WorkspaceDetails.saveChanges');
|
|
42
|
+
|
|
43
|
+
await this.waitSaveButton();
|
|
44
|
+
await this.clickOnSaveButton();
|
|
45
|
+
await this.waitSaveButtonDisappearance();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async waitPage(workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
|
|
49
|
+
Logger.debug(`WorkspaceDetails.saveChanges workspace: "${workspaceName}"`);
|
|
50
|
+
|
|
51
|
+
await this.waitWorkspaceTitle(workspaceName, timeout);
|
|
52
|
+
await this.waitOpenButton(timeout);
|
|
53
|
+
await this.waitRunButton(timeout);
|
|
54
|
+
await this.waitTabsPresence(timeout);
|
|
55
|
+
await this.waitLoaderDisappearance(timeout);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async waitWorkspaceTitle(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
59
|
+
Logger.debug(`WorkspaceDetails.waitWorkspaceTitle title: "${workspaceName}"`);
|
|
60
|
+
|
|
61
|
+
const workspaceTitleLocator: By = By.css(this.getWorkspaceTitleCssLocator(workspaceName));
|
|
62
|
+
|
|
63
|
+
await this.driverHelper.waitVisibility(workspaceTitleLocator, timeout);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async waitRunButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
67
|
+
Logger.debug('WorkspaceDetails.waitRunButton');
|
|
68
|
+
|
|
69
|
+
await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.RUN_BUTTON_CSS), timeout);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async clickOnRunButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
73
|
+
Logger.debug('WorkspaceDetails.clickOnRunButton');
|
|
74
|
+
|
|
75
|
+
await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.RUN_BUTTON_CSS), timeout);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async waitOpenButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
79
|
+
Logger.debug('WorkspaceDetails.waitOpenButton');
|
|
80
|
+
|
|
81
|
+
await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.OPEN_BUTTON_CSS), timeout);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async openWorkspace(namespace: string, workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
|
|
85
|
+
Logger.debug(`WorkspaceDetails.openWorkspace "${namespace}/${workspaceName}"`);
|
|
86
|
+
|
|
87
|
+
await this.clickOnOpenButton(timeout);
|
|
88
|
+
await this.driverHelper.waitVisibility(By.css(Ide.ACTIVATED_IDE_IFRAME_CSS), TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT);
|
|
89
|
+
await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.STARTING);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async waitTabsPresence(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
93
|
+
Logger.debug('WorkspaceDetails.waitTabsPresence');
|
|
94
|
+
|
|
95
|
+
const workspaceDetailsTabs: Array<string> = ['Overview', 'Projects', 'Containers', 'Servers',
|
|
96
|
+
'Env Variables', 'Volumes', 'Config', 'SSH', 'Plugins', 'Editors'];
|
|
97
|
+
|
|
98
|
+
for (const tabTitle of workspaceDetailsTabs) {
|
|
99
|
+
const workspaceDetailsTabLocator: By = By.xpath(this.getTabXpathLocator(tabTitle));
|
|
100
|
+
|
|
101
|
+
await this.driverHelper.waitVisibility(workspaceDetailsTabLocator, timeout);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async selectTab(tabTitle: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
106
|
+
Logger.debug(`WorkspaceDetails.selectTab ${tabTitle}`);
|
|
107
|
+
|
|
108
|
+
await this.clickOnTab(tabTitle, timeout);
|
|
109
|
+
await this.waitTabSelected(tabTitle, timeout);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private getWorkspaceTitleCssLocator(workspaceName: string): string {
|
|
113
|
+
return `che-row-toolbar[che-title='${workspaceName}']`;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private getTabXpathLocator(tabTitle: string): string {
|
|
117
|
+
return `//md-tabs-canvas//md-tab-item//span[text()='${tabTitle}']`;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private getSelectedTabXpathLocator(tabTitle: string): string {
|
|
121
|
+
return `//md-tabs-canvas[@role='tablist']//md-tab-item[@aria-selected='true']//span[text()='${tabTitle}']`;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private async waitSaveButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
125
|
+
await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.ENABLED_SAVE_BUTTON_CSS), timeout);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private async waitSaveButtonDisappearance(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
129
|
+
await this.driverHelper.waitDisappearance(By.css(WorkspaceDetails.SAVE_BUTTON_CSS), attempts, polling);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private async clickOnSaveButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
133
|
+
await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.ENABLED_SAVE_BUTTON_CSS), timeout);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private async clickOnOpenButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
137
|
+
await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.OPEN_BUTTON_CSS), timeout);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
141
|
+
const workspaceDetailsTabLocator: By = By.xpath(this.getTabXpathLocator(tabTitle));
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
await this.driverHelper.waitAndClick(workspaceDetailsTabLocator, timeout);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
private async waitTabSelected(tabTitle: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
148
|
+
const selectedTabLocator: By = By.xpath(this.getSelectedTabXpathLocator(tabTitle));
|
|
149
|
+
|
|
150
|
+
await this.driverHelper.waitVisibility(selectedTabLocator, timeout);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*********************************************************************
|
|
2
|
+
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made
|
|
5
|
+
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
+
**********************************************************************/
|
|
10
|
+
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
11
|
+
import { injectable, inject } from 'inversify';
|
|
12
|
+
import 'reflect-metadata';
|
|
13
|
+
import { CLASSES, TYPES } from '../../../inversify.types';
|
|
14
|
+
import { By } from 'selenium-webdriver';
|
|
15
|
+
import { WorkspaceDetails } from './WorkspaceDetails';
|
|
16
|
+
import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
|
|
17
|
+
import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
|
|
18
|
+
import { Logger } from '../../../utils/Logger';
|
|
19
|
+
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@injectable()
|
|
23
|
+
export class WorkspaceDetailsPlugins {
|
|
24
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
25
|
+
@inject(CLASSES.WorkspaceDetails) private readonly workspaceDetails: WorkspaceDetails,
|
|
26
|
+
@inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
|
|
27
|
+
|
|
28
|
+
async waitPluginListItem(pluginName: string) {
|
|
29
|
+
Logger.debug(`WorkspaceDetailsPlugins.waitPluginListItem ${pluginName}`);
|
|
30
|
+
|
|
31
|
+
const pluginListItemLocator: By = By.css(this.getPluginListItemCssLocator(pluginName));
|
|
32
|
+
|
|
33
|
+
await this.driverHelper.waitVisibility(pluginListItemLocator, TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async enablePlugin(pluginName: string, pluginVersion?: string) {
|
|
37
|
+
Logger.debug(`WorkspaceDetailsPlugins.enablePlugin ${pluginName}:${pluginVersion}`);
|
|
38
|
+
|
|
39
|
+
await this.waitPluginDisabling(pluginName, pluginVersion);
|
|
40
|
+
await this.clickOnPluginListItemSwitcher(pluginName, pluginVersion);
|
|
41
|
+
await this.waitPluginEnabling(pluginName, pluginVersion);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async disablePlugin(pluginName: string, pluginVersion?: string) {
|
|
45
|
+
Logger.debug(`WorkspaceDetailsPlugins.disablePlugin ${pluginName}:${pluginVersion}`);
|
|
46
|
+
|
|
47
|
+
await this.waitPluginEnabling(pluginName, pluginVersion);
|
|
48
|
+
await this.clickOnPluginListItemSwitcher(pluginName, pluginVersion);
|
|
49
|
+
await this.waitPluginDisabling(pluginName, pluginVersion);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async addPluginAndOpenWorkspace(namespace: string, workspaceName: string, pluginName: string, pluginId: string, pluginVersion?: string) {
|
|
53
|
+
Logger.debug(`WorkspaceDetailsPlugins.addPluginAndOpenWorkspace ${namespace}/${workspaceName} plugin: ${pluginName}:${pluginVersion}`);
|
|
54
|
+
|
|
55
|
+
await this.workspaceDetails.selectTab('Plugins');
|
|
56
|
+
await this.enablePlugin(pluginName, pluginVersion);
|
|
57
|
+
await this.workspaceDetails.saveChanges();
|
|
58
|
+
await this.workspaceDetails.openWorkspace(namespace, workspaceName);
|
|
59
|
+
await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.RUNNING);
|
|
60
|
+
await this.testWorkspaceUtil.waitPluginAdding(namespace, workspaceName, pluginId);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private getPluginListItemCssLocator(pluginName: string, pluginVersion?: string): string {
|
|
64
|
+
if (pluginVersion) {
|
|
65
|
+
return `.plugin-item div[plugin-item-name*='${pluginName}'][plugin-item-version='${pluginVersion}']`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return `.plugin-item div[plugin-item-name*='${pluginName}']`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private getPluginListItemSwitcherCssLocator(pluginName: string, pluginVersion?: string): string {
|
|
72
|
+
return `${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private async clickOnPluginListItemSwitcher(pluginName: string,
|
|
76
|
+
pluginVersion?: string,
|
|
77
|
+
timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
|
|
78
|
+
|
|
79
|
+
const pluginListItemSwitcherLocator = By.css(this.getPluginListItemSwitcherCssLocator(pluginName, pluginVersion));
|
|
80
|
+
|
|
81
|
+
await this.driverHelper.waitAndClick(pluginListItemSwitcherLocator, timeout);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private async waitPluginEnabling(pluginName: string, pluginVersion?: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
85
|
+
const enabledPluginSwitcherLocator: By = By.css(`${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch[aria-checked='true']`);
|
|
86
|
+
|
|
87
|
+
await this.driverHelper.waitVisibility(enabledPluginSwitcherLocator, timeout);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private async waitPluginDisabling(pluginName: string, pluginVersion?: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
|
|
91
|
+
const disabledPluginSwitcherLocator: By = By.css(`${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch[aria-checked='false']`);
|
|
92
|
+
|
|
93
|
+
await this.driverHelper.waitVisibility(disabledPluginSwitcherLocator, timeout);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { WebElement, Button, By, Key } from 'selenium-webdriver';
|
|
16
|
+
import { Logger } from '../../utils/Logger';
|
|
17
|
+
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
18
|
+
|
|
19
|
+
@injectable()
|
|
20
|
+
export class ContextMenu {
|
|
21
|
+
private static readonly SUGGESTION_WIDGET_BODY_CSS: string = 'ul.p-Menu-content';
|
|
22
|
+
|
|
23
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
async invokeContextMenuOnTheElementWithMouse(elementLocator: By) {
|
|
27
|
+
Logger.debug(`ContextMenu.invokeContextMenuOnTheElementWithMouse ${elementLocator}`);
|
|
28
|
+
|
|
29
|
+
const webElement: WebElement = await this.driverHelper.waitVisibility(elementLocator, TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
|
|
30
|
+
await this.driverHelper.getAction().click(webElement, Button.RIGHT).perform();
|
|
31
|
+
this.waitContextMenu();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async invokeContextMenuOnActiveElementWithKeys() {
|
|
35
|
+
Logger.debug('ContextMenu.invokeContextMenuOnActiveElementWithKeys');
|
|
36
|
+
|
|
37
|
+
this.driverHelper.getDriver().switchTo().activeElement().sendKeys(Key.SHIFT + Key.F10);
|
|
38
|
+
this.waitContextMenu();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async waitContextMenuAndClickOnItem(nameOfItem: string) {
|
|
42
|
+
Logger.debug(`ContextMenu.waitContextMenuAndClickOnItem "${nameOfItem}"`);
|
|
43
|
+
|
|
44
|
+
const itemLocator: string = `//div[@class='p-Menu-itemLabel' and text()='${nameOfItem}']`;
|
|
45
|
+
await this.waitContextMenu();
|
|
46
|
+
await this.driverHelper.waitAndClick(By.xpath(itemLocator), TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async waitContextMenu() {
|
|
50
|
+
Logger.debug(`ContextMenu.waitContextMenu`);
|
|
51
|
+
|
|
52
|
+
await this.driverHelper.waitVisibility(By.css(ContextMenu.SUGGESTION_WIDGET_BODY_CSS), TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { inject, injectable } from 'inversify';
|
|
12
|
+
import { CLASSES } from '../../inversify.types';
|
|
13
|
+
import { TestConstants } from '../../TestConstants';
|
|
14
|
+
import { DriverHelper } from '../../utils/DriverHelper';
|
|
15
|
+
import { By, Key, WebElement, error } from 'selenium-webdriver';
|
|
16
|
+
import { Ide } from './Ide';
|
|
17
|
+
import { Logger } from '../../utils/Logger';
|
|
18
|
+
import { TimeoutConstants } from '../../TimeoutConstants';
|
|
19
|
+
import { AnimationChecker } from '../../utils/AnimationChecker';
|
|
20
|
+
|
|
21
|
+
@injectable()
|
|
22
|
+
export class DebugView {
|
|
23
|
+
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
24
|
+
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
25
|
+
@inject(CLASSES.AnimationChecker) private readonly animationChecker: AnimationChecker) { }
|
|
26
|
+
|
|
27
|
+
async clickOnDebugConfigurationDropDown() {
|
|
28
|
+
Logger.debug('DebugView.clickOnDebugConfigurationDropDown');
|
|
29
|
+
|
|
30
|
+
await this.driverHelper.waitAndClick(By.css('select.debug-configuration'));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async clickOnDebugConfigurationItem(itemText: string, timeout: number = TimeoutConstants.TS_DEBUGGER_CONFIGURATION_VISIBILITY_TIMEOUT) {
|
|
34
|
+
Logger.debug(`DebugView.clickOnDebugConfigurationItem "${itemText}"`);
|
|
35
|
+
|
|
36
|
+
const configurationItemLocator: By = By.xpath(`//select[contains(@class,'debug-configuration')]//option[text()=\'${itemText}\']`);
|
|
37
|
+
|
|
38
|
+
await this.animationChecker.waitDropDownAnimationEnd();
|
|
39
|
+
await this.driverHelper.waitAndClick(configurationItemLocator, timeout);
|
|
40
|
+
await this.ide.performKeyCombination(Key.ESCAPE);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async clickOnRunDebugButton() {
|
|
44
|
+
Logger.debug('DebugView.clickOnRunDebugButton');
|
|
45
|
+
|
|
46
|
+
const runDebugButtonLocator: By = By.xpath('//span[@title=\'Start Debugging\']');
|
|
47
|
+
|
|
48
|
+
await this.driverHelper.waitAndClick(runDebugButtonLocator, TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Waits for number of threads in "Threads" view to be more than 1 - this should mean that the debugger is connected.
|
|
53
|
+
*
|
|
54
|
+
* @param timeout
|
|
55
|
+
*/
|
|
56
|
+
async waitForDebuggerToConnect(timeout: number = TimeoutConstants.TS_DEBUGGER_CONNECTION_TIMEOUT) {
|
|
57
|
+
await this.driverHelper.getDriver().wait(async () => {
|
|
58
|
+
Logger.debug(`Waiting for debugger to connect (threads to appear in "Threads" view)`);
|
|
59
|
+
|
|
60
|
+
const threadsTreeLocator = `//div[contains(@class, 'theia-debug-thread')]`;
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
const threadElements: WebElement[] = await this.driverHelper.waitAllPresence(By.xpath(threadsTreeLocator));
|
|
64
|
+
if (threadElements.length > 1) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
} catch (err) {
|
|
69
|
+
if (!(err instanceof error.TimeoutError)) {
|
|
70
|
+
throw err;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
74
|
+
}
|
|
75
|
+
}, timeout);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Click on "Threads" view title.
|
|
80
|
+
*/
|
|
81
|
+
async clickOnThreadsViewTitle() {
|
|
82
|
+
Logger.debug(`Click on "Threads" view title`);
|
|
83
|
+
|
|
84
|
+
const threadsViewTitleLocator: By = By.xpath('//div[@id="debug:view-container:-1--debug:threads:-1"]/*/span[@title="Threads"]');
|
|
85
|
+
await this.driverHelper.waitAndClick(threadsViewTitleLocator);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}
|