From 7d31fcc3975451880a09632a587940d218d7652e Mon Sep 17 00:00:00 2001 From: Skorik Sergey Date: Wed, 17 Jul 2019 18:39:04 +0300 Subject: [PATCH 1/3] dont add project to workspace on NewWorkspaces page --- e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts b/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts index 26349c9708e..f8339146187 100644 --- a/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts +++ b/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts @@ -45,7 +45,9 @@ suite('E2E', async () => { }); test('Create and open workspace', async () => { - await newWorkspace.createAndRunWorkspace(namespace, workspaceName, 'Java Maven', sampleName); + await newWorkspace.typeWorkspaceName(workspaceName); + await newWorkspace.selectStack('Java Maven'); + await newWorkspace.clickOnCreateAndOpenButton(); }); }); @@ -68,7 +70,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 () => { From 1a97166794650133252ed337f6b71e33e20b77ee Mon Sep 17 00:00:00 2001 From: Skorik Sergey Date: Thu, 18 Jul 2019 12:11:07 +0300 Subject: [PATCH 2/3] changes according to review --- e2e/pageobjects/dashboard/NewWorkspace.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/e2e/pageobjects/dashboard/NewWorkspace.ts b/e2e/pageobjects/dashboard/NewWorkspace.ts index 8ed87c3b322..93e2fa8244b 100644 --- a/e2e/pageobjects/dashboard/NewWorkspace.ts +++ b/e2e/pageobjects/dashboard/NewWorkspace.ts @@ -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(); @@ -53,15 +53,15 @@ 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 createAndOpenWorksapce(workspaceName: string, dataStackId: string) { + await this.prepareWorkspace(workspaceName, dataStackId); await this.clickOnCreateAndOpenButton(); await this.workspaceDetails.waitPage(workspaceName); @@ -189,12 +189,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); } } From e8eac0a02904261df659b30d8fea8d475c82adac Mon Sep 17 00:00:00 2001 From: Skorik Sergey Date: Thu, 18 Jul 2019 12:25:06 +0300 Subject: [PATCH 3/3] fix typo, use changed function in WorkspaceCreationAndLsInitialization test --- e2e/pageobjects/dashboard/NewWorkspace.ts | 4 +--- e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/e2e/pageobjects/dashboard/NewWorkspace.ts b/e2e/pageobjects/dashboard/NewWorkspace.ts index 93e2fa8244b..f2b3f77a667 100644 --- a/e2e/pageobjects/dashboard/NewWorkspace.ts +++ b/e2e/pageobjects/dashboard/NewWorkspace.ts @@ -60,11 +60,9 @@ export class NewWorkspace { await this.workspaceDetails.waitPage(workspaceName); } - async createAndOpenWorksapce(workspaceName: string, dataStackId: string) { + 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) { diff --git a/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts b/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts index f8339146187..6e9db0587c0 100644 --- a/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts +++ b/e2e/tests/e2e/WorkspaceCreationAndLsInitialization.spec.ts @@ -45,9 +45,7 @@ suite('E2E', async () => { }); test('Create and open workspace', async () => { - await newWorkspace.typeWorkspaceName(workspaceName); - await newWorkspace.selectStack('Java Maven'); - await newWorkspace.clickOnCreateAndOpenButton(); + await newWorkspace.createAndOpenWorkspace(workspaceName, 'Java Maven'); }); });