import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.tests.tb3.MultiBrowserTest;
-import com.vaadin.tests.tb3.AbstractTB3Test.BrowserUtil;
public class VerifyBrowserVersionTest extends MultiBrowserTest {
{
expectedUserAgent
- .put(BrowserUtil.firefox(24),
+ .put(BrowserUtil
+ .firefox(MultiBrowserTest.TESTED_FIREFOX_VERSION),
"Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0");
expectedUserAgent
.put(BrowserUtil.ie(8),
.put(BrowserUtil.ie(11),
"Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko");
expectedUserAgent
- .put(BrowserUtil.chrome(29),
+ .put(BrowserUtil.chrome(MultiBrowserTest.TESTED_CHROME_VERSION),
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36");
- expectedUserAgent
- .put(BrowserUtil.opera(12),
- "Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.15");
+ expectedUserAgent.put(
+ BrowserUtil.opera(MultiBrowserTest.TESTED_OPERA_VERSION),
+ "Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.15");
}
@Test
public void verifyUserAgent() {
openTestURL();
- Assert.assertEquals(
- expectedUserAgent.get(getDesiredCapabilities()),
+ Assert.assertEquals(expectedUserAgent.get(getDesiredCapabilities()),
vaadinElementById("userAgent").getText());
Assert.assertEquals("Touch device? No",
vaadinElementById("touchDevice").getText());
import org.junit.runners.Parameterized.Parameters;
import org.openqa.selenium.remote.DesiredCapabilities;
+import com.vaadin.tests.tb3.MultiBrowserTest;
import com.vaadin.tests.tb3.PrivateTB3Configuration;
/**
* @author Vaadin Ltd
*/
@RunWith(IntegrationTestRunner.class)
-public abstract class AbstractIntegrationTest extends
- PrivateTB3Configuration {
+public abstract class AbstractIntegrationTest extends PrivateTB3Configuration {
@Override
protected String getBaseURL() {
String deploymentUrl = System.getProperty("deployment.url");
@Parameters
public static Collection<DesiredCapabilities> getBrowsersForTest() {
- return Collections.singleton(BrowserUtil.firefox(17));
+ return Collections.singleton(BrowserUtil
+ .firefox(MultiBrowserTest.TESTED_FIREFOX_VERSION));
}
}
private boolean push = false;
{
// Default browser to run on unless setDesiredCapabilities is called
- desiredCapabilities = BrowserUtil.firefox(24);
+ desiredCapabilities = BrowserUtil
+ .firefox(MultiBrowserTest.TESTED_FIREFOX_VERSION);
}
/**
* @return The browsers to run the test on
*/
public Collection<DesiredCapabilities> getBrowsersToTest() {
- return Collections.singleton(BrowserUtil.firefox(17));
+ return Collections.singleton(BrowserUtil
+ .firefox(MultiBrowserTest.TESTED_FIREFOX_VERSION));
}
*/
public abstract class MultiBrowserTest extends PrivateTB3Configuration {
+ public static final int TESTED_SAFARI_VERSION = 6;
+ public static final int TESTED_CHROME_VERSION = 29;
+ public static final int TESTED_FIREFOX_VERSION = 24;
+ public static final int TESTED_OPERA_VERSION = 12;
+
static List<DesiredCapabilities> allBrowsers = new ArrayList<DesiredCapabilities>();
static {
allBrowsers.add(BrowserUtil.ie(8));
allBrowsers.add(BrowserUtil.ie(9));
allBrowsers.add(BrowserUtil.ie(10));
allBrowsers.add(BrowserUtil.ie(11));
- allBrowsers.add(BrowserUtil.firefox(24));
+ allBrowsers.add(BrowserUtil.firefox(TESTED_FIREFOX_VERSION));
// Uncomment once we have the capability to run on Safari 6
- // allBrowsers.add(safari(6));
- allBrowsers.add(BrowserUtil.chrome(29));
- allBrowsers.add(BrowserUtil.opera(12));
+ // allBrowsers.add(safari(TESTED_SAFARI_VERSION));
+ allBrowsers.add(BrowserUtil.chrome(TESTED_CHROME_VERSION));
+ allBrowsers.add(BrowserUtil.opera(TESTED_OPERA_VERSION));
}