New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 850834 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

test.util.sync.getFileList only returns currently visible items

Project Member Reported by sashab@chromium.org, Jun 8 2018

Issue description

In the browser tests, test.util.sync.getFileList does a CSS query into #detail-table to find all the li elements. However, since we recycle elements, this only fetches the entries currently visible in the viewport and not all the entries. This means that tests checking for certain contents inside the files list will fail if there are entries visible but outside the viewport.

To fix this, either:
* Access the internal state of the table to retrieve the entries; or
* Make the function async instead and scroll the list (using .scrollIndexIntoView) until there are no more entries; or
* Resize the File Manager window until they are all visible (although, this might not be possible, since the tests are running a VM-style window which may have maximum bounds)

In the meantime, a workaround is the reduce the number of entries in a test case to less than ~11 so they are always visible.
 

Comment 1 by noel@chromium.org, Jun 12 2018

 ."In the meantime, a workaround is the reduce the number of entries in a test case to less than ~11 so they are always visible."

That's probably the easiest "fix" for no: "don't turn it up past 11."

Comment 2 by sashab@chromium.org, Jun 12 2018

We could add an assert in the setup method that checks the number of entries passed for a volume is less than 11 XD

But it's not that simple, because it's 11 entries *per page*, so we have to account for subdirectories etc. Maybe best to leave it in comments for now.

Sign in to add a comment