-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SmokeTest.spec.ts utilizing Quarkus REST API
Signed-off-by: Tibor Dancs <tdancs@redhat.com>
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 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
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 stackName: string = 'Quarkus REST API'; | ||
const projectName: string = 'quarkus-quickstarts'; | ||
const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); | ||
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); | ||
const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); | ||
|
||
suite(`The ${stackName} userstory`, async function () { | ||
let projectSection: ViewSection; | ||
suite(`Create workspace from ${stackName} sample`, async function () { | ||
loginTests.loginIntoChe(); | ||
workspaceHandlingTests.createAndOpenWorkspace(stackName); | ||
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()); | ||
}); | ||
}); | ||
}); |