Commit e6a7935e authored by Alex Danilo's avatar Alex Danilo Committed by Commit Bot

Simplify intgration test for recents folder.

Change https://chromium-review.googlesource.com/c/chromium/src/+/1491736
adds a test that uses the gear menu to select files in the main
FilesApp list view.

This change simplifies the unit test to use Ctrl-A to select which
is simpler and decouples the test from behavior of the gear menu.

Bug: 935345
Tests: Changed integration test and checked it still works.
Change-Id: I5e52209d2d9e7ae383b6b5bcb87266f2f2459fba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504595
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638379}
parent c439e081
...@@ -14,22 +14,8 @@ async function verifyRecents(appId, expectedRecents = RECENT_ENTRY_SET) { ...@@ -14,22 +14,8 @@ async function verifyRecents(appId, expectedRecents = RECENT_ENTRY_SET) {
await remoteCall.waitForFiles(appId, files); await remoteCall.waitForFiles(appId, files);
// Select all the files and check that the delete button isn't visible. // Select all the files and check that the delete button isn't visible.
// First, wait for the gear menu button to appear. const ctrlA = ['#file-list', 'a', true, false, false];
await remoteCall.waitForElement(appId, '#gear-button'); await remoteCall.callRemoteTestUtil('fakeKeyDown', appId, ctrlA);
// Click the gear menu button.
chrome.test.assertTrue(await remoteCall.callRemoteTestUtil(
'fakeMouseClick', appId, ['#gear-button']));
// Check: #select-all command is shown, and enabled (there are files).
await remoteCall.waitForElement(
appId,
'#gear-menu:not([hidden]) cr-menu-item' +
'[command=\'#select-all\']' +
':not([disabled]):not([hidden])');
// Click on the #gear-menu-select-all item.
chrome.test.assertTrue(await remoteCall.callRemoteTestUtil(
'fakeMouseClick', appId, ['#gear-menu-select-all']));
// Check: the file-list should be selected. // Check: the file-list should be selected.
await remoteCall.waitForElement(appId, '#file-list li[selected]'); await remoteCall.waitForElement(appId, '#file-list li[selected]');
......
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