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

Commit 12af6ae1 authored by Anton Potapov's avatar Anton Potapov
Browse files

Remove deprecated clickCaptionsButton_logsUiEvent test

VolumeDialogImpl is being replaced soon, so this test is irrelevant now. Removing because of increased flakiness rates

Flag: EXEMPT TEST_ONYL
Fixes: 428037700
Test: atest VolumeDialogImplTest
Change-Id: I243339adb56a349a2bfe7006390ebf7ed2274064
parent d917e7b4
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
@@ -654,34 +654,6 @@ public class VolumeDialogImplTest extends SysuiTestCase {
        }
    }

    /**
     * The click should be a single tap, thus we inject a down and an up event.
     */
    @Test
    public void clickCaptionsButton_logsUiEvent() {
        UiEventLoggerFake logger = new UiEventLoggerFake();
        Events.sUiEventLogger = logger;
        MotionEvent down = MotionEventBuilder.newBuilder()
                .setAction(MotionEvent.ACTION_DOWN).build();
        MotionEvent up = MotionEventBuilder.newBuilder()
                .setAction(MotionEvent.ACTION_UP).build();

        mODICaptionsIcon.onTouchEvent(down);
        mODICaptionsIcon.onTouchEvent(up);
        mTestableLooper.moveTimeForward(300); // to confirm it was only a single tap
        mTestableLooper.processAllMessages();

        boolean foundCaptionLog = false;
        for (UiEventLoggerFake.FakeUiEvent event : logger.getLogs()) {
            if (event.eventId
                    == Events.VolumeDialogEvent.VOLUME_DIALOG_ODI_CAPTIONS_CLICKED.getId()) {
                foundCaptionLog = true;
                break;
            }
        }
        Assert.assertTrue("Did not log the captions button click.", foundCaptionLog);
    }

    /**
     * Pressing the small x button at top right dismisses the captions tooltip.
     */