Skip to content

[Test] Update E2E tests for the User Dashboard UI redesign#23774

Merged
artaleks9 merged 27 commits intomainfrom
che#23736-2
Apr 2, 2026
Merged

[Test] Update E2E tests for the User Dashboard UI redesign#23774
artaleks9 merged 27 commits intomainfrom
che#23736-2

Conversation

@artaleks9
Copy link
Copy Markdown
Contributor

@artaleks9 artaleks9 commented Mar 18, 2026

What does this PR do?

This PR updates locators of UI Che Dashboard according redesign based on PatternFly 6.
These changes fix up the E2E tests, which use for testing Dev Spaces (including functional-tests, ds-miscellaneous-tests, factory pipelines)

Screenshot/screencast of this PR

What issues does this PR fix or reference?

#23736

How to test this PR?

Run the tests against Dev Spaces locally or using pipelines functional-tests, ds-miscellaneous-tests, factory with the specific devspaces-dashboard image and these PR changes

Preliminary results of pipeline launch:

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@artaleks9 artaleks9 self-assigned this Mar 18, 2026
@artaleks9 artaleks9 requested review from olkornii and removed request for musienko-maxim March 18, 2026 13:29
Copy link
Copy Markdown
Contributor

@olkornii olkornii left a comment

Choose a reason for hiding this comment

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

LGTM

@olkornii olkornii self-requested a review March 18, 2026 14:44
Copy link
Copy Markdown
Contributor

@olkornii olkornii left a comment

Choose a reason for hiding this comment

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

PR is in WIP for now, waiting

Copy link
Copy Markdown
Contributor

@SkorikSergey SkorikSergey left a comment

Choose a reason for hiding this comment

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

Looks good for me.

Copy link
Copy Markdown
Contributor

@svor svor left a comment

Choose a reason for hiding this comment

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

lgtm

@svor svor self-requested a review March 24, 2026 09:42
@artaleks9 artaleks9 changed the title [WIP][Test] Update E2E tests for the User Dashboard UI redesign [Test] Update E2E tests for the User Dashboard UI redesign Mar 31, 2026
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


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.css('button[id*="GitServices"]');
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.

It would be better to use exact By.id('pf-tab-GitServices-user-preferences-tabs') here.
Substring selectors are more permissive than needed and could match unintended elements.

Suggested change
private static readonly GIT_SERVICES_TAB: By = By.css('button[id*="GitServices"]');
private static readonly GIT_SERVICES_TAB: By = By.id('pf-tab-GitServices-user-preferences-tabs');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

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.css('button[id*="GitServices"]');
private static readonly GIT_SERVICES_REVOKE_BUTTON: By = By.css('button[data-testid*="revoke-button"]');
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.

Worth switching to exact match data-testid="revoke-button" - DELETE_ITEM_BUTTON_ENABLED a few lines below already uses the exact value successfully. No need for substring match when the precise value is known.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GIT_SERVICES_REVOKE_BUTTON and DELETE_ITEM_BUTTON_ENABLED are different objects, their locators do not match.
I'll fix GIT_SERVICES_REVOKE_BUTTON by using the full value of data-testid -> bulk-revoke-button.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

The PR looks good to merge, although there are a few non-critical notices.

Thank you for the test update, @artaleks9 !

@artaleks9 artaleks9 merged commit 34a1ff2 into main Apr 2, 2026
5 checks passed
@artaleks9 artaleks9 deleted the che#23736-2 branch April 2, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants