diff options
author | Artur Signell <artur@vaadin.com> | 2013-11-29 16:53:05 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-11-29 16:53:05 +0200 |
commit | 74dcb6f2478f611ce828a9fee7c7be52812af964 (patch) | |
tree | bfa771219b50503bf21127fafed6f63c86321043 | |
parent | 37919d14b7509b1c8d8495a3e334d50a913bfe6f (diff) | |
download | vaadin-framework-74dcb6f2478f611ce828a9fee7c7be52812af964.tar.gz vaadin-framework-74dcb6f2478f611ce828a9fee7c7be52812af964.zip |
Correct assertion message which changed due to #12915
Converted to TB3 to allow running on only one browser
Change-Id: I8a0d20cfb5af798d8b89f3fca86ef7d9d7a37527
3 files changed, 50 insertions, 27 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index a2f3c59f07..47d3a19fde 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -280,7 +280,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { } - throw new ClassNotFoundException(); + throw new ClassNotFoundException(baseName); } private Logger getLogger() { diff --git a/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.html b/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.html deleted file mode 100644 index 6ed410fdb6..0000000000 --- a/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.html +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head profile="http://selenium-ide.openqa.org/profiles/test-case"> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link rel="selenium.base" href="http://localhost:8888/" /> -<title>New Test</title> -</head> -<body> -<table cellpadding="1" cellspacing="1" border="1"> -<thead> -<tr><td rowspan="1" colspan="3">New Test</td></tr> -</thead><tbody> -<tr> - <td>open</td> - <td>/run/ClassThatIsNotPresent?restartApplication</td> - <td></td> -</tr> -<tr> - <td>assertText</td> - <td>//pre[2]</td> - <td>*java.lang.InstantiationException: Failed to load application class: ClassThatIsNotPresent*</td> -</tr> -</tbody></table> -</body> -</html> diff --git a/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.java b/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.java new file mode 100644 index 0000000000..c2222c4608 --- /dev/null +++ b/uitest/src/com/vaadin/tests/applicationservlet/NoApplicationClass.java @@ -0,0 +1,49 @@ +/* + * Copyright 2000-2013 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.applicationservlet; + +import java.util.Collections; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.remote.DesiredCapabilities; + +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class NoApplicationClass extends MultiBrowserTest { + + @Test + public void testInvalidApplicationClass() { + openTestURL(); + String exceptionMessage = getDriver().findElement(By.xpath("//pre[2]")) + .getText(); + Assert.assertTrue(exceptionMessage + .contains("ServletException: ClassThatIsNotPresent")); + } + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + return Collections.singletonList(Browser.CHROME + .getDesiredCapabilities()); + } + + @Override + protected String getDeploymentPath() { + return "/run/ClassThatIsNotPresent"; + } +} |