Skip to content

Commit 6728732

Browse files
authored
Fix Java sample titles/paths in tests; fix Documentation test (#22761)
Signed-off-by: Dmytro Nochevnov <[email protected]>
1 parent a25d3b5 commit 6728732

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

tests/e2e/constants/PLUGIN_TEST_CONSTANTS.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export const PLUGIN_TEST_CONSTANTS: { TS_SAMPLE_LIST: string } = {
1313
*/
1414
TS_SAMPLE_LIST:
1515
process.env.TS_SAMPLE_LIST ||
16-
'Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible'
16+
'Node.js MongoDB,Node.js Express,Java Lombok,Quarkus REST API,Python,.NET,C/C++,Go,PHP,Ansible'
1717
};

tests/e2e/specs/dashboard-samples/Documentation.spec.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
4040
const workspaceDetails: WorkspaceDetails = e2eContainer.get(CLASSES.WorkspaceDetails);
4141
const shellExecutor: ShellExecutor = e2eContainer.get(CLASSES.ShellExecutor);
4242
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
43-
const testingVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION;
43+
const majorMinorVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION.split('.').slice(0, 2).join('.'); // extract major.minor version from full version
4444
let parentGUID: string = '';
4545
let docs: any, links: any, productVersion: any;
4646
let webSocketTroubleshooting: any, workspace: any, devfile: any, general: any, storageTypes: any;
@@ -55,7 +55,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
5555
try {
5656
({ docs, links, productVersion } = JSON.parse(
5757
shellExecutor.curl(
58-
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${testingVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
58+
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${majorMinorVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
5959
)
6060
));
6161
} catch (e) {
@@ -71,7 +71,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
7171

7272
test('Check if product.json config contains correct application version', function (): void {
7373
[productVersion, links[1].href, devfile, workspace, general, storageTypes, webSocketTroubleshooting].forEach((e): void => {
74-
expect(e, 'Fetched links not matches with tested product version').contains(testingVersion);
74+
expect(e, 'Fetched links not matches with tested product version').contains(majorMinorVersion);
7575
});
7676
});
7777

@@ -112,12 +112,6 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
112112
expect(await workspaceDetails.getOpenStorageTypeDocumentationLink(), '"Storage types" doc link is broken').eqls(storageTypes);
113113
});
114114

115-
test('Check if Workspace Details page contains "Devfile" documentation link', async function (): Promise<void> {
116-
await workspaceDetails.closeStorageTypeInfo();
117-
await workspaceDetails.selectTab('Devfile');
118-
expect(await workspaceDetails.getDevfileDocumentationLink(), '"Devfile" doc link is broken').eqls(devfile);
119-
});
120-
121115
if (BASE_TEST_CONSTANTS.IS_PRODUCT_DOCUMENTATION_RELEASED) {
122116
test('Check if product.json documentation links returns status code 200', async function (): Promise<void> {
123117
const documentationLinks: string[] = [devfile, workspace, general, storageTypes, webSocketTroubleshooting];

tests/e2e/specs/dashboard-samples/Quarkus.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { expect } from 'chai';
2121
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
2222
import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
2323

24-
const stackName: string = 'Java 11 with Quarkus';
24+
const stackName: string = 'Quarkus REST API';
2525

2626
suite(`The ${stackName} userstory ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function (): void {
2727
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);

tests/performance/api-tests/api-test-lombok.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
wget -O /tmp/api-utils.sh https://raw.githubusercontent.com/eclipse/che/main/tests/performance/api-tests/api-utils.sh
55
source /tmp/api-utils.sh
66

7-
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java11-maven-lombok__lombok-project-sample/devworkspace-che-code-latest.yaml"
7+
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java-maven-lombok__lombok-project-sample/devworkspace-che-code-latest.yaml"
88
export WORKSPACE_NAME="java-lombok"
99
export projectName="lombok-project-sample"
1010
export expectedCommandOutput="BUILD SUCCESS"

tests/performance/api-tests/api-test-quarkus.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
wget -O /tmp/api-utils.sh https://raw.githubusercontent.com/eclipse/che/main/tests/performance/api-tests/api-utils.sh
55
source /tmp/api-utils.sh
66

7-
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java11-maven-quarkus__quarkus-quickstarts/devworkspace-che-code-latest.yaml"
7+
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java-maven-quarkus__quarkus-quickstarts/devworkspace-che-code-latest.yaml"
88
export WORKSPACE_NAME="quarkus-quickstart"
99
export projectName="quarkus-quickstarts/getting-started"
1010
export expectedCommandOutput="BUILD SUCCESS"

0 commit comments

Comments
 (0)