aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/flash/FlashIsVisibleTest.java
blob: defd6367cb3a5264df4e89eb5a12b4777d7fd6fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.vaadin.tests.components.flash;

import java.util.List;

import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;

import com.vaadin.testbench.parallel.Browser;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class FlashIsVisibleTest extends MultiBrowserTest {

    @Override
    public List<DesiredCapabilities> getBrowsersToTest() {
        // FF and PhantomJS fail at Flash and ShiftClick
        List<DesiredCapabilities> capabilities = getBrowsersSupportingShiftClick();
        // Flash support in Chrome is disabled
        capabilities.removeAll(getBrowserCapabilities(Browser.CHROME));
        return capabilities;
    }

    @Test
    public void testFlashIsCorrectlyDisplayed() throws Exception {
        openTestURL();
        /* Allow the flash plugin to load before taking the screenshot */
        sleep(5000);
        compareScreen("blue-circle");
    }
}