Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions tests/e2e/constants/TIMEOUT_CONSTANTS.ts
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion tests/e2e/pageobjects/dashboard/CreateWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ export class CreateWorkspace {
private getSampleLocator(sampleName: string): By {
Logger.trace(`sampleName: ${sampleName}, used default editor`);

return By.xpath(`//article[contains(@class, 'sample-card')]//div[text()='${sampleName}']`);
return By.xpath(`//div[contains(@id, 'sample-card') and text()='${sampleName}']`);
}
}
2 changes: 1 addition & 1 deletion tests/e2e/pageobjects/dashboard/TrustAuthorPopup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { TIMEOUT_CONSTANTS } from '../../constants/TIMEOUT_CONSTANTS';

@injectable()
export class TrustAuthorPopup {
private static readonly CONTINUE_BUTTON: By = By.xpath('//button[text()="Continue"]');
private static readonly CONTINUE_BUTTON: By = By.xpath('//span[text()="Continue"]');
private static readonly TRUST_AUTHOR_POPUP_PAGE: By = By.xpath(
'//span[contains(text(), "Do you trust the authors of this repository?")]'
);
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/pageobjects/dashboard/UserPreferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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"]');
Expand All @@ -38,15 +38,15 @@ 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');

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
25 changes: 13 additions & 12 deletions tests/e2e/pageobjects/dashboard/Workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ export enum WorkspaceStatusUI {

@injectable()
export class Workspaces {
private static readonly ADD_WORKSPACE_BUTTON: By = By.xpath('//button[text()="Add Workspace"]');
private static readonly ADD_WORKSPACE_BUTTON: By = By.css('button[aria-label="Add Workspace"]');
private static readonly WORKSPACE_ITEM_TABLE_NAME_SECTION: By = By.xpath('//td[@data-label="Name"]/span/a');
private static readonly DELETE_WORKSPACE_BUTTON_ENABLED: By = By.xpath(
'//button[@data-testid="delete-workspace-button" and not(@disabled)]'
);
private static readonly WORKSPACE_ACTION_POPUP: By = By.css('div[class*="workspaceActionSelector"]');
private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.xpath('//input[@data-testid="confirmation-checkbox"]');
private static readonly CONFIRMATION_WINDOW: By = By.xpath('//div[@aria-label="Delete workspaces confirmation window"]');
private static readonly LEARN_MORE_DOC_LINK: By = By.xpath('//div/p/a');
Expand Down Expand Up @@ -99,7 +100,7 @@ export class Workspaces {
async waitActionsPopup(workspaceName: string, timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise<void> {
Logger.debug(`of the '${workspaceName}' list item`);

await this.driverHelper.waitVisibility(this.getExpandedActionsLocator(workspaceName), timeout);
await this.driverHelper.waitVisibility(Workspaces.WORKSPACE_ACTION_POPUP, timeout);
}

async openActionsPopup(workspaceName: string, timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise<void> {
Expand All @@ -112,19 +113,19 @@ export class Workspaces {
async clickActionsDeleteButton(workspaceName: string): Promise<void> {
Logger.debug(`for the '${workspaceName}' list item`);

await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Delete Workspace'));
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator('Delete Workspace'));
}

async clickActionsStopWorkspaceButton(workspaceName: string): Promise<void> {
Logger.debug(`for the '${workspaceName}' list item`);
// todo: workaround because of issue CRW-3649
try {
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Stop Workspace'));
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator('Stop Workspace'));
} catch (e) {
Logger.warn(`for the '${workspaceName}' list item - popup was missed, try to click one more time (issue CRW-3649).`);

await this.driverHelper.waitAndClick(this.getActionsLocator(workspaceName));
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Stop Workspace'));
await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator('Stop Workspace'));
}
}

Expand Down Expand Up @@ -214,7 +215,7 @@ export class Workspaces {
}

private getWorkspaceListItemLocator(workspaceName: string): By {
return By.xpath(`//tr[td//a[text()='${workspaceName}']]`);
return By.xpath(`//tr[td//span[text()='${workspaceName}']]`);
}

private getWorkspaceStatusLocator(workspaceName: string, workspaceStatus: WorkspaceStatusUI): By {
Expand All @@ -226,21 +227,21 @@ export class Workspaces {
}

private getActionsLocator(workspaceName: string): By {
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}/td/div/button[@aria-label='Actions']`);
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}/td/button[@aria-label='Actions']`);
}

private getExpandedActionsLocator(workspaceName: string): By {
/* private getExpandedActionsLocator(workspaceName: string): By {
return By.xpath(
`${this.getWorkspaceListItemLocator(workspaceName).value}//button[@aria-label='Actions' and @aria-expanded='true']`
);
}
}*/

private getActionsPopupButtonLocator(workspaceName: string, buttonText: string): By {
return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//button[text()='${buttonText}']`);
private getActionsPopupButtonLocator(buttonText: string): By {
return By.css(`button[aria-label="Action: ${buttonText}"]`);
}

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

private getOpenWorkspaceDetailsLinkLocator(workspaceName: string): By {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/tests-library/WorkspaceHandlingTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import { By, error } from 'selenium-webdriver';
@injectable()
export class WorkspaceHandlingTests {
private static WORKSPACE_NAME: By = By.xpath('//h1[contains(.,"Starting workspace ")]');
private static WORKSPACE_STATUS: By = By.xpath('//*/span[@class="pf-c-label__content"]');
private static WORKSPACE_ALERT_TITLE: By = By.xpath('//h4[@class="pf-c-alert__title"]');
private static WORKSPACE_ALERT_DESCRIPTION: By = By.xpath('//*/div[@class="pf-c-alert__description"]');
private static WORKSPACE_STATUS: By = By.css('span[class*="label__content"]');
private static WORKSPACE_ALERT_TITLE: By = By.css('h4[class*="alert__title"]');
private static WORKSPACE_ALERT_DESCRIPTION: By = By.css('div[class*="alert__description"]');
private static workspaceName: string = 'undefined';
private static parentGUID: string;

Expand Down
Loading