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

Commit cc13c69f authored by Tony Huang's avatar Tony Huang
Browse files

Fix BandSelectionUiTest fail in some device

The magic number will cause testing fail in devices are QHD, so
Change the start and end point to prevent this fail.

Bug: 114321880
Test: atest BandSelectionUiTest#testBandSelection_someFiles
Change-Id: I46a128346c576c709add31d42ddecf80e6b3b5be
parent 002e9290
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);