diff --git a/tests/e2e/TimeoutConstants.ts b/tests/e2e/TimeoutConstants.ts index 6ccc72251a..3f07421c4f 100644 --- a/tests/e2e/TimeoutConstants.ts +++ b/tests/e2e/TimeoutConstants.ts @@ -11,11 +11,6 @@ export const TimeoutConstants = { // -------------------------------------------- INSTALLING AND STARTUP -------------------------------------------- - /** - * Timeout in milliseconds waiting for install Eclipse Che by OperatorHub UI, "600 000" by default. - */ - TS_SELENIUM_INSTALL_ECLIPSE_CHE_TIMEOUT: Number(process.env.TS_SELENIUM_START_WORKSPACE_TIMEOUT) || 600_000, - /** * Wait between workspace started and IDE ready to be used, "20 000" by default. */ @@ -153,9 +148,9 @@ export const TimeoutConstants = { TS_GIT_CONAINER_INTERACTION_TIMEOUT: Number(process.env.TS_GIT_CONAINER_INTERACTION_TIMEOUT) || 20_000, /** - * Timeout for toolbars interaction, "20 000" by default + * Timeout for toolbars interaction, "30 000" by default */ - TS_SELENIUM_TOOLBAR_TIMEOUT: Number(process.env.TS_SELENIUM_TOOLBAR_TIMEOUT) || 20_000, + TS_SELENIUM_TOOLBAR_TIMEOUT: Number(process.env.TS_SELENIUM_TOOLBAR_TIMEOUT) || 30_000, /** * Timeout for clicking on visible item, "3 000" by default diff --git a/tests/e2e/pageobjects/ide/DebugView.ts b/tests/e2e/pageobjects/ide/DebugView.ts index 425bcd6490..da31ec2a34 100644 --- a/tests/e2e/pageobjects/ide/DebugView.ts +++ b/tests/e2e/pageobjects/ide/DebugView.ts @@ -67,8 +67,8 @@ export class DebugView { * Click on "Threads" view title. */ async clickOnThreadsViewTitle() { - Logger.debug(`Click on "Threads" view title`) - + Logger.debug(`Click on "Threads" view title`); + const threadsViewTitleLocator: By = By.xpath('//div[@id="debug:view-container:-1--debug:threads:-1"]/*/span[@title="Threads"]'); await this.driverHelper.waitAndClick(threadsViewTitleLocator); } diff --git a/tests/e2e/pageobjects/ide/Ide.ts b/tests/e2e/pageobjects/ide/Ide.ts index b1f57a6145..d2a1f9daf3 100644 --- a/tests/e2e/pageobjects/ide/Ide.ts +++ b/tests/e2e/pageobjects/ide/Ide.ts @@ -142,7 +142,7 @@ export class Ide { await this.driverHelper.waitAndClick(By.xpath(yesButtonLocator)); } - async waitWorkspaceAndIde(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) { + async waitWorkspaceAndIde(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) { Logger.debug('Ide.waitWorkspaceAndIde'); diff --git a/tests/e2e/tests/e2e/GitSsh.spec.ts b/tests/e2e/tests/e2e/GitSsh.spec.ts index a55091cece..fa5fd18b73 100644 --- a/tests/e2e/tests/e2e/GitSsh.spec.ts +++ b/tests/e2e/tests/e2e/GitSsh.spec.ts @@ -25,6 +25,7 @@ import { GitHubUtil } from '../../utils/VCS/github/GitHubUtil'; import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil'; import { TopMenu } from '../../pageobjects/ide/TopMenu'; import { TimeoutConstants } from '../../TimeoutConstants'; +import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); const ide: Ide = e2eContainer.get(CLASSES.Ide); @@ -37,23 +38,26 @@ const cheGitAPI: CheGitApi = e2eContainer.get(CLASSES.CheGitApi); const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree); const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin); const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil); +const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); suite('Git with ssh workflow', async () => { const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`; - const wsNameCheckGeneratingKeys = 'checkGeneraringSsh'; + const wsNameCheckGeneratingKeys = 'checkGeneratingSsh'; const wsNameCheckPropagatingKeys = 'checkPropagatingSsh'; const committedFile = 'README.md'; suiteSetup(async function () { const wsConfig = await testWorkspaceUtils.getBaseDevfile(); wsConfig.metadata!.name = wsNameCheckGeneratingKeys; + await driverHelper.navigateToUrl(TestConstants.TS_SELENIUM_BASE_URL); + await loginPage.login(); await testWorkspaceUtils.createWsFromDevFile(wsConfig); }); test('Login into workspace and open tree container', async () => { + await dashboard.waitPage(); await driverHelper.navigateToUrl(workspacePrefixUrl + wsNameCheckGeneratingKeys); - await loginPage.login(); await ide.waitWorkspaceAndIde(); await projectTree.openProjectTreeContainer(); await driverHelper.wait(TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT); @@ -98,7 +102,10 @@ suite('Git with ssh workflow', async () => { data.metadata!.name = wsNameCheckPropagatingKeys; await testWorkspaceUtils.createWsFromDevFile(data); + // update view of dashboard, it's related to https://github.com/eclipse/che/issues/19020 + await driverHelper.reloadPage(); await driverHelper.navigateToUrl(workspacePrefixUrl + wsNameCheckPropagatingKeys); + await dashboard.waitPage(); await ide.waitWorkspaceAndIde(); await projectTree.openProjectTreeContainer(); await driverHelper.wait(TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT); diff --git a/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts b/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts index f0bb72d8aa..964639c911 100644 --- a/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts +++ b/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts @@ -282,7 +282,7 @@ suite('Validation of debug functionality', async () => { } catch (err) { Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18034 issue.'); await debugView.clickOnThreadsViewTitle(); - + await debugView.waitForDebuggerToConnect(); }