@eclipse-che/che-e2e 7.62.0 → 7.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/inversify.config.ts +88 -0
- package/{inversify.types.ts → configs/inversify.types.ts} +6 -9
- package/configs/mocharc.ts +21 -0
- package/{generateIndex.sh → configs/sh-scripts/generateIndex.sh} +8 -10
- package/{initDevfileTests.sh → configs/sh-scripts/initDevfileTests.sh} +18 -27
- package/{TestConstants.ts → constants/TestConstants.ts} +1 -1
- package/{TimeoutConstants.ts → constants/TimeoutConstants.ts} +1 -1
- package/dist/configs/inversify.config.js +81 -0
- package/dist/configs/inversify.config.js.map +1 -0
- package/dist/{inversify.types.js → configs/inversify.types.js} +5 -8
- package/dist/configs/inversify.types.js.map +1 -0
- package/dist/configs/mocharc.js +20 -0
- package/dist/configs/mocharc.js.map +1 -0
- package/dist/{TestConstants.js → constants/TestConstants.js} +1 -1
- package/dist/constants/TestConstants.js.map +1 -0
- package/dist/{TimeoutConstants.js → constants/TimeoutConstants.js} +1 -1
- package/dist/constants/TimeoutConstants.js.map +1 -0
- package/dist/driver/ChromeDriver.js +2 -2
- package/dist/driver/ChromeDriver.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +4 -4
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +4 -4
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +3 -3
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +10 -8
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js +3 -3
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.js.map +1 -1
- package/dist/pageobjects/login/ICheLoginPage.js +1 -1
- package/dist/pageobjects/login/IOcpLoginPage.js +1 -1
- package/dist/pageobjects/login/MultiUserLoginPage.js +3 -3
- package/dist/pageobjects/login/MultiUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/OcpUserLoginPage.js +3 -3
- package/dist/pageobjects/login/OcpUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js +4 -4
- package/dist/pageobjects/login/RegularUserOcpCheLoginPage.js.map +1 -1
- package/dist/pageobjects/login/UpdateAccountInformationPage.js +2 -2
- package/dist/pageobjects/login/UpdateAccountInformationPage.js.map +1 -1
- package/dist/pageobjects/openshift/CheLoginPage.js +3 -3
- package/dist/pageobjects/openshift/CheLoginPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpLoginPage.js +4 -4
- package/dist/pageobjects/openshift/OcpLoginPage.js.map +1 -1
- package/dist/pageobjects/third-parties/GitLoginPage.js +4 -4
- package/dist/pageobjects/third-parties/GitLoginPage.js.map +1 -1
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js +3 -3
- package/dist/pageobjects/third-parties/GitOauthAppsSettings.js.map +1 -1
- package/dist/{tests → specs}/MochaHooks.js +32 -18
- package/dist/specs/MochaHooks.js.map +1 -0
- package/dist/{tests/devfiles/che-code → specs/devfiles}/EmptyWorkspace.spec.js +10 -11
- package/dist/specs/devfiles/EmptyWorkspace.spec.js.map +1 -0
- package/dist/{tests → specs}/login/LinkCheAndOcpUsers.spec.js +13 -12
- package/dist/specs/login/LinkCheAndOcpUsers.spec.js.map +1 -0
- package/dist/{utils/AnimationChecker.js → tests-library/LoginTests.js} +26 -18
- package/dist/tests-library/LoginTests.js.map +1 -0
- package/dist/{testsLibrary/che-code/ProjectAndFileTestsCheCode.js → tests-library/ProjectAndFileTests.js} +11 -11
- package/dist/tests-library/ProjectAndFileTests.js.map +1 -0
- package/dist/{testsLibrary → tests-library}/WorkspaceHandlingTests.js +4 -4
- package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -0
- package/dist/utils/BrowserTabsUtil.js +3 -3
- package/dist/utils/BrowserTabsUtil.js.map +1 -1
- package/dist/{driver → utils}/CheReporter.js +6 -10
- package/dist/utils/CheReporter.js.map +1 -0
- package/dist/utils/DriverHelper.js +3 -3
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/Logger.js +2 -2
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/Sanitizer.js +1 -1
- package/dist/utils/ScreenCatcher.js +7 -7
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/WorkspaceNameHandler.js +2 -2
- package/dist/utils/WorkspaceNameHandler.js.map +1 -1
- package/dist/utils/{requestHandlers → request-handlers}/CheApiRequestHandler.js +3 -3
- package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/headers/CheMultiuserAuthorizationHeaderHandler.js +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/headers/IAuthorizationHeaderHandler.js +1 -1
- package/dist/utils/request-handlers/headers/IAuthorizationHeaderHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/tokens/CheMultiuserTokenHandler.js +2 -2
- package/dist/utils/request-handlers/tokens/CheMultiuserTokenHandler.js.map +1 -0
- package/dist/utils/{requestHandlers → request-handlers}/tokens/ITokenHandler.js +1 -1
- package/dist/utils/request-handlers/tokens/ITokenHandler.js.map +1 -0
- package/dist/utils/{VCS → vsc}/CheGitApi.js +2 -2
- package/dist/utils/vsc/CheGitApi.js.map +1 -0
- package/dist/utils/{VCS → vsc}/github/GitHubUtil.js.map +1 -1
- package/dist/utils/workspace/ApiUrlResolver.js +3 -3
- package/dist/utils/workspace/ApiUrlResolver.js.map +1 -1
- package/dist/utils/workspace/ITestWorkspaceUtil.js +1 -1
- package/dist/utils/workspace/TestWorkspaceUtil.js +4 -4
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/dist/utils/workspace/WorkspaceStatus.js +1 -1
- package/driver/ChromeDriver.ts +2 -2
- package/driver/IDriver.ts +1 -1
- package/package.json +6 -37
- package/pageobjects/dashboard/CreateWorkspace.ts +4 -4
- package/pageobjects/dashboard/Dashboard.ts +4 -4
- package/pageobjects/dashboard/Workspaces.ts +3 -3
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +8 -8
- package/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts +3 -4
- package/pageobjects/login/ICheLoginPage.ts +1 -1
- package/pageobjects/login/IOcpLoginPage.ts +1 -1
- package/pageobjects/login/MultiUserLoginPage.ts +3 -3
- package/pageobjects/login/OcpUserLoginPage.ts +3 -3
- package/pageobjects/login/RegularUserOcpCheLoginPage.ts +4 -4
- package/pageobjects/login/UpdateAccountInformationPage.ts +2 -2
- package/pageobjects/openshift/CheLoginPage.ts +3 -3
- package/pageobjects/openshift/OcpLoginPage.ts +4 -4
- package/pageobjects/third-parties/GitLoginPage.ts +4 -4
- package/pageobjects/third-parties/GitOauthAppsSettings.ts +3 -3
- package/specs/MochaHooks.ts +72 -0
- package/{tests/devfiles/che-code → specs/devfiles}/EmptyWorkspace.spec.ts +12 -9
- package/{tests → specs}/login/LinkCheAndOcpUsers.spec.ts +5 -4
- package/tests-library/LoginTests.ts +35 -0
- package/{testsLibrary/che-code/ProjectAndFileTestsCheCode.ts → tests-library/ProjectAndFileTests.ts} +6 -6
- package/{testsLibrary → tests-library}/WorkspaceHandlingTests.ts +4 -4
- package/utils/BrowserTabsUtil.ts +3 -3
- package/{driver → utils}/CheReporter.ts +10 -15
- package/utils/DriverHelper.ts +4 -4
- package/utils/Logger.ts +2 -2
- package/utils/Sanitizer.ts +1 -1
- package/utils/ScreenCatcher.ts +3 -3
- package/utils/WorkspaceNameHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/CheApiRequestHandler.ts +3 -3
- package/utils/{requestHandlers → request-handlers}/headers/CheMultiuserAuthorizationHeaderHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/headers/IAuthorizationHeaderHandler.ts +1 -1
- package/utils/{requestHandlers → request-handlers}/tokens/CheMultiuserTokenHandler.ts +2 -2
- package/utils/{requestHandlers → request-handlers}/tokens/ITokenHandler.ts +1 -1
- package/utils/{VCS → vsc}/CheGitApi.ts +2 -6
- package/utils/workspace/ApiUrlResolver.ts +3 -3
- package/utils/workspace/ITestWorkspaceUtil.ts +1 -1
- package/utils/workspace/TestWorkspaceUtil.ts +4 -4
- package/utils/workspace/WorkspaceStatus.ts +1 -1
- package/dist/TestConstants.js.map +0 -1
- package/dist/TimeoutConstants.js.map +0 -1
- package/dist/driver/CheReporter.js.map +0 -1
- package/dist/index.js +0 -94
- package/dist/index.js.map +0 -1
- package/dist/inversify.config.js +0 -133
- package/dist/inversify.config.js.map +0 -1
- package/dist/inversify.types.js.map +0 -1
- package/dist/pageobjects/ide/theia/ContextMenu.js +0 -66
- package/dist/pageobjects/ide/theia/ContextMenu.js.map +0 -1
- package/dist/pageobjects/ide/theia/DebugView.js +0 -98
- package/dist/pageobjects/ide/theia/DebugView.js.map +0 -1
- package/dist/pageobjects/ide/theia/DialogWindow.js +0 -102
- package/dist/pageobjects/ide/theia/DialogWindow.js.map +0 -1
- package/dist/pageobjects/ide/theia/Editor.js +0 -463
- package/dist/pageobjects/ide/theia/Editor.js.map +0 -1
- package/dist/pageobjects/ide/theia/Ide.js +0 -336
- package/dist/pageobjects/ide/theia/Ide.js.map +0 -1
- package/dist/pageobjects/ide/theia/LeftToolBar.js +0 -81
- package/dist/pageobjects/ide/theia/LeftToolBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/NavigationBar.js +0 -57
- package/dist/pageobjects/ide/theia/NavigationBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/NotificationCenter.js +0 -76
- package/dist/pageobjects/ide/theia/NotificationCenter.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenDialogWidget.js +0 -100
- package/dist/pageobjects/ide/theia/OpenDialogWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenEditors.js +0 -73
- package/dist/pageobjects/ide/theia/OpenEditors.js.map +0 -1
- package/dist/pageobjects/ide/theia/OpenWorkspaceWidget.js +0 -62
- package/dist/pageobjects/ide/theia/OpenWorkspaceWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/PreviewWidget.js +0 -134
- package/dist/pageobjects/ide/theia/PreviewWidget.js.map +0 -1
- package/dist/pageobjects/ide/theia/ProjectTree.js +0 -282
- package/dist/pageobjects/ide/theia/ProjectTree.js.map +0 -1
- package/dist/pageobjects/ide/theia/QuickOpenContainer.js +0 -70
- package/dist/pageobjects/ide/theia/QuickOpenContainer.js.map +0 -1
- package/dist/pageobjects/ide/theia/RightToolBar.js +0 -51
- package/dist/pageobjects/ide/theia/RightToolBar.js.map +0 -1
- package/dist/pageobjects/ide/theia/Terminal.js +0 -184
- package/dist/pageobjects/ide/theia/Terminal.js.map +0 -1
- package/dist/pageobjects/ide/theia/TopMenu.js +0 -109
- package/dist/pageobjects/ide/theia/TopMenu.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.js +0 -128
- package/dist/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/GitPlugin.js +0 -120
- package/dist/pageobjects/ide/theia/plugins/GitPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/KubernetesPlugin.js +0 -107
- package/dist/pageobjects/ide/theia/plugins/KubernetesPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/OpenshiftPlugin.js +0 -99
- package/dist/pageobjects/ide/theia/plugins/OpenshiftPlugin.js.map +0 -1
- package/dist/pageobjects/ide/theia/plugins/PluginsView.js +0 -166
- package/dist/pageobjects/ide/theia/plugins/PluginsView.js.map +0 -1
- package/dist/tests/MochaHooks.js.map +0 -1
- package/dist/tests/devfiles/che-code/EmptyWorkspace.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/CSlashCPlusPlus.spec.js +0 -73
- package/dist/tests/devfiles/theia/CSlashCPlusPlus.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/DevfileSmoke.spec.js +0 -47
- package/dist/tests/devfiles/theia/DevfileSmoke.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/DotNetCore.spec.js +0 -81
- package/dist/tests/devfiles/theia/DotNetCore.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Go.spec.js +0 -72
- package/dist/tests/devfiles/theia/Go.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaMaven.spec.js +0 -60
- package/dist/tests/devfiles/theia/JavaMaven.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaSpringBoot.spec.js +0 -66
- package/dist/tests/devfiles/theia/JavaSpringBoot.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/JavaVertx.spec.js +0 -60
- package/dist/tests/devfiles/theia/JavaVertx.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/NodeJS.spec.js +0 -64
- package/dist/tests/devfiles/theia/NodeJS.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/PHPSimple.spec.js +0 -74
- package/dist/tests/devfiles/theia/PHPSimple.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Python.spec.js +0 -58
- package/dist/tests/devfiles/theia/Python.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/PythonDjango.spec.js +0 -61
- package/dist/tests/devfiles/theia/PythonDjango.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Quarkus.spec.js +0 -69
- package/dist/tests/devfiles/theia/Quarkus.spec.js.map +0 -1
- package/dist/tests/devfiles/theia/Scala.spec.js +0 -66
- package/dist/tests/devfiles/theia/Scala.spec.js.map +0 -1
- package/dist/tests/e2e/theia/FactoryUrl.spec.js +0 -40
- package/dist/tests/e2e/theia/FactoryUrl.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitPublishBranch.spec.js +0 -90
- package/dist/tests/e2e/theia/GitPublishBranch.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitSelfSignCert.spec.js +0 -90
- package/dist/tests/e2e/theia/GitSelfSignCert.spec.js.map +0 -1
- package/dist/tests/e2e/theia/GitSsh.spec.js +0 -120
- package/dist/tests/e2e/theia/GitSsh.spec.js.map +0 -1
- package/dist/tests/e2e/theia/OpenshiftConnector.spec.js +0 -124
- package/dist/tests/e2e/theia/OpenshiftConnector.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js +0 -50
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.js +0 -48
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.js.map +0 -1
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js +0 -48
- package/dist/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.js.map +0 -1
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js +0 -277
- package/dist/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.js.map +0 -1
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js +0 -314
- package/dist/tests/e2e_happy_path/theia/HappyPath.spec.js.map +0 -1
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js +0 -39
- package/dist/tests/intelij/IntelijOpenWorkspace.spec.js.map +0 -1
- package/dist/tests/load_test/theia/LoadTest.spec.js +0 -41
- package/dist/tests/load_test/theia/LoadTest.spec.js.map +0 -1
- package/dist/tests/login/LinkCheAndOcpUsers.spec.js.map +0 -1
- package/dist/tests/login/Login.spec.js +0 -28
- package/dist/tests/login/Login.spec.js.map +0 -1
- package/dist/tests/plugins/theia/GitHubPullRequestPlugin.spec.js +0 -117
- package/dist/tests/plugins/theia/GitHubPullRequestPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/InstallPluginUsingUI.spec.js +0 -62
- package/dist/tests/plugins/theia/InstallPluginUsingUI.spec.js.map +0 -1
- package/dist/tests/plugins/theia/JavaPlugin.spec.js +0 -82
- package/dist/tests/plugins/theia/JavaPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/PhpPlugin.spec.js +0 -96
- package/dist/tests/plugins/theia/PhpPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/PythonPlugin.spec.js +0 -72
- package/dist/tests/plugins/theia/PythonPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/TypescriptPlugin.spec.js +0 -135
- package/dist/tests/plugins/theia/TypescriptPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeKubernetesPlugin.spec.js +0 -69
- package/dist/tests/plugins/theia/VscodeKubernetesPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeShellcheckPlugin.spec.js +0 -82
- package/dist/tests/plugins/theia/VscodeShellcheckPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeValePlugin.spec.js +0 -70
- package/dist/tests/plugins/theia/VscodeValePlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeXmlPlugin.spec.js +0 -81
- package/dist/tests/plugins/theia/VscodeXmlPlugin.spec.js.map +0 -1
- package/dist/tests/plugins/theia/VscodeYamlPlugin.spec.js +0 -78
- package/dist/tests/plugins/theia/VscodeYamlPlugin.spec.js.map +0 -1
- package/dist/testsLibrary/WorkspaceHandlingTests.js.map +0 -1
- package/dist/testsLibrary/che-code/ProjectAndFileTestsCheCode.js.map +0 -1
- package/dist/testsLibrary/theia/CodeExecutionTestsTheia.js +0 -248
- package/dist/testsLibrary/theia/CodeExecutionTestsTheia.js.map +0 -1
- package/dist/testsLibrary/theia/LanguageServerTestsTheia.js +0 -230
- package/dist/testsLibrary/theia/LanguageServerTestsTheia.js.map +0 -1
- package/dist/testsLibrary/theia/ProjectAndFileTestsTheia.js +0 -133
- package/dist/testsLibrary/theia/ProjectAndFileTestsTheia.js.map +0 -1
- package/dist/utils/AnimationChecker.js.map +0 -1
- package/dist/utils/VCS/CheGitApi.js.map +0 -1
- package/dist/utils/requestHandlers/CheApiRequestHandler.js.map +0 -1
- package/dist/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +0 -1
- package/dist/utils/requestHandlers/headers/IAuthorizationHeaderHandler.js.map +0 -1
- package/dist/utils/requestHandlers/tokens/CheMultiuserTokenHandler.js.map +0 -1
- package/dist/utils/requestHandlers/tokens/ITokenHandler.js.map +0 -1
- package/dist/utils/theia/PreferencesHandlerTheia.js +0 -142
- package/dist/utils/theia/PreferencesHandlerTheia.js.map +0 -1
- package/index.ts +0 -69
- package/initPluginTest.sh +0 -9
- package/inversify.config.ts +0 -141
- package/mocha-all-devfiles-che-code.json +0 -12
- package/mocha-all-devfiles-theia.json +0 -15
- package/mocha-all-factories-che-code.json +0 -14
- package/mocha-all-factories-theia.json +0 -16
- package/mocha-all-plugins-che-code.json +0 -13
- package/mocha-all-plugins-theia.json +0 -15
- package/mocha-che-code.json +0 -12
- package/mocha-connector-theia.json +0 -12
- package/mocha-devworkspace-happy-path-che-code.json +0 -13
- package/mocha-devworkspace-happy-path-theia.json +0 -14
- package/mocha-empty-workspace-devworkspace-happy-path-che-code.json +0 -14
- package/mocha-factory-che-code.json +0 -13
- package/mocha-factory-theia.json +0 -14
- package/mocha-git-publish-branch-theia.json +0 -14
- package/mocha-git-self-sign-cert-theia.json +0 -14
- package/mocha-git-ssh-theia.json +0 -14
- package/mocha-happy-path-che-code.json +0 -14
- package/mocha-happy-path-theia.json +0 -15
- package/mocha-java-maven.json +0 -13
- package/mocha-java-springboot-che-code.json +0 -12
- package/mocha-java-springboot-theia.json +0 -13
- package/mocha-java-vertx-che-code.json +0 -12
- package/mocha-java-vertx-theia.json +0 -13
- package/mocha-load-theia.json +0 -12
- package/mocha-scala.json +0 -13
- package/mocha-single-devfile.json +0 -11
- package/mocha-theia.json +0 -12
- package/mocha-ws-creation-and-ls-theia.json +0 -12
- package/mocha.intelij.json +0 -13
- package/mocha.ocp.link.json +0 -11
- package/mocha.single.plugin.json +0 -8
- package/pageobjects/ide/theia/ContextMenu.ts +0 -55
- package/pageobjects/ide/theia/DebugView.ts +0 -88
- package/pageobjects/ide/theia/DialogWindow.ts +0 -101
- package/pageobjects/ide/theia/Editor.ts +0 -601
- package/pageobjects/ide/theia/Ide.ts +0 -393
- package/pageobjects/ide/theia/LeftToolBar.ts +0 -81
- package/pageobjects/ide/theia/NavigationBar.ts +0 -41
- package/pageobjects/ide/theia/NotificationCenter.ts +0 -75
- package/pageobjects/ide/theia/OpenDialogWidget.ts +0 -92
- package/pageobjects/ide/theia/OpenEditors.ts +0 -63
- package/pageobjects/ide/theia/OpenWorkspaceWidget.ts +0 -48
- package/pageobjects/ide/theia/PreviewWidget.ts +0 -142
- package/pageobjects/ide/theia/ProjectTree.ts +0 -338
- package/pageobjects/ide/theia/QuickOpenContainer.ts +0 -59
- package/pageobjects/ide/theia/RightToolBar.ts +0 -34
- package/pageobjects/ide/theia/Terminal.ts +0 -219
- package/pageobjects/ide/theia/TopMenu.ts +0 -103
- package/pageobjects/ide/theia/plugins/GitHubPullRequestPlugin.ts +0 -130
- package/pageobjects/ide/theia/plugins/GitPlugin.ts +0 -118
- package/pageobjects/ide/theia/plugins/KubernetesPlugin.ts +0 -113
- package/pageobjects/ide/theia/plugins/OpenshiftPlugin.ts +0 -87
- package/pageobjects/ide/theia/plugins/PluginsView.ts +0 -191
- package/tests/MochaHooks.ts +0 -57
- package/tests/devfiles/theia/CSlashCPlusPlus.spec.ts +0 -78
- package/tests/devfiles/theia/DevfileSmoke.spec.ts +0 -50
- package/tests/devfiles/theia/DotNetCore.spec.ts +0 -87
- package/tests/devfiles/theia/Go.spec.ts +0 -81
- package/tests/devfiles/theia/JavaMaven.spec.ts +0 -64
- package/tests/devfiles/theia/JavaSpringBoot.spec.ts +0 -71
- package/tests/devfiles/theia/JavaVertx.spec.ts +0 -65
- package/tests/devfiles/theia/NodeJS.spec.ts +0 -71
- package/tests/devfiles/theia/PHPSimple.spec.ts +0 -80
- package/tests/devfiles/theia/Python.spec.ts +0 -64
- package/tests/devfiles/theia/PythonDjango.spec.ts +0 -67
- package/tests/devfiles/theia/Quarkus.spec.ts +0 -76
- package/tests/devfiles/theia/Scala.spec.ts +0 -70
- package/tests/e2e/theia/FactoryUrl.spec.ts +0 -47
- package/tests/e2e/theia/GitPublishBranch.spec.ts +0 -109
- package/tests/e2e/theia/GitSelfSignCert.spec.ts +0 -110
- package/tests/e2e/theia/GitSsh.spec.ts +0 -144
- package/tests/e2e/theia/OpenshiftConnector.spec.ts +0 -144
- package/tests/e2e/theia/factories/DirectUrlFactoryWithKeepDirectoryTest.spec.ts +0 -60
- package/tests/e2e/theia/factories/DirectUrlFactoryWithRootFolderTest.spec.ts +0 -57
- package/tests/e2e/theia/factories/DirectUrlFactoryWithSpecificBranchTest.spec.ts +0 -57
- package/tests/e2e_happy_path/theia/DevWorkspaceHappyPath.spec.ts +0 -294
- package/tests/e2e_happy_path/theia/HappyPath.spec.ts +0 -348
- package/tests/intelij/IntelijOpenWorkspace.spec.ts +0 -47
- package/tests/load_test/theia/LoadTest.spec.ts +0 -55
- package/tests/login/Login.spec.ts +0 -31
- package/tests/plugins/theia/GitHubPullRequestPlugin.spec.ts +0 -147
- package/tests/plugins/theia/InstallPluginUsingUI.spec.ts +0 -77
- package/tests/plugins/theia/JavaPlugin.spec.ts +0 -100
- package/tests/plugins/theia/PhpPlugin.spec.ts +0 -115
- package/tests/plugins/theia/PythonPlugin.spec.ts +0 -86
- package/tests/plugins/theia/TypescriptPlugin.spec.ts +0 -168
- package/tests/plugins/theia/VscodeKubernetesPlugin.spec.ts +0 -83
- package/tests/plugins/theia/VscodeShellcheckPlugin.spec.ts +0 -100
- package/tests/plugins/theia/VscodeValePlugin.spec.ts +0 -85
- package/tests/plugins/theia/VscodeXmlPlugin.spec.ts +0 -104
- package/tests/plugins/theia/VscodeYamlPlugin.spec.ts +0 -99
- package/testsLibrary/theia/CodeExecutionTestsTheia.ts +0 -220
- package/testsLibrary/theia/LanguageServerTestsTheia.ts +0 -205
- package/testsLibrary/theia/ProjectAndFileTestsTheia.ts +0 -113
- package/utils/AnimationChecker.ts +0 -27
- package/utils/theia/PreferencesHandlerTheia.ts +0 -123
- /package/{initDefaultValues.sh → configs/sh-scripts/initDefaultValues.sh} +0 -0
- /package/dist/utils/{VCS → vsc}/github/GitHubUtil.js +0 -0
- /package/utils/{VCS → vsc}/github/GitHubUtil.ts +0 -0
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2022 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 { By } from 'selenium-webdriver';
|
|
16
|
-
import { Logger } from '../../../utils/Logger';
|
|
17
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
18
|
-
|
|
19
|
-
@injectable()
|
|
20
|
-
export class OpenEditors {
|
|
21
|
-
private static readonly OPEN_EDITORS_WIDGET_LOCATOR: By = By.id('explorer-view-container--theia-open-editors-widget');
|
|
22
|
-
private static readonly OPEN_EDITORS_CONTAINER_LOCATOR: By = By.css('#theia-left-side-panel #explorer-view-container--theia-open-editors-widget .theia-TreeContainer');
|
|
23
|
-
private static readonly OPEN_EDITORS_EXPANSION_TOGGLE_LOCATOR: By = By.css('#theia-left-side-panel #explorer-view-container--theia-open-editors-widget .theia-ExpansionToggle.codicon.codicon-chevron-down');
|
|
24
|
-
private static readonly OPEN_EDITORS_EXPANSION_TOGGLE_COLLAPSED_LOCATOR: By = By.css('#theia-left-side-panel #explorer-view-container--theia-open-editors-widget .theia-ExpansionToggle.codicon.codicon-chevron-down.theia-mod-collapsed');
|
|
25
|
-
private static readonly OPEN_EDITORS_CLOSE_ALL_BUTTON_LOCATOR: By = By.id('navigator.close.all.editors.toolbar');
|
|
26
|
-
|
|
27
|
-
constructor(
|
|
28
|
-
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper
|
|
29
|
-
) { }
|
|
30
|
-
|
|
31
|
-
async waitOpenEditors(timeout: number = TimeoutConstants.TS_OPEN_EDITORS_TIMEOUT) {
|
|
32
|
-
Logger.debug('OpenEditors.waitOpenEditors');
|
|
33
|
-
|
|
34
|
-
await this.driverHelper.waitPresence(OpenEditors.OPEN_EDITORS_WIDGET_LOCATOR, timeout);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async waitOpenEditorsContainer(timeout: number = TimeoutConstants.TS_OPEN_EDITORS_TIMEOUT) {
|
|
38
|
-
Logger.debug('OpenEditors.waitOpenEditorsContainer');
|
|
39
|
-
|
|
40
|
-
await this.driverHelper.waitPresence(OpenEditors.OPEN_EDITORS_CONTAINER_LOCATOR, timeout);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async clickCloseAllEditors(timeout: number = TimeoutConstants.TS_OPEN_EDITORS_CLICK_ON_ITEM_TIMEOUT) {
|
|
44
|
-
Logger.debug('OpenEditors.clickCloseAllEditors');
|
|
45
|
-
|
|
46
|
-
await this.driverHelper.waitAndClick(OpenEditors.OPEN_EDITORS_CLOSE_ALL_BUTTON_LOCATOR, timeout);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async waitAndClickExpansionToggle(timeout: number = TimeoutConstants.TS_OPEN_EDITORS_CLICK_ON_ITEM_TIMEOUT) {
|
|
50
|
-
Logger.debug('OpenEditors.waitAndClickExpansionToggle');
|
|
51
|
-
|
|
52
|
-
Logger.trace('OpenEditors.waitAndClickExpansionToggle waiting for presence of expansion toggle');
|
|
53
|
-
await this.driverHelper.waitPresence(OpenEditors.OPEN_EDITORS_EXPANSION_TOGGLE_LOCATOR);
|
|
54
|
-
Logger.trace('OpenEditors.waitAndClickExpansionToggle expansion toggle located, clicking.');
|
|
55
|
-
await this.driverHelper.waitAndClick(OpenEditors.OPEN_EDITORS_EXPANSION_TOGGLE_LOCATOR, timeout);
|
|
56
|
-
Logger.trace('OpenEditors.waitAndClickExpansionToggle expansion toggle clicked.');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async isExpansionToggleCollapsed(timeout: number = TimeoutConstants.TS_OPEN_EDITORS_CLICK_ON_ITEM_TIMEOUT): Promise<boolean> {
|
|
60
|
-
Logger.debug('OpenEditors.isExpansionToggleCollapsed');
|
|
61
|
-
return await this.driverHelper.waitVisibilityBoolean(OpenEditors.OPEN_EDITORS_EXPANSION_TOGGLE_COLLAPSED_LOCATOR, 1, timeout);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import { injectable, inject } from 'inversify';
|
|
12
|
-
import { CLASSES } from '../../../inversify.types';
|
|
13
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
14
|
-
import { By } from 'selenium-webdriver';
|
|
15
|
-
import { Logger } from '../../../utils/Logger';
|
|
16
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
17
|
-
|
|
18
|
-
@injectable()
|
|
19
|
-
export class OpenWorkspaceWidget {
|
|
20
|
-
|
|
21
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async selectItemInTree(pathToItem: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
25
|
-
Logger.debug(`OpenWorkspaceWidget.selectItemInTree "${pathToItem}"`);
|
|
26
|
-
|
|
27
|
-
await this.driverHelper.waitAndClick(By.id(pathToItem), timeout);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async expandTreeToPath(path: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<any> {
|
|
31
|
-
Logger.debug(`OpenWorkspaceWidget.expandTreeToPath "${path}"`);
|
|
32
|
-
const pathNodes: string[] = path.split('/');
|
|
33
|
-
let buildPath: string = '';
|
|
34
|
-
|
|
35
|
-
const promises = pathNodes.map(async (currentPath, index) => {
|
|
36
|
-
buildPath += `/${currentPath}`;
|
|
37
|
-
|
|
38
|
-
// the first item (index=0 -> /<item-1>) has locator which can be found 'By.id', but next (index=1 -> /<item-1>/<item-2>) requires another - 'By.xpath'.
|
|
39
|
-
if (index === 0) {
|
|
40
|
-
await this.driverHelper.waitAndClick(By.id(buildPath), timeout);
|
|
41
|
-
} else {
|
|
42
|
-
await this.driverHelper.waitAndClick(By.xpath(`(//div[@id='${buildPath}'])[position()=2]`), timeout);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
return Promise.all(promises);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import { injectable, inject } from 'inversify';
|
|
12
|
-
import { CLASSES } from '../../../inversify.types';
|
|
13
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
14
|
-
import { By, error, Key } from 'selenium-webdriver';
|
|
15
|
-
import { TestConstants } from '../../../TestConstants';
|
|
16
|
-
import { Ide } from './Ide';
|
|
17
|
-
import { Logger } from '../../../utils/Logger';
|
|
18
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Preview widget is no longer a valid page fragment.
|
|
22
|
-
*/
|
|
23
|
-
@injectable()
|
|
24
|
-
export class PreviewWidget {
|
|
25
|
-
private static readonly WIDGET_LOCATOR: By = By.css('div.theia-mini-browser');
|
|
26
|
-
private static readonly WIDGET_IFRAME_LOCATOR: By = By.css('div.theia-mini-browser iframe');
|
|
27
|
-
private static readonly WIDGET_URL_LOCATOR: By = By.css('div.theia-mini-browser input');
|
|
28
|
-
private static readonly WIDGET_REFRESH_BUTTON_LOCATOR: By = By.css('div.theia-mini-browser-refresh.theia-mini-browser-button');
|
|
29
|
-
|
|
30
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
31
|
-
@inject(CLASSES.Ide) private readonly ide: Ide) { }
|
|
32
|
-
|
|
33
|
-
async waitUrl(expectedUrl: string, timeout: number = TimeoutConstants.TS_WAIT_URL_TIMEOUT) {
|
|
34
|
-
Logger.debug(`PreviewWidget.waitUrl ${expectedUrl}`);
|
|
35
|
-
|
|
36
|
-
await this.driverHelper.waitAttributeValue(PreviewWidget.WIDGET_URL_LOCATOR, 'value', expectedUrl, timeout);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async getUrl(timeout: number = TimeoutConstants.TS_WAIT_URL_TIMEOUT): Promise<string> {
|
|
40
|
-
Logger.debug(`PreviewWidget.getUrl`);
|
|
41
|
-
|
|
42
|
-
return await this.driverHelper.waitAndGetElementAttribute(PreviewWidget.WIDGET_URL_LOCATOR, 'value', timeout);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async typeUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
46
|
-
Logger.debug(`PreviewWidget.typeUrl ${url}`);
|
|
47
|
-
|
|
48
|
-
await this.driverHelper.type(PreviewWidget.WIDGET_URL_LOCATOR, url, timeout);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async clearUrl() {
|
|
52
|
-
Logger.debug('PreviewWidget.clearUrl');
|
|
53
|
-
|
|
54
|
-
await this.typeUrl(Key.chord(Key.CONTROL, 'a', Key.DELETE));
|
|
55
|
-
await this.waitUrl('');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async typeAndApplyUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
|
|
59
|
-
Logger.debug(`PreviewWidget.typeAndApplyUrl ${url}`);
|
|
60
|
-
|
|
61
|
-
await this.clearUrl();
|
|
62
|
-
await this.typeUrl(Key.chord(url, Key.ENTER), timeout);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async waitApplicationOpened(expectedUrl: string, timeout: number) {
|
|
66
|
-
Logger.debug(`PreviewWidget.waitApplicationOpened ${expectedUrl}`);
|
|
67
|
-
|
|
68
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
69
|
-
try {
|
|
70
|
-
await this.waitUrl(expectedUrl, timeout / 5);
|
|
71
|
-
return true;
|
|
72
|
-
} catch (err) {
|
|
73
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
74
|
-
throw err;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
await this.typeAndApplyUrl(expectedUrl, timeout);
|
|
78
|
-
}
|
|
79
|
-
}, timeout);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated Method deprecated. Iframe is not available anymore
|
|
84
|
-
*/
|
|
85
|
-
async waitAndSwitchToWidgetFrame() {
|
|
86
|
-
Logger.debug('PreviewWidget.waitAndSwitchToWidgetFrame');
|
|
87
|
-
|
|
88
|
-
await this.driverHelper.waitAndSwitchToFrame(PreviewWidget.WIDGET_IFRAME_LOCATOR, TimeoutConstants.TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async waitPreviewWidgetAbsence() {
|
|
92
|
-
Logger.debug('PreviewWidget.waitPreviewWidgetAbsence');
|
|
93
|
-
|
|
94
|
-
await this.driverHelper.waitDisappearance(PreviewWidget.WIDGET_LOCATOR);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async waitContentAvailable(contentLocator: By,
|
|
98
|
-
timeout: number,
|
|
99
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5) {
|
|
100
|
-
|
|
101
|
-
Logger.debug(`PreviewWidget.waitContentAvailable ${contentLocator}`);
|
|
102
|
-
|
|
103
|
-
await this.waitAndSwitchToWidgetFrame();
|
|
104
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
105
|
-
const isApplicationTitleVisible: boolean = await this.driverHelper.isVisible(contentLocator);
|
|
106
|
-
if (isApplicationTitleVisible) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
await this.driverHelper.wait(polling);
|
|
111
|
-
}, timeout);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
async waitVisibility(element: By, timeout: number) {
|
|
115
|
-
Logger.debug(`PreviewWidget.waitVisibility ${element}`);
|
|
116
|
-
|
|
117
|
-
await this.driverHelper.waitVisibility(element, timeout);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
async waitAndClick(element: By, timeout: number = TimeoutConstants.TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT) {
|
|
121
|
-
Logger.debug(`PreviewWidget.waitAndClick ${element}`);
|
|
122
|
-
|
|
123
|
-
await this.driverHelper.waitAndClick(element, timeout);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
async refreshPage() {
|
|
127
|
-
Logger.debug('PreviewWidget.refreshPage');
|
|
128
|
-
|
|
129
|
-
await this.driverHelper.waitAndClick(PreviewWidget.WIDGET_REFRESH_BUTTON_LOCATOR);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @deprecated Method deprecated. Iframe is not available.
|
|
134
|
-
*/
|
|
135
|
-
async switchBackToIdeFrame() {
|
|
136
|
-
Logger.debug('PreviewWidget.switchBackToIdeFrame');
|
|
137
|
-
|
|
138
|
-
await this.driverHelper.getDriver().switchTo().defaultContent();
|
|
139
|
-
await this.ide.waitAndSwitchToIdeFrame();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
}
|
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import 'reflect-metadata';
|
|
12
|
-
import { injectable, inject } from 'inversify';
|
|
13
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
14
|
-
import { CLASSES } from '../../../inversify.types';
|
|
15
|
-
import { Ide, LeftToolbarButton } from './Ide';
|
|
16
|
-
import { TestConstants } from '../../../TestConstants';
|
|
17
|
-
import { By, error } from 'selenium-webdriver';
|
|
18
|
-
import { Editor } from './Editor';
|
|
19
|
-
import { Logger } from '../../../utils/Logger';
|
|
20
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
21
|
-
import { BrowserTabsUtil } from '../../../utils/BrowserTabsUtil';
|
|
22
|
-
|
|
23
|
-
@injectable()
|
|
24
|
-
export class ProjectTree {
|
|
25
|
-
private static readonly PROJECT_TREE_CONTAINER_LOCATOR: By = By.css('#theia-left-side-panel #explorer-view-container--files .theia-TreeContainer');
|
|
26
|
-
|
|
27
|
-
constructor(
|
|
28
|
-
@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
|
|
29
|
-
@inject(CLASSES.Ide) private readonly ide: Ide,
|
|
30
|
-
@inject(CLASSES.Editor) private readonly editor: Editor,
|
|
31
|
-
@inject(CLASSES.BrowserTabsUtil) private readonly browserTabsUtil: BrowserTabsUtil) { }
|
|
32
|
-
|
|
33
|
-
async clickCollapseAllButton() {
|
|
34
|
-
Logger.debug('ProjectTree.clickCollapseAllButton');
|
|
35
|
-
|
|
36
|
-
const collapseAllButtonLocator: By = By.id('navigator.collapse.all');
|
|
37
|
-
await this.driverHelper.waitAndClick(collapseAllButtonLocator);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async waitTreeCollapsed(projectName: string, rootSubItem: string) {
|
|
41
|
-
Logger.debug(`ProjectTree.waitTreeCollapsed project: "${projectName}", subitem: "${rootSubItem}"`);
|
|
42
|
-
|
|
43
|
-
const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${rootSubItem}`));
|
|
44
|
-
await this.driverHelper.waitDisappearanceWithTimeout(rootSubitemLocator, TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async collapseProjectTree(projectName: string, rootSubItem: string) {
|
|
48
|
-
Logger.debug(`ProjectTree.collapseProjectTree project: "${projectName}", subitem: "${rootSubItem}"`);
|
|
49
|
-
|
|
50
|
-
await this.clickCollapseAllButton();
|
|
51
|
-
await this.waitTreeCollapsed(projectName, rootSubItem);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async waitAssociatedWorkspaceProjectTreeCollapsed(projectName: string, expandedRootItem: string) {
|
|
55
|
-
Logger.debug(`ProjectTree.waitTreeCollapsed project name: "${projectName}", expanded root item: "${expandedRootItem}"`);
|
|
56
|
-
|
|
57
|
-
// const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${expandedRootItem}`));
|
|
58
|
-
await this.waitItemCollapsed(`${projectName}/${expandedRootItem}`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async openProjectTreeContainer(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
62
|
-
Logger.debug('ProjectTree.openProjectTreeContainer');
|
|
63
|
-
|
|
64
|
-
Logger.trace(`ProjectTree.openProjectTreeContainer waitLeftToolbarButtonPresence`);
|
|
65
|
-
await this.ide.waitLeftToolbarButton(LeftToolbarButton.Explorer, timeout);
|
|
66
|
-
|
|
67
|
-
Logger.trace(`ProjectTree.openProjectTreeContainer waitForExplorerToolbarButton`);
|
|
68
|
-
const explorerButtonActiveLocator: By = this.getLeftToolbarButtonActiveLocator(LeftToolbarButton.Explorer);
|
|
69
|
-
const isButtonActive: boolean = await this.driverHelper.waitVisibilityBoolean(explorerButtonActiveLocator);
|
|
70
|
-
|
|
71
|
-
Logger.debug(`ProjectTree.openProjectTreeContainer leftToolbarButtonActive:${isButtonActive}`);
|
|
72
|
-
if (!isButtonActive) {
|
|
73
|
-
await this.ide.waitAndClickLeftToolbarButton(LeftToolbarButton.Explorer, timeout);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
await this.waitProjectTreeContainer();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async waitItemExpanded(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
80
|
-
Logger.debug(`ProjectTree.waitItemExpanded "${itemPath}"`);
|
|
81
|
-
|
|
82
|
-
const locator: string = await this.getExpandedItemCssLocator(itemPath);
|
|
83
|
-
const expandedItemLocator: By = By.css(locator);
|
|
84
|
-
await this.driverHelper.waitVisibility(expandedItemLocator, timeout);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async waitItemCollapsed(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
88
|
-
Logger.debug(`ProjectTree.waitItemCollapsed "${itemPath}"`);
|
|
89
|
-
|
|
90
|
-
const locator: string = await this.getCollapsedItemCssLocator(itemPath);
|
|
91
|
-
const collapsedItemLocator: By = By.css(locator);
|
|
92
|
-
|
|
93
|
-
await this.driverHelper.waitVisibility(collapsedItemLocator, timeout);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async waitProjectTreeContainer(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
97
|
-
Logger.debug('ProjectTree.waitProjectTreeContainer');
|
|
98
|
-
|
|
99
|
-
await this.driverHelper.waitPresence(ProjectTree.PROJECT_TREE_CONTAINER_LOCATOR, timeout);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
async waitProjectTreeContainerClosed(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
103
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
104
|
-
|
|
105
|
-
Logger.debug('ProjectTree.waitProjectTreeContainerClosed');
|
|
106
|
-
|
|
107
|
-
await this.driverHelper.waitDisappearance(ProjectTree.PROJECT_TREE_CONTAINER_LOCATOR, attempts, polling);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async waitItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
111
|
-
Logger.debug(`ProjectTree.waitItem "${itemPath}"`);
|
|
112
|
-
|
|
113
|
-
const locator: string = await this.getItemCss(itemPath);
|
|
114
|
-
await this.driverHelper.waitVisibility(By.css(locator), timeout);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
async waitItemDisappearance(itemPath: string,
|
|
118
|
-
attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
119
|
-
polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
|
|
120
|
-
|
|
121
|
-
Logger.debug(`ProjectTree.waitItemDisappearance "${itemPath}"`);
|
|
122
|
-
|
|
123
|
-
const locator: string = await this.getItemCss(itemPath);
|
|
124
|
-
await this.driverHelper.waitDisappearance(By.css(locator), attempts, polling);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
async clickOnItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
|
|
128
|
-
Logger.debug(`ProjectTree.clickOnItem "${itemPath}"`);
|
|
129
|
-
|
|
130
|
-
const locator: string = await this.getItemCss(itemPath);
|
|
131
|
-
await this.driverHelper.waitAndClick(By.css(locator), timeout);
|
|
132
|
-
await this.waitItemSelected(itemPath, timeout);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
async waitItemSelected(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
|
|
136
|
-
Logger.debug(`ProjectTree.waitItemSelected "${itemPath}"`);
|
|
137
|
-
|
|
138
|
-
const selectedItemLocator: By = By.css(`div[title='/projects/${itemPath}'].theia-mod-selected.theia-mod-focus`);
|
|
139
|
-
await this.driverHelper.waitVisibility(selectedItemLocator, timeout);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
async expandItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
|
|
143
|
-
Logger.debug(`ProjectTree.expandItem "${itemPath}"`);
|
|
144
|
-
|
|
145
|
-
const locator: string = await this.getExpandIconCssLocator(itemPath);
|
|
146
|
-
const expandIconLocator: By = By.css(locator);
|
|
147
|
-
const treeItemLocator: By = By.css(this.getTreeItemCssLocator(itemPath));
|
|
148
|
-
|
|
149
|
-
await this.driverHelper.getDriver().wait(async () => {
|
|
150
|
-
const classAttributeValue: string = await this.driverHelper.waitAndGetElementAttribute(expandIconLocator, 'class', timeout);
|
|
151
|
-
const isItemCollapsed: boolean = classAttributeValue.search('theia-mod-collapsed') > 0;
|
|
152
|
-
if (isItemCollapsed) {
|
|
153
|
-
await this.driverHelper.waitAndClick(treeItemLocator, timeout);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
try {
|
|
157
|
-
await this.waitItemExpanded(itemPath, TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
158
|
-
return true;
|
|
159
|
-
} catch (err) {
|
|
160
|
-
if (!(err instanceof error.TimeoutError)) {
|
|
161
|
-
throw err;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
console.log(`The '${itemPath}' item has not been expanded, try again`);
|
|
165
|
-
await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
|
|
166
|
-
}
|
|
167
|
-
}, timeout);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
async collapseItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
|
|
171
|
-
Logger.debug(`ProjectTree.collapseItem "${itemPath}"`);
|
|
172
|
-
|
|
173
|
-
const locator: string = await this.getExpandIconCssLocator(itemPath);
|
|
174
|
-
const expandIconLocator: By = By.css(locator);
|
|
175
|
-
const treeItemLocator: By = By.css(this.getTreeItemCssLocator(itemPath));
|
|
176
|
-
|
|
177
|
-
const classAttributeValue: string = await this.driverHelper.waitAndGetElementAttribute(expandIconLocator, 'class', timeout);
|
|
178
|
-
const isItemCollapsed: boolean = classAttributeValue.search('theia-mod-collapsed') > 0;
|
|
179
|
-
|
|
180
|
-
if (!isItemCollapsed) {
|
|
181
|
-
await this.driverHelper.waitAndClick(treeItemLocator, timeout);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
await this.waitItemCollapsed(itemPath, timeout);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
async expandPath(path: string, timeout: number = TimeoutConstants.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) {
|
|
188
|
-
Logger.debug(`ProjectTree.expandPath "${path}"`);
|
|
189
|
-
|
|
190
|
-
let items: Array<string> = path.split('/');
|
|
191
|
-
let projectName: string = items[0];
|
|
192
|
-
let paths: Array<string> = new Array();
|
|
193
|
-
paths.push(projectName);
|
|
194
|
-
|
|
195
|
-
// make direct path for each project tree item
|
|
196
|
-
for (let i = 1; i < items.length; i++) {
|
|
197
|
-
let item = items[i];
|
|
198
|
-
projectName = `${projectName}/${item}`;
|
|
199
|
-
paths.push(projectName);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// expand each project tree item
|
|
203
|
-
for (const path of paths) {
|
|
204
|
-
await this.expandItem(path, timeout);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
*
|
|
210
|
-
* @param pathToItem path to the file that should be opened
|
|
211
|
-
* @param fileName file that should be opened
|
|
212
|
-
* @param timeoutForSigleItem timeout applied for every item in path to be opened
|
|
213
|
-
*/
|
|
214
|
-
async expandPathAndOpenFile(pathToItem: string, fileName: string, timeoutForSigleItem: number = TimeoutConstants.TS_OPEN_EDITOR_TIMEOUT) {
|
|
215
|
-
Logger.debug(`ProjectTree.expandPathAndOpenFile "${pathToItem}" filename: ${fileName}`);
|
|
216
|
-
|
|
217
|
-
await this.expandPath(pathToItem, timeoutForSigleItem);
|
|
218
|
-
await this.clickOnItem(`${pathToItem}/${fileName}`, timeoutForSigleItem);
|
|
219
|
-
|
|
220
|
-
await this.editor.waitEditorOpened(fileName);
|
|
221
|
-
await this.editor.waitTab(fileName);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
async waitProjectImported(projectName: string,
|
|
225
|
-
rootSubItem: string,
|
|
226
|
-
attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
227
|
-
visibilityItemPolling: number = TimeoutConstants.TS_IMPORT_PROJECT_DEFAULT_POLLING,
|
|
228
|
-
triesPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 30) {
|
|
229
|
-
|
|
230
|
-
Logger.debug(`ProjectTree.waitProjectImported "${projectName}" rootSubItem: "${rootSubItem}"`);
|
|
231
|
-
|
|
232
|
-
const rootItem: string = `${projectName}`;
|
|
233
|
-
const rootItemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}`));
|
|
234
|
-
const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${rootSubItem}`));
|
|
235
|
-
|
|
236
|
-
for (let i = 0; i < attempts; i++) {
|
|
237
|
-
// do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
|
|
238
|
-
const isRootFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 5, visibilityItemPolling / 5);
|
|
239
|
-
|
|
240
|
-
if (!isRootFolderVisible) {
|
|
241
|
-
Logger.trace(`ProjectTree.waitProjectImported project not located, reloading page.`);
|
|
242
|
-
await this.browserTabsUtil.refreshPage();
|
|
243
|
-
await this.ide.waitWorkspaceAndIde();
|
|
244
|
-
await this.openProjectTreeContainer();
|
|
245
|
-
if (i === attempts - 1) {
|
|
246
|
-
throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported [unable to locate project root folder]');
|
|
247
|
-
}
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
Logger.trace(`ProjectTree.waitProjectImported project found, waiting for sub-items`);
|
|
252
|
-
await this.expandItem(rootItem);
|
|
253
|
-
await this.waitItemExpanded(rootItem);
|
|
254
|
-
|
|
255
|
-
// do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
|
|
256
|
-
const isSubfolderVisible = await this.driverHelper.waitVisibilityBoolean(rootSubitemLocator, 5, visibilityItemPolling / 5);
|
|
257
|
-
|
|
258
|
-
if (!isSubfolderVisible) {
|
|
259
|
-
Logger.trace(`ProjectTree.waitProjectImported sub-items not found, reloading page.`);
|
|
260
|
-
await this.browserTabsUtil.refreshPage();
|
|
261
|
-
await this.ide.waitWorkspaceAndIde();
|
|
262
|
-
await this.openProjectTreeContainer();
|
|
263
|
-
if (i === attempts - 1) {
|
|
264
|
-
throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported [unable to locate project subfolder]');
|
|
265
|
-
}
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
Logger.trace(`ProjectTree.waitProjectImported project successfully imported`);
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
async waitProjectImportedNoSubfolder(projectName: string,
|
|
275
|
-
attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
|
|
276
|
-
visibilityItemPolling: number = TimeoutConstants.TS_IMPORT_PROJECT_DEFAULT_POLLING,
|
|
277
|
-
triesPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 60) {
|
|
278
|
-
|
|
279
|
-
Logger.debug(`ProjectTree.waitProjectImportedNoSubfolder "${projectName}"`);
|
|
280
|
-
|
|
281
|
-
const rootItemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}`));
|
|
282
|
-
|
|
283
|
-
for (let i = 0; i < attempts; i++) {
|
|
284
|
-
const isProjectFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 5, visibilityItemPolling / 5);
|
|
285
|
-
|
|
286
|
-
if (!isProjectFolderVisible) {
|
|
287
|
-
Logger.trace(`ProjectTree.waitProjectImportedNoSubfolder project not located, reloading page.`);
|
|
288
|
-
await this.browserTabsUtil.refreshPage();
|
|
289
|
-
await this.driverHelper.wait(triesPolling);
|
|
290
|
-
await this.ide.waitWorkspaceAndIde();
|
|
291
|
-
await this.openProjectTreeContainer();
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported');
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
private async getWorkspacePathEntry(): Promise<string> {
|
|
302
|
-
const nodeAttribute: string = 'data-node-id';
|
|
303
|
-
const splitDelimeter = ':';
|
|
304
|
-
const attribute: string = await this.driverHelper.waitAndGetElementAttribute(By.css(`div[${nodeAttribute}]`), nodeAttribute, TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
|
|
305
|
-
return attribute.split(splitDelimeter)[0] + splitDelimeter;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
private getLeftToolbarButtonActiveLocator(buttonTitle: String): By {
|
|
309
|
-
return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
|
|
310
|
-
`//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab') and contains(@class, 'p-mod-current')]`);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
private async getItemCss(itemPath: string): Promise<string> {
|
|
314
|
-
const entry: string = await this.getWorkspacePathEntry();
|
|
315
|
-
return `div[id='${entry}/projects/${itemPath}']`;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
private async getCollapsedItemCssLocator(itemPath: string): Promise<string> {
|
|
319
|
-
const item: string = await this.getExpandIconCssLocator(itemPath);
|
|
320
|
-
return item + '.theia-mod-collapsed';
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
private async getExpandedItemCssLocator(itemPath: string): Promise<string> {
|
|
324
|
-
const item: string = await this.getExpandIconCssLocator(itemPath);
|
|
325
|
-
return item + ':not(.theia-mod-collapsed)';
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
private async getExpandIconCssLocator(itemPath: string): Promise<string> {
|
|
329
|
-
const items: Array<string> = itemPath.split('/');
|
|
330
|
-
const entry: string = items.length > 1 ? await this.getWorkspacePathEntry() : '';
|
|
331
|
-
return `div[data-node-id='${entry}/projects/${itemPath}']`;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
private getTreeItemCssLocator(itemPath: string): string {
|
|
335
|
-
return `.theia-TreeNode[title='/projects/${itemPath}']`;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*********************************************************************
|
|
2
|
-
* Copyright (c) 2019 Red Hat, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made
|
|
5
|
-
* available under the terms of the Eclipse Public License 2.0
|
|
6
|
-
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
7
|
-
*
|
|
8
|
-
* SPDX-License-Identifier: EPL-2.0
|
|
9
|
-
**********************************************************************/
|
|
10
|
-
|
|
11
|
-
import { injectable, inject } from 'inversify';
|
|
12
|
-
import { CLASSES } from '../../../inversify.types';
|
|
13
|
-
import { DriverHelper } from '../../../utils/DriverHelper';
|
|
14
|
-
import { By } from 'selenium-webdriver';
|
|
15
|
-
import { Logger } from '../../../utils/Logger';
|
|
16
|
-
import { TimeoutConstants } from '../../../TimeoutConstants';
|
|
17
|
-
|
|
18
|
-
@injectable()
|
|
19
|
-
export class QuickOpenContainer {
|
|
20
|
-
constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
|
|
21
|
-
|
|
22
|
-
public async waitContainer(timeout: number = TimeoutConstants.TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT) {
|
|
23
|
-
Logger.debug('QuickOpenContainer.waitContainer');
|
|
24
|
-
|
|
25
|
-
const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'quick-input-widget show-file-icons\']');
|
|
26
|
-
await this.driverHelper.waitVisibility(monacoQuickOpenContainerLocator, timeout);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public async waitContainerDisappearance() {
|
|
30
|
-
Logger.debug('QuickOpenContainer.waitContainerDisappearance');
|
|
31
|
-
|
|
32
|
-
const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'quick-input-widget show-file-icons\' and @aria-hidden=\'true\']');
|
|
33
|
-
await this.driverHelper.waitDisappearance(monacoQuickOpenContainerLocator);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public async clickOnContainerItem(itemText: string, timeout: number = TimeoutConstants.TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT) {
|
|
37
|
-
Logger.debug(`QuickOpenContainer.clickOnContainerItem "${itemText}"`);
|
|
38
|
-
|
|
39
|
-
const quickContainerItemLocator: By = By.css(`div[aria-label="${itemText}"]`);
|
|
40
|
-
await this.waitContainer(timeout);
|
|
41
|
-
await this.driverHelper.waitAndClick(quickContainerItemLocator, timeout);
|
|
42
|
-
await this.waitContainerDisappearance();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
public async type(text: string) {
|
|
46
|
-
Logger.debug(`QuickOpenContainer.type "${text}"`);
|
|
47
|
-
await this.driverHelper.type(By.css('div.monaco-inputbox input.input'), text);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public async typeAndSelectSuggestion(text: string, suggestedText: string) {
|
|
51
|
-
Logger.debug('QuickOpenContainer.typeAndSelectSuggestion');
|
|
52
|
-
|
|
53
|
-
await this.type(text);
|
|
54
|
-
// sometimes the UI dropdawn may closed unexpectedly for more stability add 500ms delay.
|
|
55
|
-
await this.driverHelper.wait(2000);
|
|
56
|
-
await this.clickOnContainerItem(suggestedText);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}
|