You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tests, we like to use methods that refer to what you see on the screen instead of having to refer to HTML-level things, such as IDs etc.
So, if you want to refer to an Input, you'd like to refer to it as XPath.input_labelled('Some label'), for example. However, for that to work you need not only the Input in your HTML, but also a Label element, with its for= attribute correctly set.
This means that in basic tests (tests that are not testing bootstrap-styled widgets) we'll have to add a label and an input for the above to work.
In current test code, we might still refer to things by actually giving an XPath string. We may also add the Input and Label etc.
In 5.0 we added web.ui.FormLayout which you can use to do the above tasks quicker. So, instead of doing:
In tests, we like to use methods that refer to what you see on the screen instead of having to refer to HTML-level things, such as IDs etc.
So, if you want to refer to an Input, you'd like to refer to it as XPath.input_labelled('Some label'), for example. However, for that to work you need not only the Input in your HTML, but also a Label element, with its for= attribute correctly set.
This means that in basic tests (tests that are not testing bootstrap-styled widgets) we'll have to add a label and an input for the above to work.
In current test code, we might still refer to things by actually giving an XPath string. We may also add the Input and Label etc.
In 5.0 we added web.ui.FormLayout which you can use to do the above tasks quicker. So, instead of doing:
You can do:
That will also add a validation error message if necessary.
This task is to go hunt down places where we use inputs in test code and make them consistently use this new layout.
The text was updated successfully, but these errors were encountered: