Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Files: Add integration tests Breadcrumbs related features
The following features have to be supported by the new breadcrumbs, so adding tests to ensure they still work when the new breadcrumbs is enabled by default. Files app supports the keyboard shortcut to navigate to parent folder using Backspace key. Search within My Drive is always across the whole Drive, so the breadcrumbs should display "My Drive" even if the search was initiated in a sub-folder. Bug: b:228114099 Change-Id: I4a112679421e8f7fcdb91bad3c7472eee506fb08 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3806042 Auto-Submit: Luciano Pacheco <lucmult@chromium.org> Reviewed-by: Ben Reich <benreich@chromium.org> Commit-Queue: Ben Reich <benreich@chromium.org> Cr-Commit-Position: refs/heads/main@{#1032417}
- Loading branch information
Luciano Pacheco
authored and
Chromium LUCI CQ
committed
Aug 8, 2022
1 parent
9e0f4e5
commit 183db82
Showing
5 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
ui/file_manager/integration_tests/file_manager/navigation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import {ENTRIES, RootPath} from '../test_util.js'; | ||
import {testcase} from '../testcase.js'; | ||
|
||
import {remoteCall, setupAndWaitUntilReady} from './background.js'; | ||
|
||
/** Tests that the Backspace key navigates to parent directory. */ | ||
testcase.navigateToParent = async () => { | ||
// Open Files app on local Downloads. | ||
const appId = | ||
await setupAndWaitUntilReady(RootPath.DOWNLOADS, [ENTRIES.beautiful], []); | ||
|
||
// It should start in Downloads. | ||
await remoteCall.waitUntilCurrentDirectoryIsChanged( | ||
appId, '/My files/Downloads'); | ||
|
||
// Send the Backspace key to the file list. | ||
const backspaceKey = ['#file-list', 'Backspace', false, false, false]; | ||
await remoteCall.fakeKeyDown(appId, ...backspaceKey); | ||
|
||
// It should navigate to the parent. | ||
await remoteCall.waitUntilCurrentDirectoryIsChanged(appId, '/My files'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters