-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fast Grid Dump #1876
Comments
I think this is out of scope of TestBench browser tests and should be done with TestBench UI Unit Test instead. |
Perhaps... But then again, the point of Grid is to show the data, and the point of TestBench is to assert on the presence and state of components. In such a context, what sense has |
It is not a question is it possible or not. With current API it is possible already. It is just about performance regarding special cases. Here is one approach of producing two dimensional collection of the WebElements representing slotted content in the Grid. I compared the ten run average run time of the test code only excluding the test start and shutdown time.
The results were assessGridContentTest0: 0.1 sec So it looks like the execution time if the test is 1/3 of the current method. |
I don't think that asserting against the state of the grid is a special case: this is actually the most common case you use TestBench for. And, if the performance of that can be improved by a factor of 50, that is quite a significant improvement which turns "unusable/too slow" into "usable". |
Feature request: I need to test whether the Grid is showing correct data, and for that I need to capture the contents which the Grid is showing, and compare the result against the expected Grid contents, which is just a two-dimensional array of Strings.
Currently what I can do is to call
GridElement.getRows()
, then grab all cells for each row, then callGridTHTDElement.getText()
. However this generates one browser request per every cell, which is hopelessly slow.It would be great if
GridElement
offered a faster way to dump the cells into a 2-dimensional array of Strings: perhaps by dumping/calling the DataProvider directly, or by capturing currently shown data from its HTML structure - can be done page-by-page way.We need this for Vaadin 23/TestBench 23 please.
The text was updated successfully, but these errors were encountered: