Commit 50cba637 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Fix navigateWithDirectoryTree to work for Drive and Team Drives

Fix is used on crrev.com/c/1188046

Change-Id: I9edeeac193584599230a9348e21e93ae4aec887c
Reviewed-on: https://chromium-review.googlesource.com/1229738Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592672}
parent 089ace6c
...@@ -524,9 +524,9 @@ RemoteCallFilesApp.prototype.navigateWithDirectoryTree = function( ...@@ -524,9 +524,9 @@ RemoteCallFilesApp.prototype.navigateWithDirectoryTree = function(
'fakeMouseClick', windowId, [`[full-path-for-testing="${path}"]`]); 'fakeMouseClick', windowId, [`[full-path-for-testing="${path}"]`]);
}) })
.then(() => { .then(() => {
if (rootLabel === 'My Drive') { // Entries within Drive starts with /root/ but it isn't displayed in the
path = path.replace(/^\/root\//, '/'); // breadcrubms used by waitUntilCurrentDirectoryIsChanged.
} path = path.replace(/^\/root\//, '/').replace(/^\/team_drives/, '');
// Wait until the Files app is navigated to the path. // Wait until the Files app is navigated to the path.
return this.waitUntilCurrentDirectoryIsChanged( return this.waitUntilCurrentDirectoryIsChanged(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment