forked from eclipse-che/che
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SmokeTest utilizing Quarkus REST API (eclipse-che#22085)
* Added SmokeTest.spec.ts utilizing Quarkus REST API Signed-off-by: Tibor Dancs <tdancs@redhat.com> * Adding startWorkspaceFromFactory logic Signed-off-by: Tibor Dancs <tdancs@redhat.com> * Updated test to use https://github.com/che-incubator/quarkus-api-example as devfile Signed-off-by: Tibor Dancs <tdancs@redhat.com> * Updated method names to better reflect their actions Signed-off-by: Tibor Dancs <tdancs@redhat.com> * Linting repository Signed-off-by: Tibor Dancs <tdancs@redhat.com> --------- Signed-off-by: Tibor Dancs <tdancs@redhat.com>
- Loading branch information
Showing
8 changed files
with
79 additions
and
1,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2023 Red Hat, Inc. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
import { SideBarView, ViewSection } from 'monaco-page-objects'; | ||
import { ProjectAndFileTests } from '../tests-library/ProjectAndFileTests'; | ||
import { CLASSES } from '../configs/inversify.types'; | ||
import { e2eContainer } from '../configs/inversify.config'; | ||
import { WorkspaceHandlingTests } from '../tests-library/WorkspaceHandlingTests'; | ||
import { registerRunningWorkspace } from './MochaHooks'; | ||
import { Logger } from '../utils/Logger'; | ||
import { LoginTests } from '../tests-library/LoginTests'; | ||
|
||
const factoryUrl: string = 'https://github.com/che-incubator/quarkus-api-example.git'; | ||
const projectName: string = 'quarkus-api-example'; | ||
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); | ||
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); | ||
const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); | ||
|
||
suite(`The SmokeTest userstory`, async function () { | ||
let projectSection: ViewSection; | ||
suite(`Create workspace from factory:${factoryUrl}`, async function () { | ||
loginTests.loginIntoChe(); | ||
workspaceHandlingTests.createAndOpenWorkspaceFromGitRepository(factoryUrl); | ||
workspaceHandlingTests.obtainWorkspaceNameFromStartingPage(); | ||
test('Register running workspace', async () => { | ||
registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName()); | ||
}); | ||
test('Wait workspace readiness', async function () { | ||
await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor(); | ||
}); | ||
test('Check a project folder has been created', async function () { | ||
projectSection = await new SideBarView().getContent().getSection(projectName); | ||
Logger.debug(`new SideBarView().getContent().getSection: get ${projectName}`); | ||
}); | ||
test('Check the project files was imported', async function () { | ||
const label: string = 'devfile.yaml'; | ||
await projectSection.findItem(label); | ||
Logger.debug(`projectSection.findItem: find ${label}`); | ||
}); | ||
test('Stopping and deleting the workspace', async function () { | ||
await workspaceHandlingTests.stopAndRemoveWorkspace(WorkspaceHandlingTests.getWorkspaceName()); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters