@eclipse-che/che-e2e 7.73.0-dev-11985ec → 7.73.0-dev-62c0c9d

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.
Files changed (178) hide show
  1. package/configs/inversify.config.ts +6 -6
  2. package/configs/inversify.types.ts +27 -27
  3. package/configs/mocharc.ts +21 -21
  4. package/constants/APITestConstants.ts +39 -38
  5. package/constants/BaseTestConstants.ts +44 -43
  6. package/constants/ChromeDriverConstants.ts +29 -29
  7. package/constants/FactoryTestConstants.ts +30 -30
  8. package/constants/MonacoConstants.ts +10 -10
  9. package/constants/OAuthConstants.ts +46 -46
  10. package/constants/PluginsTestConstants.ts +1 -1
  11. package/constants/ReporterConstants.ts +28 -28
  12. package/constants/TimeoutConstants.ts +101 -101
  13. package/dist/configs/inversify.config.js.map +1 -1
  14. package/dist/configs/inversify.types.js.map +1 -1
  15. package/dist/configs/mocharc.js +1 -1
  16. package/dist/configs/mocharc.js.map +1 -1
  17. package/dist/constants/APITestConstants.js +2 -2
  18. package/dist/constants/APITestConstants.js.map +1 -1
  19. package/dist/constants/BaseTestConstants.js +1 -1
  20. package/dist/constants/BaseTestConstants.js.map +1 -1
  21. package/dist/constants/ChromeDriverConstants.js +1 -1
  22. package/dist/constants/ChromeDriverConstants.js.map +1 -1
  23. package/dist/constants/FactoryTestConstants.js +2 -2
  24. package/dist/constants/FactoryTestConstants.js.map +1 -1
  25. package/dist/constants/MonacoConstants.js +1 -1
  26. package/dist/constants/MonacoConstants.js.map +1 -1
  27. package/dist/constants/OAuthConstants.js +1 -1
  28. package/dist/constants/OAuthConstants.js.map +1 -1
  29. package/dist/constants/PluginsTestConstants.js +1 -1
  30. package/dist/constants/ReporterConstants.js +1 -1
  31. package/dist/constants/ReporterConstants.js.map +1 -1
  32. package/dist/constants/TimeoutConstants.js.map +1 -1
  33. package/dist/driver/ChromeDriver.js.map +1 -1
  34. package/dist/pageobjects/dashboard/CreateWorkspace.js +8 -8
  35. package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
  36. package/dist/pageobjects/dashboard/Dashboard.js +11 -11
  37. package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
  38. package/dist/pageobjects/dashboard/Workspaces.js +14 -14
  39. package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
  40. package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +8 -8
  41. package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
  42. package/dist/pageobjects/git-providers/OauthPage.js +21 -21
  43. package/dist/pageobjects/git-providers/OauthPage.js.map +1 -1
  44. package/dist/pageobjects/ide/CheCodeLocatorLoader.js +1 -1
  45. package/dist/pageobjects/ide/CheCodeLocatorLoader.js.map +1 -1
  46. package/dist/pageobjects/login/kubernetes/DexLoginPage.js +5 -5
  47. package/dist/pageobjects/login/kubernetes/DexLoginPage.js.map +1 -1
  48. package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js +1 -1
  49. package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js.map +1 -1
  50. package/dist/pageobjects/login/openshift/OcpLoginPage.js +10 -10
  51. package/dist/pageobjects/login/openshift/OcpLoginPage.js.map +1 -1
  52. package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js +2 -2
  53. package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js.map +1 -1
  54. package/dist/pageobjects/login/openshift/OcpUserLoginPage.js +1 -1
  55. package/dist/pageobjects/login/openshift/OcpUserLoginPage.js.map +1 -1
  56. package/dist/pageobjects/login/openshift/RedHatLoginPage.js +6 -6
  57. package/dist/pageobjects/login/openshift/RedHatLoginPage.js.map +1 -1
  58. package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js +2 -2
  59. package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js.map +1 -1
  60. package/dist/pageobjects/openshift/OcpApplicationPage.js +2 -2
  61. package/dist/pageobjects/openshift/OcpApplicationPage.js.map +1 -1
  62. package/dist/pageobjects/openshift/OcpImportFromGitPage.js +5 -5
  63. package/dist/pageobjects/openshift/OcpImportFromGitPage.js.map +1 -1
  64. package/dist/pageobjects/openshift/OcpMainPage.js +11 -11
  65. package/dist/pageobjects/openshift/OcpMainPage.js.map +1 -1
  66. package/dist/specs/MochaHooks.js +1 -1
  67. package/dist/specs/MochaHooks.js.map +1 -1
  68. package/dist/specs/SmokeTest.spec.js +7 -3
  69. package/dist/specs/SmokeTest.spec.js.map +1 -1
  70. package/dist/specs/api/ContainerOverridesAPI.spec.js.map +1 -1
  71. package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js +7 -5
  72. package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js.map +1 -1
  73. package/dist/specs/api/EmptyWorkspaceAPI.spec.js +1 -1
  74. package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
  75. package/dist/specs/api/PodOverridesAPI.spec.js.map +1 -1
  76. package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js +9 -5
  77. package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js.map +1 -1
  78. package/dist/specs/dashboard-samples/Quarkus.spec.js +7 -3
  79. package/dist/specs/dashboard-samples/Quarkus.spec.js.map +1 -1
  80. package/dist/specs/dashboard-samples/{RecomendedExtentions.spec.js → RecommendedExtensions.spec.js} +7 -3
  81. package/dist/specs/dashboard-samples/{RecomendedExtentions.spec.js.map → RecommendedExtensions.spec.js.map} +1 -1
  82. package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +3 -1
  83. package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
  84. package/dist/specs/factory/Factory.spec.js +3 -1
  85. package/dist/specs/factory/Factory.spec.js.map +1 -1
  86. package/dist/specs/factory/NoSetupRepoFactory.spec.js +4 -2
  87. package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
  88. package/dist/specs/factory/RefusedOAuthFactory.spec.js +4 -2
  89. package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
  90. package/dist/specs/miscellaneous/PredefinedNamespace.spec.js +6 -2
  91. package/dist/specs/miscellaneous/PredefinedNamespace.spec.js.map +1 -1
  92. package/dist/tests-library/LoginTests.js.map +1 -1
  93. package/dist/tests-library/ProjectAndFileTests.js +3 -3
  94. package/dist/tests-library/ProjectAndFileTests.js.map +1 -1
  95. package/dist/tests-library/WorkspaceHandlingTests.js +54 -74
  96. package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -1
  97. package/dist/utils/BrowserTabsUtil.js +10 -10
  98. package/dist/utils/BrowserTabsUtil.js.map +1 -1
  99. package/dist/utils/CheReporter.js.map +1 -1
  100. package/dist/utils/DevWorkspaceConfigurationHelper.js +2 -2
  101. package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
  102. package/dist/utils/DevfilesRegistryHelper.js +7 -7
  103. package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
  104. package/dist/utils/DriverHelper.js +81 -81
  105. package/dist/utils/DriverHelper.js.map +1 -1
  106. package/dist/utils/KubernetesCommandLineToolsExecutor.js +38 -35
  107. package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
  108. package/dist/utils/Logger.js +19 -10
  109. package/dist/utils/Logger.js.map +1 -1
  110. package/dist/utils/ScreenCatcher.js.map +1 -1
  111. package/dist/utils/ShellExecutor.js.map +1 -1
  112. package/dist/utils/StringUtil.js +2 -2
  113. package/dist/utils/StringUtil.js.map +1 -1
  114. package/dist/utils/request-handlers/CheApiRequestHandler.js +13 -11
  115. package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -1
  116. package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js +1 -1
  117. package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js.map +1 -1
  118. package/dist/utils/workspace/ApiUrlResolver.js +3 -3
  119. package/dist/utils/workspace/ApiUrlResolver.js.map +1 -1
  120. package/dist/utils/workspace/TestWorkspaceUtil.js +20 -16
  121. package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
  122. package/dist/utils/workspace/WorkspaceStatus.js.map +1 -1
  123. package/driver/ChromeDriver.ts +44 -44
  124. package/driver/IDriver.ts +1 -1
  125. package/package.json +1 -1
  126. package/pageobjects/dashboard/CreateWorkspace.ts +52 -52
  127. package/pageobjects/dashboard/Dashboard.ts +72 -72
  128. package/pageobjects/dashboard/Workspaces.ts +138 -139
  129. package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +92 -93
  130. package/pageobjects/git-providers/OauthPage.ts +136 -136
  131. package/pageobjects/ide/CheCodeLocatorLoader.ts +40 -40
  132. package/pageobjects/login/interfaces/ICheLoginPage.ts +1 -1
  133. package/pageobjects/login/interfaces/IOcpLoginPage.ts +1 -1
  134. package/pageobjects/login/kubernetes/DexLoginPage.ts +27 -27
  135. package/pageobjects/login/kubernetes/KubernetesLoginPage.ts +11 -11
  136. package/pageobjects/login/openshift/OcpLoginPage.ts +50 -50
  137. package/pageobjects/login/openshift/OcpRedHatLoginPage.ts +21 -21
  138. package/pageobjects/login/openshift/OcpUserLoginPage.ts +14 -14
  139. package/pageobjects/login/openshift/RedHatLoginPage.ts +44 -41
  140. package/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts +23 -23
  141. package/pageobjects/openshift/OcpApplicationPage.ts +16 -16
  142. package/pageobjects/openshift/OcpImportFromGitPage.ts +54 -54
  143. package/pageobjects/openshift/OcpMainPage.ts +64 -64
  144. package/specs/MochaHooks.ts +44 -44
  145. package/specs/SmokeTest.spec.ts +35 -31
  146. package/specs/api/ContainerOverridesAPI.spec.ts +23 -23
  147. package/specs/api/DevfileAcceptanceTestAPI.spec.ts +93 -91
  148. package/specs/api/EmptyWorkspaceAPI.spec.ts +50 -50
  149. package/specs/api/PodOverridesAPI.spec.ts +29 -29
  150. package/specs/dashboard-samples/EmptyWorkspace.spec.ts +29 -25
  151. package/specs/dashboard-samples/Quarkus.spec.ts +31 -27
  152. package/specs/dashboard-samples/RecommendedExtensions.spec.ts +205 -0
  153. package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +62 -64
  154. package/specs/factory/Factory.spec.ts +149 -147
  155. package/specs/factory/NoSetupRepoFactory.spec.ts +188 -186
  156. package/specs/factory/RefusedOAuthFactory.spec.ts +182 -180
  157. package/specs/miscellaneous/PredefinedNamespace.spec.ts +52 -48
  158. package/tests-library/LoginTests.ts +29 -29
  159. package/tests-library/ProjectAndFileTests.ts +13 -13
  160. package/tests-library/WorkspaceHandlingTests.ts +84 -103
  161. package/utils/BrowserTabsUtil.ts +69 -69
  162. package/utils/CheReporter.ts +4 -6
  163. package/utils/DevWorkspaceConfigurationHelper.ts +58 -58
  164. package/utils/DevfilesRegistryHelper.ts +51 -51
  165. package/utils/DriverHelper.ts +599 -600
  166. package/utils/KubernetesCommandLineToolsExecutor.ts +166 -158
  167. package/utils/Logger.ts +98 -67
  168. package/utils/ScreenCatcher.ts +42 -42
  169. package/utils/ShellExecutor.ts +10 -10
  170. package/utils/StringUtil.ts +29 -30
  171. package/utils/request-handlers/CheApiRequestHandler.ts +84 -82
  172. package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +18 -18
  173. package/utils/request-handlers/headers/IAuthorizationHeaderHandler.ts +1 -1
  174. package/utils/workspace/ApiUrlResolver.ts +23 -23
  175. package/utils/workspace/ITestWorkspaceUtil.ts +29 -29
  176. package/utils/workspace/TestWorkspaceUtil.ts +120 -116
  177. package/utils/workspace/WorkspaceStatus.ts +3 -3
  178. package/specs/dashboard-samples/RecomendedExtentions.spec.ts +0 -201
@@ -8,11 +8,7 @@
8
8
  * SPDX-License-Identifier: EPL-2.0
9
9
  **********************************************************************/
10
10
 
11
- import {
12
- SideBarView,
13
- ViewItem,
14
- ViewSection
15
- } from 'monaco-page-objects';
11
+ import { SideBarView, ViewItem, ViewSection } from 'monaco-page-objects';
16
12
  import { registerRunningWorkspace } from '../MochaHooks';
17
13
  import { LoginTests } from '../../tests-library/LoginTests';
18
14
  import { e2eContainer } from '../../configs/inversify.config';
@@ -36,63 +32,65 @@ let ocpApplicationPage: OcpApplicationPage;
36
32
  const kubernetesCommandLineToolsExecutor: KubernetesCommandLineToolsExecutor = new KubernetesCommandLineToolsExecutor();
37
33
 
38
34
  // works only with no-admin user
39
- suite(`DevConsole Integration`, async function (): Promise<void> {
40
- // test specific data
41
- const gitImportRepo: string = 'https://github.com/crw-qe/summit-lab-spring-music.git';
42
- const gitImportReference: string = 'pipeline';
43
- const projectLabel: string = 'app.openshift.io/runtime=spring';
44
- const projectName: string = 'devconsole-integration-test';
45
-
46
- suiteSetup('Create new empty project using ocp', async function (): Promise<void> {
47
- kubernetesCommandLineToolsExecutor.loginToOcp();
48
- kubernetesCommandLineToolsExecutor.createProject(projectName);
49
- });
50
-
51
- loginTests.loginIntoOcpConsole();
52
-
53
- test('Select test project and Developer role on DevConsole', async function (): Promise<void> {
54
- await ocpMainPage.selectDeveloperRole();
55
- await ocpMainPage.selectProject(projectName);
56
- });
57
-
58
- test('Open import from git project page', async function (): Promise<void> {
59
- ocpImportPage = await ocpMainPage.openImportFromGitPage();
60
- });
61
-
62
- test('Fill and submit import data', async function (): Promise<void> {
63
- ocpApplicationPage = await ocpImportPage.fitAndSubmitConfiguration(gitImportRepo, gitImportReference, projectLabel);
64
- });
65
-
66
- test('Wait until application creates', async function (): Promise<void> {
67
- await ocpApplicationPage.waitApplicationIcon();
68
- });
69
-
70
- test('Check if application has worked link "Open Source Code"', async function (): Promise<void> {
71
- await ocpApplicationPage.waitAndOpenEditSourceCodeIcon();
72
- });
73
-
74
- loginTests.loginIntoChe();
75
-
76
- workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
77
-
78
- test('Registering the running workspace', async function (): Promise<void> {
79
- registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
80
- });
81
-
82
- test('Check if application source code opens in workspace', async function (): Promise<void> {
83
- await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
84
- });
85
-
86
- test('Check if project and files imported', async function (): Promise<void> {
87
- const applicationSourceProjectName: string = StringUtil.getProjectNameFromGitUrl(gitImportRepo);
88
- const projectSection: ViewSection = await new SideBarView().getContent().getSection(applicationSourceProjectName);
89
- const isFileImported: ViewItem | undefined = await projectSection.findItem(BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME);
90
- expect(isFileImported).not.eqls(undefined);
91
- });
92
-
93
- loginTests.logoutFromChe();
94
-
95
- suiteTeardown('Delete project using ocp', async function (): Promise<void> {
96
- kubernetesCommandLineToolsExecutor.deleteProject(projectName);
97
- });
35
+ suite(`DevConsole Integration`, async function(): Promise<void> {
36
+ // test specific data
37
+ const gitImportRepo: string = 'https://github.com/crw-qe/summit-lab-spring-music.git';
38
+ const gitImportReference: string = 'pipeline';
39
+ const projectLabel: string = 'app.openshift.io/runtime=spring';
40
+ const projectName: string = 'devconsole-integration-test';
41
+
42
+ suiteSetup('Create new empty project using ocp', async function(): Promise<void> {
43
+ kubernetesCommandLineToolsExecutor.loginToOcp();
44
+ kubernetesCommandLineToolsExecutor.createProject(projectName);
45
+ });
46
+
47
+ loginTests.loginIntoOcpConsole();
48
+
49
+ test('Select test project and Developer role on DevConsole', async function(): Promise<void> {
50
+ await ocpMainPage.selectDeveloperRole();
51
+ await ocpMainPage.selectProject(projectName);
52
+ });
53
+
54
+ test('Open import from git project page', async function(): Promise<void> {
55
+ ocpImportPage = await ocpMainPage.openImportFromGitPage();
56
+ });
57
+
58
+ test('Fill and submit import data', async function(): Promise<void> {
59
+ ocpApplicationPage = await ocpImportPage.fitAndSubmitConfiguration(gitImportRepo, gitImportReference, projectLabel);
60
+ });
61
+
62
+ test('Wait until application creates', async function(): Promise<void> {
63
+ await ocpApplicationPage.waitApplicationIcon();
64
+ });
65
+
66
+ test('Check if application has worked link "Open Source Code"', async function(): Promise<void> {
67
+ await ocpApplicationPage.waitAndOpenEditSourceCodeIcon();
68
+ });
69
+
70
+ loginTests.loginIntoChe();
71
+
72
+ test('Obtain workspace name from workspace loader page', async function(): Promise<void> {
73
+ await workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
74
+ });
75
+
76
+ test('Registering the running workspace', async function(): Promise<void> {
77
+ registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
78
+ });
79
+
80
+ test('Check if application source code opens in workspace', async function(): Promise<void> {
81
+ await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
82
+ });
83
+
84
+ test('Check if project and files imported', async function(): Promise<void> {
85
+ const applicationSourceProjectName: string = StringUtil.getProjectNameFromGitUrl(gitImportRepo);
86
+ const projectSection: ViewSection = await new SideBarView().getContent().getSection(applicationSourceProjectName);
87
+ const isFileImported: ViewItem | undefined = await projectSection.findItem(BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME);
88
+ expect(isFileImported).not.eqls(undefined);
89
+ });
90
+
91
+ loginTests.logoutFromChe();
92
+
93
+ suiteTeardown('Delete project using ocp', async function(): Promise<void> {
94
+ kubernetesCommandLineToolsExecutor.deleteProject(projectName);
95
+ });
98
96
  });
@@ -49,152 +49,154 @@ const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests);
49
49
 
50
50
  const webCheCodeLocators: Locators = new CheCodeLocatorLoader().webCheCodeLocators;
51
51
 
52
- suite(`Create a workspace via launching a factory from the ${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_PROVIDER} repository`, async function (): Promise<void> {
53
- const oauthPage: OauthPage = new OauthPage(driverHelper);
54
-
55
- let projectSection: ViewSection;
56
- let scmProvider: SingleScmProvider;
57
- let rest: SingleScmProvider[];
58
- let scmContextMenu: ContextMenu;
59
-
60
- // test specific data
61
- const timeToRefresh: number = 1500;
62
- const changesToCommit: string = (new Date()).getTime().toString();
63
- const fileToChange: string = 'Date.txt';
64
- const commitChangesButtonLabel: string = `Commit Changes on "${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}"`;
65
- const refreshButtonLabel: string = 'Refresh';
66
- const pushItemLabel: string = 'Push';
67
- let testRepoProjectName: string;
68
-
69
- loginTests.loginIntoChe();
70
- test(`Navigate to the factory URL`, async function (): Promise<void> {
71
- await browserTabsUtil.navigateTo(FactoryTestConstants.TS_SELENIUM_FACTORY_URL());
52
+ suite(`Create a workspace via launching a factory from the ${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_PROVIDER} repository`, async function(): Promise<void> {
53
+ const oauthPage: OauthPage = new OauthPage(driverHelper);
54
+
55
+ let projectSection: ViewSection;
56
+ let scmProvider: SingleScmProvider;
57
+ let rest: SingleScmProvider[];
58
+ let scmContextMenu: ContextMenu;
59
+
60
+ // test specific data
61
+ const timeToRefresh: number = 1500;
62
+ const changesToCommit: string = (new Date()).getTime().toString();
63
+ const fileToChange: string = 'Date.txt';
64
+ const commitChangesButtonLabel: string = `Commit Changes on "${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}"`;
65
+ const refreshButtonLabel: string = 'Refresh';
66
+ const pushItemLabel: string = 'Push';
67
+ let testRepoProjectName: string;
68
+
69
+ loginTests.loginIntoChe();
70
+ test(`Navigate to the factory URL`, async function(): Promise<void> {
71
+ await browserTabsUtil.navigateTo(FactoryTestConstants.TS_SELENIUM_FACTORY_URL());
72
+ });
73
+
74
+ if (OAuthConstants.TS_SELENIUM_GIT_PROVIDER_OAUTH) {
75
+ test(`Authorize with a ${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_PROVIDER} OAuth`, async function(): Promise<void> {
76
+ await oauthPage.login();
77
+ await oauthPage.waitOauthPage();
78
+ await oauthPage.confirmAccess();
72
79
  });
73
-
74
- if (OAuthConstants.TS_SELENIUM_GIT_PROVIDER_OAUTH) {
75
- test(`Authorize with a ${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_PROVIDER} OAuth`, async function (): Promise<void> {
76
- await oauthPage.login();
77
- await oauthPage.waitOauthPage();
78
- await oauthPage.confirmAccess();
79
- });
80
- }
81
-
82
- workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
83
-
84
- test('Registering the running workspace', async function (): Promise<void> {
85
- registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
86
- });
87
-
88
- test('Wait the workspace readiness', async function (): Promise<void> {
89
- await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
90
- });
91
-
92
- test('Check if a project folder has been created', async function (): Promise<void> {
93
- testRepoProjectName = StringUtil.getProjectNameFromGitUrl(FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_URL);
94
- Logger.debug(`new SideBarView().getContent().getSection: get ${testRepoProjectName}`);
95
- projectSection = await new SideBarView().getContent().getSection(testRepoProjectName);
96
- });
97
-
98
- test('Check if the project files were imported', async function (): Promise<void> {
99
- const label: string = BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME;
100
- Logger.debug(`projectSection.findItem: find ${label}`);
101
- const isFileImported: ViewItem | undefined = await projectSection.findItem(label);
102
- expect(isFileImported).not.eqls(undefined);
103
- });
104
-
105
- test('Accept the project as a trusted one', async function (): Promise<void> {
106
- const buttonYesITrustTheAuthors: string = `Yes, I trust the authors`;
107
- const trustedProjectDialog: ModalDialog = new ModalDialog();
108
- await driverHelper.waitVisibility(webCheCodeLocators.WelcomeContent.button);
109
- Logger.debug(`trustedProjectDialog.pushButton: "${buttonYesITrustTheAuthors}"`);
110
- await trustedProjectDialog.pushButton(buttonYesITrustTheAuthors);
111
- });
112
-
113
- test('Make changes to the file', async function (): Promise<void> {
114
- Logger.debug(`projectSection.openItem: "${fileToChange}"`);
115
- await projectSection.openItem(fileToChange);
116
- const editor: TextEditor = await new EditorView().openEditor(fileToChange) as TextEditor;
117
- await driverHelper.waitVisibility(webCheCodeLocators.Editor.inputArea);
118
- Logger.debug(`editor.clearText`);
119
- await editor.clearText();
120
- Logger.debug(`editor.typeTextAt: "${changesToCommit}"`);
121
- await editor.typeTextAt(1, 1, changesToCommit);
122
- });
123
-
124
- test('Open a source control manager', async function (): Promise<void> {
125
- const viewSourceControl: string = `Source Control`;
126
- const sourceControl: ViewControl = await new ActivityBar().getViewControl(viewSourceControl) as ViewControl;
127
- Logger.debug(`sourceControl.openView: "${viewSourceControl}"`);
128
- await sourceControl.openView();
129
- const scmView: NewScmView = new NewScmView();
130
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel));
131
- [scmProvider, ...rest] = await scmView.getProviders();
132
- Logger.debug(`scmView.getProviders: "${scmProvider}, ${scmProvider}"`);
133
- });
134
-
135
- test('Check if the changes are displayed in the source control manager', async function (): Promise<void> {
136
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
137
- await driverHelper.wait(timeToRefresh);
138
- Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
139
- await scmProvider.takeAction(refreshButtonLabel);
140
- // wait while changes counter will be refreshed
141
- await driverHelper.wait(timeToRefresh);
142
- const changes: number = await scmProvider.getChangeCount();
143
- Logger.debug(`scmProvider.getChangeCount: number of changes is "${changes}"`);
144
- expect(changes).eql(1);
145
- });
146
-
147
- test('Stage the changes', async function (): Promise<void> {
148
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
149
- Logger.debug(`scmProvider.openMoreActions`);
150
- scmContextMenu = await scmProvider.openMoreActions();
151
- await driverHelper.waitVisibility(webCheCodeLocators.ContextMenu.contextView);
152
- Logger.debug(`scmContextMenu.select: "Changes" -> "Stage All Changes"`);
153
- await scmContextMenu.select('Changes', 'Stage All Changes');
154
- });
155
-
156
- test('Commit the changes', async function (): Promise<void> {
157
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel));
158
- Logger.debug(`scmProvider.commitChanges: commit name "Commit ${changesToCommit}"`);
159
- await scmProvider.commitChanges('Commit ' + changesToCommit);
160
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
161
- await driverHelper.wait(timeToRefresh);
162
- Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
163
- await scmProvider.takeAction(refreshButtonLabel);
164
- // wait while changes counter will be refreshed
165
- await driverHelper.wait(timeToRefresh);
166
- const changes: number = await scmProvider.getChangeCount();
167
- Logger.debug(`scmProvider.getChangeCount: number of changes is "${changes}"`);
168
- expect(changes).eql(0);
169
- });
170
-
171
- test('Push the changes', async function (): Promise<void> {
172
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(`Push 1 commits to origin/${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}`));
173
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
174
- Logger.debug(`scmProvider.openMoreActions`);
175
- scmContextMenu = await scmProvider.openMoreActions();
176
- await driverHelper.waitVisibility(webCheCodeLocators.ContextMenu.itemConstructor(pushItemLabel));
177
- Logger.debug(`scmContextMenu.select: "${pushItemLabel}"`);
178
- await scmContextMenu.select(pushItemLabel);
179
- });
180
-
181
- test('Check if the changes were pushed', async function (): Promise<void> {
182
- await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
183
- await driverHelper.wait(timeToRefresh);
184
- Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
185
- await scmProvider.takeAction(refreshButtonLabel);
186
- const isCommitButtonDisabled: string = await driverHelper.waitAndGetElementAttribute(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel), 'aria-disabled');
187
- expect(isCommitButtonDisabled).eql('true');
188
- });
189
-
190
- test('Stop the workspace', async function (): Promise<void> {
191
- await workspaceHandlingTests.stopWorkspace(WorkspaceHandlingTests.getWorkspaceName());
192
- await browserTabsUtil.closeAllTabsExceptCurrent();
193
- });
194
-
195
- test('Delete the workspace', async function (): Promise<void> {
196
- await workspaceHandlingTests.removeWorkspace(WorkspaceHandlingTests.getWorkspaceName());
197
- });
198
-
199
- loginTests.logoutFromChe();
80
+ }
81
+
82
+ test('Obtain workspace name from workspace loader page', async function(): Promise<void> {
83
+ await workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
84
+ });
85
+
86
+ test('Registering the running workspace', async function(): Promise<void> {
87
+ registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
88
+ });
89
+
90
+ test('Wait the workspace readiness', async function(): Promise<void> {
91
+ await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
92
+ });
93
+
94
+ test('Check if a project folder has been created', async function(): Promise<void> {
95
+ testRepoProjectName = StringUtil.getProjectNameFromGitUrl(FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_URL);
96
+ Logger.debug(`new SideBarView().getContent().getSection: get ${testRepoProjectName}`);
97
+ projectSection = await new SideBarView().getContent().getSection(testRepoProjectName);
98
+ });
99
+
100
+ test('Check if the project files were imported', async function(): Promise<void> {
101
+ const label: string = BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME;
102
+ Logger.debug(`projectSection.findItem: find ${label}`);
103
+ const isFileImported: ViewItem | undefined = await projectSection.findItem(label);
104
+ expect(isFileImported).not.eqls(undefined);
105
+ });
106
+
107
+ test('Accept the project as a trusted one', async function(): Promise<void> {
108
+ const buttonYesITrustTheAuthors: string = `Yes, I trust the authors`;
109
+ const trustedProjectDialog: ModalDialog = new ModalDialog();
110
+ await driverHelper.waitVisibility(webCheCodeLocators.WelcomeContent.button);
111
+ Logger.debug(`trustedProjectDialog.pushButton: "${buttonYesITrustTheAuthors}"`);
112
+ await trustedProjectDialog.pushButton(buttonYesITrustTheAuthors);
113
+ });
114
+
115
+ test('Make changes to the file', async function(): Promise<void> {
116
+ Logger.debug(`projectSection.openItem: "${fileToChange}"`);
117
+ await projectSection.openItem(fileToChange);
118
+ const editor: TextEditor = await new EditorView().openEditor(fileToChange) as TextEditor;
119
+ await driverHelper.waitVisibility(webCheCodeLocators.Editor.inputArea);
120
+ Logger.debug(`editor.clearText`);
121
+ await editor.clearText();
122
+ Logger.debug(`editor.typeTextAt: "${changesToCommit}"`);
123
+ await editor.typeTextAt(1, 1, changesToCommit);
124
+ });
125
+
126
+ test('Open a source control manager', async function(): Promise<void> {
127
+ const viewSourceControl: string = `Source Control`;
128
+ const sourceControl: ViewControl = await new ActivityBar().getViewControl(viewSourceControl) as ViewControl;
129
+ Logger.debug(`sourceControl.openView: "${viewSourceControl}"`);
130
+ await sourceControl.openView();
131
+ const scmView: NewScmView = new NewScmView();
132
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel));
133
+ [scmProvider, ...rest] = await scmView.getProviders();
134
+ Logger.debug(`scmView.getProviders: "${scmProvider}, ${scmProvider}"`);
135
+ });
136
+
137
+ test('Check if the changes are displayed in the source control manager', async function(): Promise<void> {
138
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
139
+ await driverHelper.wait(timeToRefresh);
140
+ Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
141
+ await scmProvider.takeAction(refreshButtonLabel);
142
+ // wait while changes counter will be refreshed
143
+ await driverHelper.wait(timeToRefresh);
144
+ const changes: number = await scmProvider.getChangeCount();
145
+ Logger.debug(`scmProvider.getChangeCount: number of changes is "${changes}"`);
146
+ expect(changes).eql(1);
147
+ });
148
+
149
+ test('Stage the changes', async function(): Promise<void> {
150
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
151
+ Logger.debug(`scmProvider.openMoreActions`);
152
+ scmContextMenu = await scmProvider.openMoreActions();
153
+ await driverHelper.waitVisibility(webCheCodeLocators.ContextMenu.contextView);
154
+ Logger.debug(`scmContextMenu.select: "Changes" -> "Stage All Changes"`);
155
+ await scmContextMenu.select('Changes', 'Stage All Changes');
156
+ });
157
+
158
+ test('Commit the changes', async function(): Promise<void> {
159
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel));
160
+ Logger.debug(`scmProvider.commitChanges: commit name "Commit ${changesToCommit}"`);
161
+ await scmProvider.commitChanges('Commit ' + changesToCommit);
162
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
163
+ await driverHelper.wait(timeToRefresh);
164
+ Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
165
+ await scmProvider.takeAction(refreshButtonLabel);
166
+ // wait while changes counter will be refreshed
167
+ await driverHelper.wait(timeToRefresh);
168
+ const changes: number = await scmProvider.getChangeCount();
169
+ Logger.debug(`scmProvider.getChangeCount: number of changes is "${changes}"`);
170
+ expect(changes).eql(0);
171
+ });
172
+
173
+ test('Push the changes', async function(): Promise<void> {
174
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.actionConstructor(`Push 1 commits to origin/${FactoryTestConstants.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}`));
175
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
176
+ Logger.debug(`scmProvider.openMoreActions`);
177
+ scmContextMenu = await scmProvider.openMoreActions();
178
+ await driverHelper.waitVisibility(webCheCodeLocators.ContextMenu.itemConstructor(pushItemLabel));
179
+ Logger.debug(`scmContextMenu.select: "${pushItemLabel}"`);
180
+ await scmContextMenu.select(pushItemLabel);
181
+ });
182
+
183
+ test('Check if the changes were pushed', async function(): Promise<void> {
184
+ await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
185
+ await driverHelper.wait(timeToRefresh);
186
+ Logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);
187
+ await scmProvider.takeAction(refreshButtonLabel);
188
+ const isCommitButtonDisabled: string = await driverHelper.waitAndGetElementAttribute(webCheCodeLocators.ScmView.actionConstructor(commitChangesButtonLabel), 'aria-disabled');
189
+ expect(isCommitButtonDisabled).eql('true');
190
+ });
191
+
192
+ test('Stop the workspace', async function(): Promise<void> {
193
+ await workspaceHandlingTests.stopWorkspace(WorkspaceHandlingTests.getWorkspaceName());
194
+ await browserTabsUtil.closeAllTabsExceptCurrent();
195
+ });
196
+
197
+ test('Delete the workspace', async function(): Promise<void> {
198
+ await workspaceHandlingTests.removeWorkspace(WorkspaceHandlingTests.getWorkspaceName());
199
+ });
200
+
201
+ loginTests.logoutFromChe();
200
202
  });