Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Java sample titles/paths in tests; fix Documentation test #22761

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/e2e/constants/PLUGIN_TEST_CONSTANTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const PLUGIN_TEST_CONSTANTS: { TS_SAMPLE_LIST: string } = {
*/
TS_SAMPLE_LIST:
process.env.TS_SAMPLE_LIST ||
'Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible'
'Node.js MongoDB,Node.js Express,Java Lombok,Quarkus REST API,Python,.NET,C/C++,Go,PHP,Ansible'
};
12 changes: 3 additions & 9 deletions tests/e2e/specs/dashboard-samples/Documentation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
const workspaceDetails: WorkspaceDetails = e2eContainer.get(CLASSES.WorkspaceDetails);
const shellExecutor: ShellExecutor = e2eContainer.get(CLASSES.ShellExecutor);
const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
const testingVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION;
const majorMinorVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION.split('.').slice(0, 2).join('.'); // extract major.minor version from full version
let parentGUID: string = '';
let docs: any, links: any, productVersion: any;
let webSocketTroubleshooting: any, workspace: any, devfile: any, general: any, storageTypes: any;
Expand All @@ -55,7 +55,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
try {
({ docs, links, productVersion } = JSON.parse(
shellExecutor.curl(
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${testingVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${majorMinorVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
)
));
} catch (e) {
Expand All @@ -71,7 +71,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST

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

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

test('Check if Workspace Details page contains "Devfile" documentation link', async function (): Promise<void> {
await workspaceDetails.closeStorageTypeInfo();
await workspaceDetails.selectTab('Devfile');
expect(await workspaceDetails.getDevfileDocumentationLink(), '"Devfile" doc link is broken').eqls(devfile);
});

if (BASE_TEST_CONSTANTS.IS_PRODUCT_DOCUMENTATION_RELEASED) {
test('Check if product.json documentation links returns status code 200', async function (): Promise<void> {
const documentationLinks: string[] = [devfile, workspace, general, storageTypes, webSocketTroubleshooting];
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/dashboard-samples/Quarkus.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { expect } from 'chai';
import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil';
import { Dashboard } from '../../pageobjects/dashboard/Dashboard';

const stackName: string = 'Java 11 with Quarkus';
const stackName: string = 'Quarkus REST API';

suite(`The ${stackName} userstory ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function (): void {
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/api-tests/api-test-lombok.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
wget -O /tmp/api-utils.sh https://raw.githubusercontent.com/eclipse/che/main/tests/performance/api-tests/api-utils.sh
source /tmp/api-utils.sh

export TEST_DEVFILE_PATH="devfile-registry/devfiles/java11-maven-lombok__lombok-project-sample/devworkspace-che-code-latest.yaml"
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java-maven-lombok__lombok-project-sample/devworkspace-che-code-latest.yaml"
export WORKSPACE_NAME="java-lombok"
export projectName="lombok-project-sample"
export expectedCommandOutput="BUILD SUCCESS"
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/api-tests/api-test-quarkus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
wget -O /tmp/api-utils.sh https://raw.githubusercontent.com/eclipse/che/main/tests/performance/api-tests/api-utils.sh
source /tmp/api-utils.sh

export TEST_DEVFILE_PATH="devfile-registry/devfiles/java11-maven-quarkus__quarkus-quickstarts/devworkspace-che-code-latest.yaml"
export TEST_DEVFILE_PATH="devfile-registry/devfiles/java-maven-quarkus__quarkus-quickstarts/devworkspace-che-code-latest.yaml"
export WORKSPACE_NAME="quarkus-quickstart"
export projectName="quarkus-quickstarts/getting-started"
export expectedCommandOutput="BUILD SUCCESS"
Expand Down
Loading