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

[RFE] ability to read just selected rows from table #391

Open
pondrejk opened this issue Aug 14, 2019 · 2 comments
Open

[RFE] ability to read just selected rows from table #391

pondrejk opened this issue Aug 14, 2019 · 2 comments
Labels
enhancement New feature or request low

Comments

@pondrejk
Copy link
Contributor

Similar functionality like widget_names for limiting the visited tabs when reading would be nice also for table rows. For example session.host.get_details visits all rows in the host details table unnecessarily.

@latran
Copy link
Contributor

latran commented Aug 21, 2019

Just to clarify, you want to read on any selected row or just the first row?

@mirekdlugosz mirekdlugosz added enhancement New feature or request low labels Aug 29, 2019
@mirekdlugosz
Copy link
Contributor

I suspect the main problem here would be API design. Since you can ask for multiple widgets, and each could have their own table, you need ability to specify row from particular table. And then, you could ask for a row, but also limit widgets only to these that do not contain any tables - what should happen then? Also, there are probably cases where you would like to read two or more rows, or maybe a range of rows, or maybe every nth row, or everything except specific rows...

Airgun tables (thanks to widgetastic) already have API to read only specific rows, but entire Airgun was designed around the idea that you interact with page through well-defined entity actions. This "all or nothing" approach to reading is direct result of that design decision, and our inability to read subset of rows from test is consequence of that.

Do you have at least rough estimate of performance gains you expect to see by reading only rows that you actually need? Or are there other reasons you want this ability? I'm afraid providing general solution would mean changing core design of Airgun. As a workaround, we could introduce new action to host entity, one that would return this specific table object - which would allow test to only read data it needs. This goes against framework design, but if expected gains are big enough, we might consider bending the rules a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low
Projects
None yet
Development

No branches or pull requests

3 participants