Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e886e8a authored by Bill Lin's avatar Bill Lin Committed by Android (Google) Code Review
Browse files

Merge "Fix BandSelectionUiTest fail in some device"

parents 6b77172d cc13c69f
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -49,11 +49,12 @@ public class BandSelectionUiTest extends ActivityTest<FilesActivity> {
    public void testBandSelection_someFiles() throws Exception {
        bots.main.switchToGridMode();
        Rect dirListBounds = bots.directory.findDocumentsList().getBounds();
        Rect startDoc = bots.directory.findDocument(fileName2).getBounds();
        // 100 pixels below bottom of file2
        Point start = new Point(startDoc.centerX(), startDoc.bottom + 100);
        // Top left corner
        Point end = new Point(dirListBounds.left + 1, dirListBounds.top + 1);
        Rect startDir = bots.directory.findDocument(dirName1).getBounds();
        Rect endDoc = bots.directory.findDocument(fileName2).getBounds();
        // Start from dir1 center of X and top of Y
        Point start = new Point(startDir.centerX(), dirListBounds.top);
        // End is center of file2
        Point end = new Point(endDoc.centerX(), endDoc.centerY());
        bots.gesture.bandSelection(start, end);

        bots.directory.assertSelection(3);