CreateNewFolder test: improve createNewFolder helper and related
Stop using navigateWithDirectoryTree in createNewFolder helper (return value unchecked, generally false if checked). All tests navigate the directory tree during test setup by clicking on subtree's expand icon. However, the createFolderNestedDownloads() test needs to do an extra step to navigate into sub-tree 'photos'. Since it is the only test that needs this extra step, navigateWithDirectoryTree can be used to do it, with a post-verify step to check that #file-list updated to the expected visual state (no files shown). Change createNewFolder API: navigateWithDirectoryTree gone so path etc can go. Add a tree |selector| argument so createNewFolder can check if that folders appear in the directory tree. Update the createNewFolder internals: focus the file list, use precise #file-list selectors when checking for [selected] [renaming] row, more checks to confirm that only one file-list row is [selected] [renaming] namely the New Folder entry, and verify the New Folder is "present" in directory tree HTML content. After the new folder is renamed, verify that its name is shown in file list and also in the directory tree. Finally, fully test the file-list selection state at the end of the test (the long way). Bug: 876267 Change-Id: I8693bdc43b95a4c3b510633697fa4b3d85e08051 Reviewed-on: https://chromium-review.googlesource.com/1186008Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#585391}
Showing
Please register or sign in to comment