@eclipse-che/che-e2e 7.73.0 → 7.74.0-dev-1d09cb7
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 +6 -6
- package/configs/inversify.types.ts +27 -27
- package/configs/mocharc.ts +21 -21
- package/constants/APITestConstants.ts +39 -38
- package/constants/BaseTestConstants.ts +46 -43
- package/constants/ChromeDriverConstants.ts +29 -29
- package/constants/FactoryTestConstants.ts +30 -30
- package/constants/MonacoConstants.ts +10 -10
- package/constants/OAuthConstants.ts +46 -46
- package/constants/ReporterConstants.ts +28 -28
- package/constants/TimeoutConstants.ts +101 -101
- package/dist/configs/inversify.config.js.map +1 -1
- package/dist/configs/inversify.types.js.map +1 -1
- package/dist/configs/mocharc.js +1 -1
- package/dist/configs/mocharc.js.map +1 -1
- package/dist/constants/APITestConstants.js +2 -2
- package/dist/constants/APITestConstants.js.map +1 -1
- package/dist/constants/BaseTestConstants.js +2 -1
- package/dist/constants/BaseTestConstants.js.map +1 -1
- package/dist/constants/ChromeDriverConstants.js +1 -1
- package/dist/constants/ChromeDriverConstants.js.map +1 -1
- package/dist/constants/FactoryTestConstants.js +1 -1
- package/dist/constants/FactoryTestConstants.js.map +1 -1
- package/dist/constants/MonacoConstants.js +1 -1
- package/dist/constants/MonacoConstants.js.map +1 -1
- package/dist/constants/OAuthConstants.js +1 -1
- package/dist/constants/OAuthConstants.js.map +1 -1
- package/dist/constants/ReporterConstants.js +1 -1
- package/dist/constants/ReporterConstants.js.map +1 -1
- package/dist/constants/TimeoutConstants.js.map +1 -1
- package/dist/driver/ChromeDriver.js.map +1 -1
- package/dist/pageobjects/dashboard/CreateWorkspace.js +8 -8
- package/dist/pageobjects/dashboard/CreateWorkspace.js.map +1 -1
- package/dist/pageobjects/dashboard/Dashboard.js +11 -11
- package/dist/pageobjects/dashboard/Dashboard.js.map +1 -1
- package/dist/pageobjects/dashboard/Workspaces.js +14 -14
- package/dist/pageobjects/dashboard/Workspaces.js.map +1 -1
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js +8 -8
- package/dist/pageobjects/dashboard/workspace-details/WorkspaceDetails.js.map +1 -1
- package/dist/pageobjects/git-providers/OauthPage.js +17 -17
- package/dist/pageobjects/git-providers/OauthPage.js.map +1 -1
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js +1 -1
- package/dist/pageobjects/ide/CheCodeLocatorLoader.js.map +1 -1
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js +5 -5
- package/dist/pageobjects/login/kubernetes/DexLoginPage.js.map +1 -1
- package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js +1 -1
- package/dist/pageobjects/login/kubernetes/KubernetesLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpLoginPage.js +10 -10
- package/dist/pageobjects/login/openshift/OcpLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js +2 -2
- package/dist/pageobjects/login/openshift/OcpRedHatLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/OcpUserLoginPage.js +1 -1
- package/dist/pageobjects/login/openshift/OcpUserLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/RedHatLoginPage.js +6 -6
- package/dist/pageobjects/login/openshift/RedHatLoginPage.js.map +1 -1
- package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js +2 -2
- package/dist/pageobjects/login/openshift/RegularUserOcpCheLoginPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpApplicationPage.js +2 -2
- package/dist/pageobjects/openshift/OcpApplicationPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpImportFromGitPage.js +5 -5
- package/dist/pageobjects/openshift/OcpImportFromGitPage.js.map +1 -1
- package/dist/pageobjects/openshift/OcpMainPage.js +11 -11
- package/dist/pageobjects/openshift/OcpMainPage.js.map +1 -1
- package/dist/specs/MochaHooks.js +1 -1
- package/dist/specs/MochaHooks.js.map +1 -1
- package/dist/specs/SmokeTest.spec.js +7 -3
- package/dist/specs/SmokeTest.spec.js.map +1 -1
- package/dist/specs/api/ContainerOverridesAPI.spec.js.map +1 -1
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js +7 -5
- package/dist/specs/api/DevfileAcceptanceTestAPI.spec.js.map +1 -1
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js +1 -1
- package/dist/specs/api/EmptyWorkspaceAPI.spec.js.map +1 -1
- package/dist/specs/api/PodOverridesAPI.spec.js +2 -1
- package/dist/specs/api/PodOverridesAPI.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js +9 -5
- package/dist/specs/dashboard-samples/EmptyWorkspace.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/Quarkus.spec.js +7 -3
- package/dist/specs/dashboard-samples/Quarkus.spec.js.map +1 -1
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js +6 -2
- package/dist/specs/dashboard-samples/RecommendedExtensions.spec.js.map +1 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js +3 -1
- package/dist/specs/devconsole-intergration/DevConsoleIntegration.spec.js.map +1 -1
- package/dist/specs/factory/Factory.spec.js +3 -1
- package/dist/specs/factory/Factory.spec.js.map +1 -1
- package/dist/specs/factory/NoSetupRepoFactory.spec.js +4 -2
- package/dist/specs/factory/NoSetupRepoFactory.spec.js.map +1 -1
- package/dist/specs/factory/RefusedOAuthFactory.spec.js +4 -2
- package/dist/specs/factory/RefusedOAuthFactory.spec.js.map +1 -1
- package/dist/specs/miscellaneous/PredefinedNamespace.spec.js +6 -2
- package/dist/specs/miscellaneous/PredefinedNamespace.spec.js.map +1 -1
- package/dist/tests-library/LoginTests.js.map +1 -1
- package/dist/tests-library/ProjectAndFileTests.js +3 -3
- package/dist/tests-library/ProjectAndFileTests.js.map +1 -1
- package/dist/tests-library/WorkspaceHandlingTests.js +54 -74
- package/dist/tests-library/WorkspaceHandlingTests.js.map +1 -1
- package/dist/utils/BrowserTabsUtil.js +10 -10
- package/dist/utils/BrowserTabsUtil.js.map +1 -1
- package/dist/utils/CheReporter.js.map +1 -1
- package/dist/utils/DevWorkspaceConfigurationHelper.js +2 -2
- package/dist/utils/DevWorkspaceConfigurationHelper.js.map +1 -1
- package/dist/utils/DevfilesRegistryHelper.js +7 -7
- package/dist/utils/DevfilesRegistryHelper.js.map +1 -1
- package/dist/utils/DriverHelper.js +81 -81
- package/dist/utils/DriverHelper.js.map +1 -1
- package/dist/utils/KubernetesCommandLineToolsExecutor.js +38 -35
- package/dist/utils/KubernetesCommandLineToolsExecutor.js.map +1 -1
- package/dist/utils/Logger.js +45 -21
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ScreenCatcher.js.map +1 -1
- package/dist/utils/ShellExecutor.js.map +1 -1
- package/dist/utils/StringUtil.js +2 -2
- package/dist/utils/StringUtil.js.map +1 -1
- package/dist/utils/request-handlers/CheApiRequestHandler.js +13 -11
- package/dist/utils/request-handlers/CheApiRequestHandler.js.map +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.js +1 -1
- package/dist/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.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/TestWorkspaceUtil.js +20 -16
- package/dist/utils/workspace/TestWorkspaceUtil.js.map +1 -1
- package/dist/utils/workspace/WorkspaceStatus.js.map +1 -1
- package/driver/ChromeDriver.ts +44 -44
- package/driver/IDriver.ts +1 -1
- package/package.json +1 -1
- package/pageobjects/dashboard/CreateWorkspace.ts +52 -52
- package/pageobjects/dashboard/Dashboard.ts +72 -72
- package/pageobjects/dashboard/Workspaces.ts +138 -139
- package/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +92 -93
- package/pageobjects/git-providers/OauthPage.ts +136 -136
- package/pageobjects/ide/CheCodeLocatorLoader.ts +40 -40
- package/pageobjects/login/interfaces/ICheLoginPage.ts +1 -1
- package/pageobjects/login/interfaces/IOcpLoginPage.ts +1 -1
- package/pageobjects/login/kubernetes/DexLoginPage.ts +27 -27
- package/pageobjects/login/kubernetes/KubernetesLoginPage.ts +11 -11
- package/pageobjects/login/openshift/OcpLoginPage.ts +50 -50
- package/pageobjects/login/openshift/OcpRedHatLoginPage.ts +21 -21
- package/pageobjects/login/openshift/OcpUserLoginPage.ts +14 -14
- package/pageobjects/login/openshift/RedHatLoginPage.ts +44 -41
- package/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts +23 -23
- package/pageobjects/openshift/OcpApplicationPage.ts +16 -16
- package/pageobjects/openshift/OcpImportFromGitPage.ts +54 -54
- package/pageobjects/openshift/OcpMainPage.ts +64 -64
- package/resources/pod-overrides-airgap.yaml +37 -0
- package/specs/MochaHooks.ts +44 -44
- package/specs/SmokeTest.spec.ts +35 -31
- package/specs/api/ContainerOverridesAPI.spec.ts +23 -23
- package/specs/api/DevfileAcceptanceTestAPI.spec.ts +93 -91
- package/specs/api/EmptyWorkspaceAPI.spec.ts +50 -50
- package/specs/api/PodOverridesAPI.spec.ts +30 -29
- package/specs/dashboard-samples/EmptyWorkspace.spec.ts +29 -25
- package/specs/dashboard-samples/Quarkus.spec.ts +31 -27
- package/specs/dashboard-samples/RecommendedExtensions.spec.ts +156 -152
- package/specs/devconsole-intergration/DevConsoleIntegration.spec.ts +62 -64
- package/specs/factory/Factory.spec.ts +149 -147
- package/specs/factory/NoSetupRepoFactory.spec.ts +188 -186
- package/specs/factory/RefusedOAuthFactory.spec.ts +182 -180
- package/specs/miscellaneous/PredefinedNamespace.spec.ts +52 -48
- package/tests-library/LoginTests.ts +29 -29
- package/tests-library/ProjectAndFileTests.ts +13 -13
- package/tests-library/WorkspaceHandlingTests.ts +84 -103
- package/utils/BrowserTabsUtil.ts +69 -69
- package/utils/CheReporter.ts +4 -6
- package/utils/DevWorkspaceConfigurationHelper.ts +58 -58
- package/utils/DevfilesRegistryHelper.ts +51 -51
- package/utils/DriverHelper.ts +599 -600
- package/utils/KubernetesCommandLineToolsExecutor.ts +166 -158
- package/utils/Logger.ts +119 -67
- package/utils/ScreenCatcher.ts +42 -42
- package/utils/ShellExecutor.ts +10 -10
- package/utils/StringUtil.ts +29 -29
- package/utils/request-handlers/CheApiRequestHandler.ts +84 -82
- package/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts +18 -18
- package/utils/request-handlers/headers/IAuthorizationHeaderHandler.ts +1 -1
- package/utils/workspace/ApiUrlResolver.ts +23 -23
- package/utils/workspace/ITestWorkspaceUtil.ts +29 -29
- package/utils/workspace/TestWorkspaceUtil.ts +120 -116
- package/utils/workspace/WorkspaceStatus.ts +3 -3
|
@@ -46,156 +46,160 @@ const webCheCodeLocators: Locators = new CheCodeLocatorLoader().webCheCodeLocato
|
|
|
46
46
|
const samples: string[] = PluginsTestConstants.TS_SAMPLE_LIST.split(',');
|
|
47
47
|
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
|
|
48
48
|
|
|
49
|
-
suite(`Check if recommended extensions installed for ${samples}`, async function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
49
|
+
suite(`Check if recommended extensions installed for ${samples}`, async function(): Promise<void> {
|
|
50
|
+
let projectSection: ViewSection;
|
|
51
|
+
let extensionsView: SideBarView | undefined;
|
|
52
|
+
let extensionSection: ExtensionsViewSection;
|
|
53
|
+
|
|
54
|
+
const extensionsListFileName: string = 'extensions.json';
|
|
55
|
+
let recommendedExtensions: any = {
|
|
56
|
+
recommendations: []
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
loginTests.loginIntoChe();
|
|
60
|
+
|
|
61
|
+
for (const sample of samples) {
|
|
62
|
+
test(`Create and open new workspace, stack:${sample}`, async function(): Promise<void> {
|
|
63
|
+
await workspaceHandlingTests.createAndOpenWorkspace(sample);
|
|
64
|
+
});
|
|
65
|
+
test('Obtain workspace name from workspace loader page', async function(): Promise<void> {
|
|
66
|
+
await workspaceHandlingTests.obtainWorkspaceNameFromStartingPage();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('Registering the running workspace', async function(): Promise<void> {
|
|
70
|
+
registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test('Wait workspace readiness', async function(): Promise<void> {
|
|
74
|
+
await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('Wait until the project will be imported and accept it as trusted one', async function(): Promise<void> {
|
|
78
|
+
[projectSection] = await new SideBarView().getContent().getSections();
|
|
79
|
+
const label: string = BaseTestConstants.TS_SELENIUM_PROJECT_ROOT_FILE_NAME;
|
|
80
|
+
Logger.debug(`projectSection.findItem: find ${label}`);
|
|
81
|
+
const isFileImported: ViewItem | undefined = await projectSection.findItem(label);
|
|
82
|
+
expect(isFileImported).not.eqls(undefined);
|
|
83
|
+
try {
|
|
84
|
+
const buttonYesITrustTheAuthors: string = `Yes, I trust the authors`;
|
|
85
|
+
await driverHelper.waitVisibility(webCheCodeLocators.WelcomeContent.button, TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
|
|
86
|
+
const trustedProjectDialog: ModalDialog = new ModalDialog();
|
|
87
|
+
Logger.debug(`trustedProjectDialog.pushButton: "${buttonYesITrustTheAuthors}"`);
|
|
88
|
+
await trustedProjectDialog.pushButton(buttonYesITrustTheAuthors);
|
|
89
|
+
} catch (e) {
|
|
90
|
+
Logger.debug(`Welcome modal dialog was not shown: ${e}`);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test(`Get recommended extensions list from ${extensionsListFileName}`, async function(): Promise<void> {
|
|
95
|
+
Logger.debug(`projectSection.findItem(item))?.select(): expand .vscode folder and open extensions.json.`);
|
|
96
|
+
await (await projectSection.findItem('.vscode'))?.select();
|
|
97
|
+
// time to expand project tree
|
|
98
|
+
await driverHelper.wait(TimeoutConstants.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT);
|
|
99
|
+
await (await projectSection.findItem(extensionsListFileName))?.select();
|
|
100
|
+
Logger.debug(`EditorView().openEditor(${extensionsListFileName})`);
|
|
101
|
+
const editor: TextEditor = await new EditorView().openEditor(extensionsListFileName) as TextEditor;
|
|
102
|
+
await driverHelper.waitVisibility(webCheCodeLocators.Editor.inputArea);
|
|
103
|
+
Logger.debug(`editor.getText(): get recommended extensions as text from editor, delete comments and parse to object.`);
|
|
104
|
+
recommendedExtensions = JSON.parse((await editor.getText()).replace(/\/\*[\s\S]*?\*\/|(?<=[^:])\/\/.*|^\/\/.*/g, '').trim());
|
|
105
|
+
Logger.debug(`recommendedExtensions.recommendations: Get recommendations clear names using map().`);
|
|
106
|
+
recommendedExtensions.recommendations = recommendedExtensions.recommendations.map((r: { split: (arg: string) => [any, any]; }) => {
|
|
107
|
+
const [publisher, name] = r.split('.');
|
|
108
|
+
return { publisher, name };
|
|
109
|
+
});
|
|
110
|
+
Logger.info(`Recommended extension for this workspace:\n${JSON.stringify(recommendedExtensions.recommendations)}.`);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test(`Open "Extensions" view section`, async function(): Promise<void> {
|
|
114
|
+
Logger.debug(`ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.`);
|
|
115
|
+
extensionsView = await (await new ActivityBar().getViewControl('Extensions'))?.openView();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test(`Let extensions complete installation`, async function(): Promise<void> {
|
|
119
|
+
Logger.info(`Time for extensions installation TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT=${TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT}`);
|
|
120
|
+
await driverHelper.wait(TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test(`Check if extensions are installed and enabled`, async function(): Promise<void> {
|
|
124
|
+
this.retries(10);
|
|
125
|
+
Logger.debug(`ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.`);
|
|
126
|
+
extensionsView = await (await new ActivityBar().getViewControl('Extensions'))?.openView();
|
|
127
|
+
|
|
128
|
+
Logger.debug(`extensionsView?.getContent().getSections(): get current section.`);
|
|
129
|
+
[extensionSection] = await extensionsView?.getContent().getSections() as ExtensionsViewSection[];
|
|
130
|
+
await driverHelper.waitAllPresence(webCheCodeLocators.ExtensionsViewSection.itemTitle, TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT);
|
|
131
|
+
|
|
132
|
+
for (const extension of recommendedExtensions.recommendations) {
|
|
133
|
+
Logger.info(`Check if ${JSON.stringify(extension)} are installed.`);
|
|
134
|
+
|
|
135
|
+
Logger.debug(`extensionSection.findItem(${extension.name}).`);
|
|
136
|
+
await extensionSection.findItem(extension.name);
|
|
137
|
+
|
|
138
|
+
// check if extension require reload the page
|
|
139
|
+
if (await driverHelper.isVisible((webCheCodeLocators.ExtensionsViewSection as any).requireReloadButton)) {
|
|
140
|
+
Logger.debug(`Extension require reload the editor. Refreshing the page..`);
|
|
141
|
+
await browserTabsUtil.refreshPage();
|
|
142
|
+
await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor();
|
|
143
|
+
Logger.debug(`ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.`);
|
|
144
|
+
extensionsView = await (await new ActivityBar().getViewControl('Extensions'))?.openView();
|
|
145
|
+
Logger.debug(`extensionsView?.getContent().getSections(): get current section.`);
|
|
146
|
+
[extensionSection] = await extensionsView?.getContent().getSections() as ExtensionsViewSection[];
|
|
147
|
+
await driverHelper.waitAllPresence(webCheCodeLocators.ExtensionsViewSection.itemTitle, TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT);
|
|
148
|
+
Logger.debug(`extensionSection.findItem(${extension.name}).`);
|
|
149
|
+
await extensionSection.findItem(extension.name);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
Logger.debug(`extensionsView?.getContent().getSections(): switch to marketplace section.`);
|
|
153
|
+
const [marketplaceSection]: ExtensionsViewSection[] = await extensionsView?.getContent().getSections() as ExtensionsViewSection[];
|
|
154
|
+
await driverHelper.waitVisibility(webCheCodeLocators.ExtensionsViewSection.items, TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT);
|
|
155
|
+
|
|
156
|
+
Logger.debug(`marketplaceSection.getVisibleItems(): get all found items.`);
|
|
157
|
+
const allFinedItems: ExtensionsViewItem[] = await marketplaceSection.getVisibleItems();
|
|
158
|
+
|
|
159
|
+
let itemWithRightNameAndPublisher: ExtensionsViewItem | undefined;
|
|
160
|
+
for (const item of allFinedItems) {
|
|
161
|
+
Logger.debug(`Try to find extension published by ${extension.publisher}.`);
|
|
162
|
+
if (await item.getAuthor() === extension.publisher) {
|
|
163
|
+
itemWithRightNameAndPublisher = item;
|
|
164
|
+
Logger.debug(`Extension was found: ${await itemWithRightNameAndPublisher?.getTitle()}`);
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
if (itemWithRightNameAndPublisher === undefined) {
|
|
168
|
+
Logger.error(`Extension with publisher as ${extension.publisher} was not found.`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
Logger.debug(`itemWithRightNameAndPublisher?.isInstalled()`);
|
|
173
|
+
const isInstalled: boolean = await itemWithRightNameAndPublisher?.isInstalled() as boolean;
|
|
174
|
+
|
|
175
|
+
Logger.debug(`itemWithRightNameAndPublisher?.isInstalled(): ${isInstalled}.`);
|
|
176
|
+
expect(isInstalled).eqls(true);
|
|
177
|
+
|
|
178
|
+
Logger.debug(`itemWithRightNameAndPublisher.manage(): get context menu.`);
|
|
179
|
+
const extensionManageMenu: ContextMenu = await (itemWithRightNameAndPublisher as ExtensionsViewItem).manage();
|
|
180
|
+
|
|
181
|
+
Logger.debug(`extensionManageMenu.getItems(): get menu items.`);
|
|
182
|
+
const extensionMenuItems: ContextMenuItem[] = await extensionManageMenu.getItems();
|
|
183
|
+
let extensionMenuItemLabels: string = '';
|
|
184
|
+
for (const item of extensionMenuItems) {
|
|
185
|
+
Logger.trace(`extensionMenuItems -> item.getLabel(): get menu items names.`);
|
|
186
|
+
extensionMenuItemLabels += (await item.getLabel()) + ' ';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
Logger.debug(`extensionMenuItemLabels: ${extensionMenuItemLabels}.`);
|
|
190
|
+
expect(extensionMenuItemLabels).contains('Disable').and.not.contains('Enable');
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
test('Stop the workspace', async function(): Promise<void> {
|
|
195
|
+
await workspaceHandlingTests.stopWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
196
|
+
await browserTabsUtil.closeAllTabsExceptCurrent();
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test('Delete the workspace', async function(): Promise<void> {
|
|
200
|
+
await workspaceHandlingTests.removeWorkspace(WorkspaceHandlingTests.getWorkspaceName());
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
loginTests.logoutFromChe();
|
|
201
205
|
});
|
|
@@ -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
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
});
|