summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/resources/FrontendInitialResourceUITest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/resources/FrontendLaterLoadedResourceUITest.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java8
4 files changed, 29 insertions, 0 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
index 32602d40ad..f84aeca14c 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ImmediateUpload.java
@@ -6,6 +6,8 @@ import com.vaadin.ui.Upload;
public class ImmediateUpload extends AbstractTestUI {
+ public static final String TEST_MIME_TYPE = "image/png";
+
/*
* (non-Javadoc)
*
@@ -18,6 +20,7 @@ public class ImmediateUpload extends AbstractTestUI {
// by default is in immediate mode (since 8.0)
Upload immediateUpload = new Upload();
immediateUpload.setId("immediateupload");
+ immediateUpload.setAcceptMimeTypes(TEST_MIME_TYPE);
addComponent(immediateUpload);
Upload upload = new Upload();
diff --git a/uitest/src/test/java/com/vaadin/tests/resources/FrontendInitialResourceUITest.java b/uitest/src/test/java/com/vaadin/tests/resources/FrontendInitialResourceUITest.java
index 7f2748461c..a387b89486 100644
--- a/uitest/src/test/java/com/vaadin/tests/resources/FrontendInitialResourceUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/resources/FrontendInitialResourceUITest.java
@@ -1,15 +1,24 @@
package com.vaadin.tests.resources;
+import java.util.List;
+
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.openqa.selenium.By;
+import org.openqa.selenium.remote.DesiredCapabilities;
+import com.vaadin.testbench.parallel.Browser;
import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class FrontendInitialResourceUITest extends MultiBrowserTest {
+ @Override
+ protected List<DesiredCapabilities> getBrowserCapabilities(Browser... browsers) {
+ return getBrowsersExcludingPhantomJS();
+ }
+
@Test
public void correctEs5Es6FileImportedThroughFrontend() {
openTestURL();
diff --git a/uitest/src/test/java/com/vaadin/tests/resources/FrontendLaterLoadedResourceUITest.java b/uitest/src/test/java/com/vaadin/tests/resources/FrontendLaterLoadedResourceUITest.java
index f2e1583f15..2f3223317f 100644
--- a/uitest/src/test/java/com/vaadin/tests/resources/FrontendLaterLoadedResourceUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/resources/FrontendLaterLoadedResourceUITest.java
@@ -1,16 +1,25 @@
package com.vaadin.tests.resources;
+import java.util.List;
+
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.openqa.selenium.By;
+import org.openqa.selenium.remote.DesiredCapabilities;
import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.parallel.Browser;
import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class FrontendLaterLoadedResourceUITest extends MultiBrowserTest {
+ @Override
+ protected List<DesiredCapabilities> getBrowserCapabilities(Browser... browsers) {
+ return getBrowsersExcludingPhantomJS();
+ }
+
@Test
public void correctEs5Es6FileImportedThroughFrontend() {
openTestURL();
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
index f97b8e9b09..511c1a430c 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ImmediateUploadTest.java
@@ -1,5 +1,6 @@
package com.vaadin.tests.themes.valo;
+import static com.vaadin.tests.themes.valo.ImmediateUpload.TEST_MIME_TYPE;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
@@ -74,4 +75,11 @@ public class ImmediateUploadTest extends MultiBrowserTest {
// don't show the upload window, not at least in firefox.
assertThat(input.getCssValue("z-index"), is("-1"));
}
+
+ @Test
+ public void testAcceptAttribute()
+ {
+ WebElement input = getUploadFileInput("immediateupload");
+ assertThat(input.getAttribute("accept"),is(TEST_MIME_TYPE));
+ }
}