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

Create stable IDs for all components #2361

Closed
vladitasev opened this issue Oct 15, 2020 · 2 comments
Closed

Create stable IDs for all components #2361

vladitasev opened this issue Oct 15, 2020 · 2 comments
Labels

Comments

@vladitasev
Copy link
Contributor

vladitasev commented Oct 15, 2020

We already have:

	/**
	 * Use this method in order to get a reference to element in the shadow root of a web component
	 * @public
	 * @param {String} refName Defines the name of the stable DOM ref
	 */
	getStableDomRef(refName) {
		return this.getDomRef().querySelector(`[data-ui5-stable=${refName}]`);
	}

in UI5Element.js. Example usage: data-ui5-stable="{{this.stableDomRef}}"

Add stable IDs to all relevant parts of the components so that tests can easily access them without the risk of breaking after a refactoring. Document all stable IDs for each component.

@vladitasev
Copy link
Contributor Author

vladitasev commented Oct 15, 2020

Notes:

  • should work for static area too
  • document all such stable IDs in the class description as a start.

@vladitasev
Copy link
Contributor Author

Not relevant any more

  • no static area
  • many internal elements already have parts
  • there are already cypress utils for testing that help with this

@github-project-automation github-project-automation bot moved this from New to Completed in Planning - Topic Core Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

No branches or pull requests

2 participants