Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(playwright): adding data-testid to support e2e tests #744

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yash37158
Copy link

Notes for Reviewers
Added data-testid for supporting playwright e2e test for UI/Environments
This PR fixes UI/environment Playwright test

Signed commits

  • Yes, I signed my commits.

@leecalcote leecalcote added the area/tests Testing / quality assurance label Oct 3, 2024
@@ -215,7 +215,7 @@ function TransferList({
listId?: string
) => (
<StyledPaper>
<List dense component="div" role="list">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to use test id in meshery/meshery as the parent of this sistent element, and find them by role or aria-label. It's enough to distinguish the element i think. Wdyt?

https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-label

@nebula-aac
Copy link
Contributor

@yash37158 Are you suggesting to add data-testid to support e2e in sistent or from Meshery UI?

If it is meant for Meshery UI, I would suggest against this, as it can confuse future e2e testing for sistent versus Meshery UI.

@jerensl
Copy link
Contributor

jerensl commented Oct 31, 2024

@yash37158 Are you suggesting to add data-testid to support e2e in sistent or from Meshery UI?

If it is meant for Meshery UI, I would suggest against this, as it can confuse future e2e testing for sistent versus Meshery UI.

I agree with this especially MUI styled do not accept non standard attributes like data-testid if im not mistaken

styled-components/styled-components#439

@yash37158
Copy link
Author

@jerensl I understand that the Meshery UI has some reliability issues when it comes to consistently loading components. Additionally, dependency injection isn't feasible within the Playwright tests. What other options are available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Testing / quality assurance
Development

Successfully merging this pull request may close these issues.

4 participants