Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
354888c
Update locators according to new UI Dashboard
artaleks9 Mar 2, 2026
19b97f3
Merge branch 'main' of github.com:eclipse/che into che#23736
artaleks9 Mar 4, 2026
e70951e
Fix 'SshUrlNoOauthPatFactory' 'RefusedOAuthFactory' E2E tests
artaleks9 Mar 5, 2026
54b05ac
Resolve merge conflict
artaleks9 Mar 18, 2026
0dbe81f
Update locators
artaleks9 Mar 19, 2026
42d3b2f
Synchronize with main branch
artaleks9 Mar 24, 2026
8d54bcb
Do formatting
artaleks9 Mar 24, 2026
6b667d8
Merge branch 'main' of github.com:eclipse/che into che#23736-2
artaleks9 Mar 25, 2026
ab47259
Merge branch 'main' of github.com:eclipse/che into che#23736-2
artaleks9 Mar 25, 2026
319fa3f
Fix locators relaed to 'RevokeOauth' test
artaleks9 Mar 26, 2026
22ac017
Fix up 'CreateWorkspaceWithExistingNameFromGitUrl' test
artaleks9 Mar 26, 2026
2b17e42
Fix up
artaleks9 Mar 27, 2026
e7ffcb1
Fix up
artaleks9 Mar 27, 2026
c2c6d09
Fix up
artaleks9 Mar 27, 2026
d9d0a46
Fix up
artaleks9 Mar 27, 2026
3b21562
Fix up
artaleks9 Mar 27, 2026
316851d
Add timeout to debug
artaleks9 Mar 30, 2026
99faf26
Merge branch 'main' of github.com:eclipse/che into che#23736-2
artaleks9 Mar 30, 2026
f8d5863
Add steps to debug losing of text
artaleks9 Mar 30, 2026
21293c8
Add timeout steps to debug
artaleks9 Mar 30, 2026
356c5a9
Merge branch 'main' of github.com:eclipse/che into che#23736-2
artaleks9 Mar 30, 2026
c52b927
Change timeout in debug steps
artaleks9 Mar 30, 2026
99104bc
Fix up timeout debug
artaleks9 Mar 30, 2026
16124f6
Remove debug steps
artaleks9 Mar 30, 2026
4604411
Fix up 'Documentation' test
artaleks9 Mar 30, 2026
7636cc5
Update copyright lines
artaleks9 Apr 1, 2026
286e867
Fix up locators according to review
artaleks9 Apr 2, 2026
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
6 changes: 3 additions & 3 deletions tests/e2e/constants/TIMEOUT_CONSTANTS.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** *******************************************************************
* copyright (c) 2020-2023 Red Hat, Inc.
* copyright (c) 2020-2026 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -95,9 +95,9 @@ export const TIMEOUT_CONSTANTS: {
// -------------------------------------------- PROJECT TREE --------------------------------------------

/**
* expand item in project tree, "8 000" by default.
* expand item in project tree, "10 000" by default.
*/
TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT: Number(process.env.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) || 8_000,
TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT: Number(process.env.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) || 10_000,

// -------------------------------------------- EDITOR --------------------------------------------

Expand Down
33 changes: 16 additions & 17 deletions tests/e2e/pageobjects/dashboard/CreateWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ import { TrustAuthorPopup } from './TrustAuthorPopup';

@injectable()
export class CreateWorkspace {
private static readonly FACTORY_URL: By = By.xpath('//input[@id="git-repo-url"]');
private static readonly FACTORY_URL: By = By.id('git-repo-url');
private static readonly GIT_REPO_OPTIONS: By = By.xpath('//span[text()="Git Repo Options"]');
private static readonly GIT_BRANCH_NAME: By = By.xpath(
'//div[text()="Select the branch of the Git Repository"]/preceding-sibling::div'
);
private static readonly GIT_BRANCH_SEARCH_FIELD: By = By.css('input[type="search"]');
private static readonly PATH_TO_DEVFILE: By = By.xpath('//input[@aria-label="Path to Devfile"]');
private static readonly CREATE_AND_OPEN_BUTTON: By = By.xpath('//button[@id="create-and-open-button"]');
private static readonly CREATE_NEW_WORKPACE_CHECKBOX: By = By.xpath('//label[@for="create-new-if-exist-switch"]');
private static readonly CREATE_NEW_WORKPACE_CHECKBOX_VALUE: By = By.xpath('//input[@id="create-new-if-exist-switch"]');

private static readonly GIT_BRANCH_SELECT_FIELD: By = By.xpath('//span[text()="Select the branch of the Git Repository"]');
private static readonly GIT_FILTER_BRANCHES: By = By.css('input[placeholder="Filter branches"]');
private static readonly CREATE_AND_OPEN_BUTTON: By = By.id('create-and-open-button');
private static readonly CREATE_NEW_WORKPACE_CHECKBOX: By = By.css('label[for="create-new-if-exist-switch"]');
private static readonly CREATE_NEW_WORKPACE_CHECKBOX_VALUE: By = By.id('create-new-if-exist-switch');

constructor(
@inject(CLASSES.DriverHelper)
Expand Down Expand Up @@ -87,23 +85,23 @@ export class CreateWorkspace {

if (branchName) {
await this.driverHelper.waitAndClick(CreateWorkspace.GIT_REPO_OPTIONS, timeout);

await this.driverHelper.waitAndClick(CreateWorkspace.GIT_BRANCH_NAME, timeout);

await this.driverHelper.waitVisibility(CreateWorkspace.GIT_BRANCH_SEARCH_FIELD, timeout);
await this.driverHelper.type(CreateWorkspace.GIT_BRANCH_SEARCH_FIELD, Key.chord(branchName), timeout);
await this.driverHelper.waitAndClick(CreateWorkspace.GIT_BRANCH_SELECT_FIELD, timeout);
await this.driverHelper.waitAndClick(CreateWorkspace.GIT_FILTER_BRANCHES, timeout);
await this.driverHelper.type(CreateWorkspace.GIT_FILTER_BRANCHES, Key.chord(branchName), timeout);
await this.driverHelper.waitAndClick(this.getGitBranchListItemLocator(branchName), timeout);
}

await this.driverHelper.waitAndClick(CreateWorkspace.CREATE_AND_OPEN_BUTTON, timeout);

await this.performTrustAuthorPopup();
}

async setGitRepositoryUrl(factoryUrl: string, timeout: number = TIMEOUT_CONSTANTS.TS_CLICK_DASHBOARD_ITEM_TIMEOUT): Promise<void> {
Logger.debug(`factoryUrl: "${factoryUrl}"`);
await this.driverHelper.waitVisibility(CreateWorkspace.FACTORY_URL, timeout);
await this.driverHelper.type(CreateWorkspace.FACTORY_URL, Key.chord(factoryUrl), timeout);
await this.driverHelper.type(CreateWorkspace.FACTORY_URL, factoryUrl, timeout);

const actualFactoryUrl: string = await this.getGitRepositoryUrl(timeout);
Logger.info(`[INFO] Git repository URL set to "${actualFactoryUrl}"`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logging looks like a leftover from debugging.
Could you please check whether it is still needed?

Copy link
Copy Markdown
Contributor Author

@artaleks9 artaleks9 Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in general, this can be deleted.
It was added, because the test CreateWorkspaceWithExistingNameFromGitUrl was failing, a part of text in the Url field was lost and it was difficult to define from the log in what moment it happened. So I decided to leave it. Now with the last image-dashboard the test passes.

20:58:32        AssertionError: expected '[https://github.com/crw-qe/python-hell…](https://github.com/crw-qe/python-hell%E2%80%A6)' to equal '[https://github.com/crw-qe/python-hell…](https://github.com/crw-qe/python-hell%E2%80%A6)'
20:58:32        + expected - actual
20:58:32  
20:58:32        -https://github.com/crw-qe/python-hello-worl?new
20:58:32        +https://github.com/crw-qe/python-hello-world?new

}

async getGitRepositoryUrl(timeout: number = TIMEOUT_CONSTANTS.TS_CLICK_DASHBOARD_ITEM_TIMEOUT): Promise<string> {
Expand Down Expand Up @@ -184,6 +182,7 @@ export class CreateWorkspace {

// click to change state
Logger.debug(`Checkbox is ${isCurrentlyChecked ? 'set' : 'unset'}, ${checked ? 'setting' : 'unsetting'} it now`);
await this.driverHelper.wait(TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM); // wait for any potential UI updates before clicking
await this.driverHelper.scrollToAndClick(CreateWorkspace.CREATE_NEW_WORKPACE_CHECKBOX, timeout);
}

Expand Down Expand Up @@ -217,6 +216,6 @@ export class CreateWorkspace {
}

private getGitBranchListItemLocator(branchName: string): By {
return By.css(`li[id="${branchName}"] button.pf-c-select__menu-item`);
return By.xpath(`//ul[@role="listbox"]//span[text()="${branchName}"]`);
}
}
7 changes: 3 additions & 4 deletions tests/e2e/pageobjects/dashboard/Dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** *******************************************************************
* copyright (c) 2019-2024 Red Hat, Inc.
* copyright (c) 2019-2026 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -32,7 +32,6 @@ export class Dashboard {
'//div[text()="Several workspaces created from the same repository have been found. Should you want to open one of the existing workspaces or create a new one, please choose the corresponding action."]'
);
private static readonly EXISTING_WORKSPACE_FOUND_LIST: By = By.xpath('//button//span[text()="Open the existing workspace"]');
private static readonly EXISTING_WORKSPACE_NAME: By = By.xpath('//li//a[text()="python-hello-world"]"]');
private static readonly CREATE_NEW_WORKSPACE_LINK: By = By.xpath('//button[text()="Create a new workspace"]');
private static readonly ABOUT_DIALOG_ITEM_DATA_TEST_IDS: any = {
serverVersion: 'server-version',
Expand Down Expand Up @@ -191,7 +190,7 @@ export class Dashboard {
await this.driverHelper.waitVisibility(Dashboard.EXISTING_WORKSPACE_FOUND_LIST);
const element: WebElement = await this.driverHelper.waitPresence(Dashboard.EXISTING_WORKSPACE_FOUND_LIST);
await this.driverHelper.getDriver().executeScript('arguments[0].click();', element);
await this.driverHelper.waitAndClick(By.xpath(`//li//a[text()="${workspaceName}"]`));
await this.driverHelper.waitAndClick(By.xpath(`//li//span[text()="${workspaceName}"]`));
}

async clickOnCreateNewWorkspaceButton(timeout: number = TIMEOUT_CONSTANTS.TS_CLICK_DASHBOARD_ITEM_TIMEOUT): Promise<void> {
Expand Down Expand Up @@ -239,7 +238,7 @@ export class Dashboard {
}

private getAboutMenuItemButtonLocator(text: string): By {
return By.xpath(`//li/button[text()="${text}"]`);
return By.xpath(`//li//span[text()="${text}"]`);
}

private getAboutDialogWindowItemLocator(itemDataTestId: string): By {
Expand Down
26 changes: 13 additions & 13 deletions tests/e2e/pageobjects/dashboard/UserPreferences.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** *******************************************************************
* copyright (c) 2019-2025 Red Hat, Inc.
* copyright (c) 2019-2026 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand All @@ -21,13 +21,13 @@ import { TIMEOUT_CONSTANTS } from '../../constants/TIMEOUT_CONSTANTS';
@injectable()
export class UserPreferences {
private static readonly USER_SETTINGS_DROPDOWN: By = By.xpath('//header//button/span[text()!=""]//parent::button');
private static readonly USER_PREFERENCES_BUTTON: By = By.xpath('//button[text()="User Preferences"]');
private static readonly USER_PREFERENCES_BUTTON: By = By.xpath('//span[text()="User Preferences"]');
private static readonly USER_PREFERENCES_PAGE: By = By.xpath('//h1[text()="User Preferences"]');

private static readonly CONTAINER_REGISTRIES_TAB: By = By.xpath('//button[text()="Container Registries"]');

private static readonly GIT_SERVICES_TAB: By = By.xpath('//button[text()="Git Services"]');
private static readonly GIT_SERVICES_REVOKE_BUTTON: By = By.xpath('//button[text()="Revoke"]');
private static readonly GIT_SERVICES_TAB: By = By.id('pf-tab-GitServices-user-preferences-tabs');
private static readonly GIT_SERVICES_REVOKE_BUTTON: By = By.css('button[data-testid="bulk-revoke-button"]');

private static readonly PAT_TAB: By = By.xpath('//button[text()="Personal Access Tokens"]');
private static readonly ADD_NEW_PAT_BUTTON: By = By.xpath('//button[text()="Add Personal Access Token"]');
Expand All @@ -38,21 +38,21 @@ export class UserPreferences {
private static readonly GIT_CONFIG_SAVE_BUTTON: By = By.css('[data-testid="button-save"]');

private static readonly SSH_KEY_TAB: By = By.xpath('//button[text()="SSH Keys"]');
private static readonly ADD_NEW_SSH_KEY_BUTTON: By = By.xpath('//button[text()="Add SSH Key"]');
private static readonly ADD_NEW_SSH_KEY_BUTTON: By = By.css('button[aria-label="Add SSH Key"]');
private static readonly ADD_SSH_KEYS_POPUP: By = By.xpath('//span[text()="Add SSH Keys"]');
private static readonly PASTE_PRIVATE_SSH_KEY_FIELD: By = By.css('textarea[name="ssh-private-key"]');
private static readonly PASTE_PUBLIC_SSH_KEY_FIELD: By = By.css('textarea[name="ssh-public-key"]');
private static readonly PASTE_SSH_KEY_PASSPHRASE_FIELD: By = By.xpath('//input[@placeholder="Enter passphrase (optional)"]');
private static readonly ADD_SSH_KEYS_BUTTON: By = By.css('.pf-c-button.pf-m-primary');
private static readonly PASTE_PRIVATE_SSH_KEY_FIELD: By = By.id('ssh-private-key');
private static readonly PASTE_PUBLIC_SSH_KEY_FIELD: By = By.id('ssh-public-key');
private static readonly PASTE_SSH_KEY_PASSPHRASE_FIELD: By = By.css('input[placeholder="Enter passphrase (optional)"]');
private static readonly ADD_SSH_KEYS_BUTTON: By = By.xpath('//span[text()="Add"]');
private static readonly GIT_SSH_KEY_NAME: By = By.css('[data-testid="title"]');
private static readonly GIT_SSH_KEY_ACTIONS_BUTTON: By = By.css('section[id*="SshKeys-user-preferences"] button[aria-label="Actions"]');
private static readonly DELETE_BUTTON: By = By.xpath('//button[text()="Delete"]');
private static readonly DELETE_BUTTON: By = By.xpath('//span[text()="Delete"]');
private static readonly CONFIRM_DELETE_SSH_KEYS_POPUP: By = By.css('div[id^="pf-modal-part"][role="dialog"]');
private static readonly CONFIRM_DELETE_SSH_KEYS_CHECKBOX: By = By.id('delete-ssh-keys-warning-checkbox');

private static readonly CONFIRMATION_WINDOW: By = By.xpath('//span[text()="Revoke Git Service"]');
private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.xpath('//input[@data-testid="warning-info-checkbox"]');
private static readonly DELETE_ITEM_BUTTON_ENABLED: By = By.xpath('//button[@data-testid="revoke-button" and not(@disabled)]');
private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.id('revoke-warning-info-check');
private static readonly DELETE_ITEM_BUTTON_ENABLED: By = By.css('button[data-testid="revoke-button"]:not([disabled])');

constructor(
@inject(CLASSES.DriverHelper)
Expand Down Expand Up @@ -146,7 +146,7 @@ export class UserPreferences {

await this.driverHelper.waitAttributeValue(
UserPreferences.GIT_CONFIG_SAVE_BUTTON,
'aria-disabled',
'disabled',
'true',
TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT
);
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/pageobjects/dashboard/Workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ export class Workspaces {
}

private getOpenButtonLocator(workspaceName: string): By {
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//td[contains(@class, 'openIde')]//span[text()='Open']`);
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//button/span[text()='Open']`);
}

private getOpenWorkspaceDetailsLinkLocator(workspaceName: string): By {
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//a[text()='${workspaceName}']`);
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//span[text()='${workspaceName}']`);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** *******************************************************************
* copyright (c) 2019-2023 Red Hat, Inc.
* copyright (c) 2019-2026 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand All @@ -25,7 +25,7 @@ export class WorkspaceDetails {
private static readonly SAVE_BUTTON: By = By.css('button[name="save-button"]');
private static readonly ENABLED_SAVE_BUTTON: By = By.css('button[name="save-button"][aria-disabled="false"]');
private static readonly WORKSPACE_DETAILS_LOADER: By = By.css('workspace-details-overview md-progress-linear');
private static readonly STORAGE_TYPE_INFO_BUTTON: By = By.xpath('//label[@for="storage-type"]//following-sibling::button');
private static readonly STORAGE_TYPE_INFO_BUTTON: By = By.css('span[aria-label="More info for storage type"]');
private static readonly CLOSE_STORAGE_TYPE_INFO_BUTTON: By = By.xpath('//button[@aria-label="Close"]');
private static readonly STORAGE_TYPE_DOC_LINK: By = By.xpath('//div/p/a');
private static readonly DEVFILE_DOC_LINK: By = By.xpath('//a[text()="Devfile Documentation"]');
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/specs/dashboard-samples/Documentation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** *******************************************************************
* copyright (c) 2023 Red Hat, Inc.
* copyright (c) 2023-2026 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -91,6 +91,7 @@ suite(`Check links to documentation page in Dashboard ${BASE_TEST_CONSTANTS.TEST
expect(link.href, `${link.href} not includes ${currentUrl}`).oneOf([currentUrl, currentUrl + '/']);
await browserTabsUtil.switchToWindow(parentGUID);
await browserTabsUtil.closeAllTabsExceptCurrent();
await dashboard.openAboutMenu();
}
});

Expand Down
Loading