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

[TS-SELENIUM] Adapt WorkspaceCreationAndLsInitialization test according workspace creation from Dashboard changes #13885

Merged
merged 3 commits into from
Jul 18, 2019
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
19 changes: 7 additions & 12 deletions e2e/pageobjects/dashboard/NewWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export class NewWorkspace {
@inject(CLASSES.TestWorkspaceUtil) private readonly testWorkspaceUtil: TestWorkspaceUtil,
@inject(CLASSES.WorkspaceDetails) private readonly workspaceDetails: WorkspaceDetails) { }

async createAndRunWorkspace(namespace: string, workspaceName: string, dataStackId: string, sampleName: string) {
await this.prepareWorkspace(workspaceName, dataStackId, sampleName);
async createAndRunWorkspace(namespace: string, workspaceName: string, dataStackId: string) {
await this.prepareWorkspace(workspaceName, dataStackId);
await this.clickOnCreateAndOpenButton();

await this.waitPageAbsence();
Expand All @@ -53,18 +53,16 @@ export class NewWorkspace {
await this.driverHelper.waitDisappearanceWithTimeout(By.css(NewWorkspace.TITLE_CSS), timeout);
}

async createWorkspaceAndProceedEditing(workspaceName: string, dataStackId: string, sampleName: string) {
await this.prepareWorkspace(workspaceName, dataStackId, sampleName);
async createWorkspaceAndProceedEditing(workspaceName: string, dataStackId: string) {
await this.prepareWorkspace(workspaceName, dataStackId);
await this.selectCreateWorkspaceAndProceedEditing();

await this.workspaceDetails.waitPage(workspaceName);
}

async createAndOpenWorksapce(workspaceName: string, dataStackId: string, sampleName: string) {
await this.prepareWorkspace(workspaceName, dataStackId, sampleName);
async createAndOpenWorkspace(workspaceName: string, dataStackId: string) {
await this.prepareWorkspace(workspaceName, dataStackId);
await this.clickOnCreateAndOpenButton();

await this.workspaceDetails.waitPage(workspaceName);
}

async confirmProjectAdding(sampleName: string, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) {
Expand Down Expand Up @@ -189,12 +187,9 @@ export class NewWorkspace {
return `div.devfile-selector-item-selected[data-devfile-id='${dataStackId}']`;
}

private async prepareWorkspace(workspaceName: string, dataStackId: string, sampleName: string) {
private async prepareWorkspace(workspaceName: string, dataStackId: string) {
await this.typeWorkspaceName(workspaceName);
await this.selectStack(dataStackId);
await this.clickOnAddOrImportProjectButton();
await this.enableSampleCheckbox(sampleName);
await this.confirmProjectAdding(sampleName);
}

}
4 changes: 2 additions & 2 deletions e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ suite('E2E', async () => {
});

test('Create and open workspace', async () => {
await newWorkspace.createAndRunWorkspace(namespace, workspaceName, 'Java Maven', sampleName);
await newWorkspace.createAndOpenWorkspace(workspaceName, 'Java Maven');
});
});

Expand All @@ -68,7 +68,7 @@ suite('E2E', async () => {

test('Check "Java Language Server" initialization by statusbar', async () => {
await ide.waitStatusBarContains('Starting Java Language Server');
await ide.waitStatusBarTextAbsence('Starting Java Language Server');
await ide.waitStatusBarTextAbsence('Starting Java Language Server', 60000);
});

test('Check "Java Language Server" initialization by suggestion invoking', async () => {
Expand Down