diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-17 11:29:23 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-17 11:29:51 +0200 |
commit | 03b01ed2f330ccbe49c6952306e6c15ba30c6b84 (patch) | |
tree | adc1283978b6a256737429f5b159ddf1ed965a95 /uitest | |
parent | 27231ed5c5ecf1760fb15f33a0c5e10e8cc03f27 (diff) | |
parent | a9f24b00e9ddcd5ca19ac2907e0bf2413f036af4 (diff) | |
download | vaadin-framework-03b01ed2f330ccbe49c6952306e6c15ba30c6b84.tar.gz vaadin-framework-03b01ed2f330ccbe49c6952306e6c15ba30c6b84.zip |
Merge remote-tracking branch 'origin/master' into grid
Change-Id: If3dd8380afe425491dfb877c08c4ff078312a3aa
Diffstat (limited to 'uitest')
11 files changed, 459 insertions, 30 deletions
diff --git a/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java new file mode 100644 index 0000000000..ff7faf1965 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2014 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.components.combobox; + +import java.util.Arrays; +import java.util.Locale; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.NativeSelect; + +public class FilteringTurkishLocale extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + + final ComboBox comboBox = new ComboBox("Box", Arrays.asList( + "I without dot", "İ with dot")); + comboBox.setNullSelectionAllowed(false); + + NativeSelect localeSelect = new NativeSelect("Locale", Arrays.asList( + Locale.ENGLISH, new Locale("tr"))); + localeSelect.addValueChangeListener(new ValueChangeListener() { + @Override + public void valueChange(ValueChangeEvent event) { + comboBox.setLocale((Locale) event.getProperty().getValue()); + } + }); + localeSelect.setValue(Locale.ENGLISH); + + addComponents(localeSelect, comboBox); + } + + @Override + public String getDescription() { + return "When the Turkish locale is used," + + " filtering for 'i' should show the option with a dot" + + " while filtering for 'ı' should show the option witout a dot"; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java new file mode 100644 index 0000000000..d7f8e233ec --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2000-2014 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.components.combobox; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.ComboBoxElement; +import com.vaadin.testbench.elements.NativeSelectElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class FilteringTurkishLocaleTest extends MultiBrowserTest { + + @Test + public void testEnglishLocale() { + openTestURL(); + + setLocale("en"); + + List<String> suggestions = getFilterSuggestions("i"); + + Assert.assertEquals("Both suggestions should be present", 2, + suggestions.size()); + } + + @Test + public void testTurkishLocaleWithDot() { + openTestURL(); + + setLocale("tr"); + + List<String> suggestions = getFilterSuggestions("i"); + + Assert.assertEquals("There should be only one suggestion", 1, + suggestions.size()); + Assert.assertEquals("İ with dot", suggestions.get(0)); + } + + @Test + public void testTurkishLocaleWithoutDot() { + openTestURL(); + + setLocale("tr"); + + List<String> suggestions = getFilterSuggestions("ı"); + + Assert.assertEquals("There should be only one suggestion", 1, + suggestions.size()); + Assert.assertEquals("I without dot", suggestions.get(0)); + } + + private List<String> getFilterSuggestions(String string) { + ComboBoxElement comboBox = $(ComboBoxElement.class).first(); + comboBox.findElement(By.vaadin("#textbox")).sendKeys(string); + + return comboBox.getPopupSuggestions(); + } + + private void setLocale(String locale) { + NativeSelectElement selector = $(NativeSelectElement.class).first(); + selector.selectByText(locale); + } + +} diff --git a/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java b/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java new file mode 100644 index 0000000000..c327ddb6f3 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java @@ -0,0 +1,72 @@ +/* + * Copyright 2000-2014 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.components.table; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Table; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; + +/** + * For tables that are contained in a layout, a delayed column layouting should + * not be visible (because it makes the column jump around). + * + * #15189 + * + * @author Vaadin Ltd + */ +public class DelayedColumnLayouting extends UI { + + @Override + protected void init(VaadinRequest request) { + VerticalLayout verticalLayout = new VerticalLayout(); + verticalLayout.setSizeFull(); + final VerticalLayout layout = new VerticalLayout(); + layout.setSizeFull(); + layout.setSpacing(true); + + Button reset = new Button("Recreate layout with contained table"); + verticalLayout.addComponent(reset); + reset.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + fillLayout(layout); + } + }); + + fillLayout(layout); + + verticalLayout.addComponent(layout); + verticalLayout.setExpandRatio(layout, 1f); + + setContent(verticalLayout); + } + + private void fillLayout(VerticalLayout layout) { + layout.removeAllComponents(); + + Table table = new Table(); + table.setSizeFull(); + table.addContainerProperty("First", String.class, ""); + table.addContainerProperty("This column jumps", String.class, ""); + + layout.addComponent(table); + layout.setExpandRatio(table, 1f); + } +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java new file mode 100644 index 0000000000..5c78a3f42a --- /dev/null +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java @@ -0,0 +1,128 @@ +package com.vaadin.tests.navigator; + +import com.vaadin.navigator.Navigator; +import com.vaadin.navigator.View; +import com.vaadin.navigator.ViewChangeListener; +import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +public class NavigatorViewBlocksBackButtonAction extends AbstractTestUI { + + private Navigator navigator; + + protected static final String LABEL_MAINVIEW_ID = "LABEL_MAINVIEW_ID"; + protected static final String LABEL_PROMPTEDVIEW_ID = "LABEL_PROMPTEDVIEW_ID"; + + @Override + protected void setup(VaadinRequest request) { + navigator = new Navigator(this, this); + navigator.addView(MainView.NAME, new MainView()); + navigator.addView(ViewWithPromptedLeave.NAME, + new ViewWithPromptedLeave()); + navigator.navigateTo(MainView.NAME); + } + + class MainView extends VerticalLayout implements View { + + public static final String NAME = "mainview"; + + public MainView() { + Label label = new Label("MainView content"); + label.setId(LABEL_MAINVIEW_ID); + addComponent(label); + + Button buttonNavToAnotherView = new Button( + "Navigate to another view", new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + navigator.navigateTo(ViewWithPromptedLeave.NAME); + } + }); + addComponent(buttonNavToAnotherView); + } + + @Override + public void enter(ViewChangeEvent event) { + } + + } + + class ViewWithPromptedLeave extends VerticalLayout implements View, + ViewChangeListener { + + public static final String NAME = "prompted"; + + protected boolean okToLeave; + + public ViewWithPromptedLeave() { + Label label = new Label("ViewWithPromptedLeave content"); + label.setId(LABEL_PROMPTEDVIEW_ID); + addComponent(label); + addComponent(new Label( + "Try to navigate back to first view with browser back button.")); + } + + @Override + public void enter(ViewChangeEvent event) { + event.getNavigator().addViewChangeListener(this); + } + + @Override + public boolean beforeViewChange(final ViewChangeEvent event) { + if (okToLeave) { + okToLeave = false; + return true; + } else { + final Window confirmationWindow = new Window("Confirm"); + confirmationWindow.setModal(true); + confirmationWindow.setClosable(true); + + VerticalLayout confirmationWindowLayout = new VerticalLayout(); + confirmationWindow.setContent(confirmationWindowLayout); + confirmationWindowLayout.setMargin(true); + confirmationWindowLayout.setSpacing(true); + confirmationWindowLayout.addComponent(new Label( + "Really exit this view?")); + confirmationWindowLayout.addComponent(new Button("Yeah, sure!", + new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent buttonEvent) { + okToLeave = true; + getUI().removeWindow(confirmationWindow); + event.getNavigator().navigateTo( + event.getViewName() + "/" + + event.getParameters()); + } + })); + getUI().addWindow(confirmationWindow); + return false; + } + } + + @Override + public void afterViewChange(ViewChangeEvent event) { + if (event.getNewView() != this) { + event.getNavigator().removeViewChangeListener(this); + } + } + } + + @Override + protected String getTestDescription() { + return "URL should not be changed when view blocks navigating away from view using the browser's Back-button"; + } + + @Override + protected Integer getTicketNumber() { + return 10901; + } +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java new file mode 100644 index 0000000000..84abdca24b --- /dev/null +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java @@ -0,0 +1,95 @@ +/* + * Copyright 2000-2014 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.navigator; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class NavigatorViewBlocksBackButtonActionTest extends MultiBrowserTest { + + @Test + public void testIfConfirmBack() { + openTestURL(); + + // keep URL of main view + final String initialUrl = driver.getCurrentUrl(); + + // do it 2 times to verify that login is not broken after first time + for (int i = 0; i < 2; i++) { + // go to prompted view + WebElement button = $(ButtonElement.class).first(); + button.click(); + + // click back button + driver.navigate().back(); + + // confirm "go back by clicking confirm button + WebElement buttonConfirmView = $(ButtonElement.class).first(); + buttonConfirmView.click(); + + // verify we are in main view and url is correct + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_MAINVIEW_ID)); + String currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial main view URL", + initialUrl, currentUrl); + } + } + + @Test + public void testIfCancelBack() { + openTestURL(); + + // go to prompted view + WebElement button = $(ButtonElement.class).first(); + button.click(); + + // keep URL of prompted view + final String initialPromptedUrl = driver.getCurrentUrl(); + + // click back button + driver.navigate().back(); + + // verify url is correct (is not changed) + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID)); + String currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial prompted view URL", + initialPromptedUrl, currentUrl); + + WebElement cancelButton = driver.findElement(By + .className("v-window-closebox")); + + // click cancel button + cancelButton.click(); + + // verify we leave in prompted view and url is correct + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID)); + currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial prompted view URL", + initialPromptedUrl, currentUrl); + } +} diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java index a04d569e05..1d5ead7d98 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java @@ -18,11 +18,7 @@ package com.vaadin.tests.push; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; -import java.util.List; - import org.junit.Test; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.support.ui.Select; public class PushConfigurationLongPollingTest extends PushConfigurationTest { @@ -30,13 +26,13 @@ public class PushConfigurationLongPollingTest extends PushConfigurationTest { public void testLongPolling() throws InterruptedException { openDebugLogTab(); - new Select(getTransportSelect()).selectByVisibleText("LONG_POLLING"); + getTransportSelect().selectByText("Long polling"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); assertThat(getStatusText(), containsString("transport: long-polling")); clearDebugMessages(); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getPushModeSelect().selectByText("Automatic"); waitForDebugMessage("Push connection established using long-polling", 10); waitForServerCounterToUpdate(); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java index f5c015ad12..202db8d6b7 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java @@ -15,25 +15,24 @@ */ package com.vaadin.tests.push; -import org.junit.Test; -import org.openqa.selenium.support.ui.Select; - import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.Test; + public class PushConfigurationStreamingTest extends PushConfigurationTest { @Test public void testStreaming() throws InterruptedException { openDebugLogTab(); - new Select(getTransportSelect()).selectByVisibleText("STREAMING"); + getTransportSelect().selectByText("Streaming"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); assertThat(getStatusText(), containsString("transport: streaming")); clearDebugMessages(); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getPushModeSelect().selectByText("Automatic"); waitForDebugMessage("Push connection established using streaming", 10); waitForServerCounterToUpdate(); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java index bb5b420259..396160cc7d 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java @@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedCondition; -import org.openqa.selenium.support.ui.Select; +import com.vaadin.testbench.elements.NativeSelectElement; import com.vaadin.tests.annotations.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -49,7 +49,7 @@ abstract class PushConfigurationTest extends MultiBrowserTest { } protected void disablePush() throws InterruptedException { - new Select(getPushModeSelect()).selectByVisibleText("DISABLED"); + getPushModeSelect().selectByText("Disabled"); int counter = getServerCounter(); sleep(2000); @@ -57,12 +57,12 @@ abstract class PushConfigurationTest extends MultiBrowserTest { getServerCounter()); } - protected WebElement getPushModeSelect() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VNativeSelect[0]/domChild[0]"); + protected NativeSelectElement getPushModeSelect() { + return $(NativeSelectElement.class).caption("Push mode").first(); } - protected WebElement getTransportSelect() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[1]/VNativeSelect[0]/domChild[0]"); + protected NativeSelectElement getTransportSelect() { + return $(NativeSelectElement.class).caption("Transport").first(); } protected int getServerCounter() { diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java index c9a813fac0..475fa2165f 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java @@ -23,7 +23,6 @@ import java.util.List; import org.junit.Test; import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.support.ui.Select; public class PushConfigurationWebSocketTest extends PushConfigurationTest { @@ -40,8 +39,8 @@ public class PushConfigurationWebSocketTest extends PushConfigurationTest { @Test public void testWebsocket() throws InterruptedException { - new Select(getTransportSelect()).selectByVisibleText("WEBSOCKET"); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getTransportSelect().selectByText("Websocket"); + getPushModeSelect().selectByText("Automatic"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurator.java b/uitest/src/com/vaadin/tests/push/PushConfigurator.java index 5a45ab7206..7da58af1da 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurator.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurator.java @@ -87,11 +87,9 @@ public class PushConfigurator extends VerticalLayout { pushMode.addItem(PushMode.AUTOMATIC); for (Transport t : Transport.values()) { - transport.addItem(t.toString()); - fallbackTransport.addItem(t.toString()); + transport.addItem(t); + fallbackTransport.addItem(t); } - transport.addItem(""); - fallbackTransport.addItem(""); pushMode.setImmediate(true); transport.setImmediate(true); @@ -124,7 +122,7 @@ public class PushConfigurator extends VerticalLayout { transport.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - Transport t = Transport.valueOf((String) transport.getValue()); + Transport t = (Transport) transport.getValue(); ui.getPushConfiguration().setTransport(t); refreshStatus(); } @@ -133,8 +131,7 @@ public class PushConfigurator extends VerticalLayout { fallbackTransport.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - Transport t = Transport.valueOf((String) fallbackTransport - .getValue()); + Transport t = (Transport) fallbackTransport.getValue(); ui.getPushConfiguration().setFallbackTransport(t); refreshStatus(); } diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index 76b851fd23..b5a345bd30 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -32,7 +32,6 @@ import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import com.vaadin.testbench.elements.TableElement; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; @@ -69,6 +68,7 @@ import com.vaadin.testbench.TestBenchDriverProxy; import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.TestBenchTestCase; import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.testbench.elements.TableElement; import com.vaadin.testbench.elements.VerticalLayoutElement; import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.tests.tb3.MultiBrowserTest.Browser; @@ -257,7 +257,7 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { @Override public Object apply(WebDriver input) { try { - return table.getCell(row, 0) != null; + return table.getCell(row, 0) != null; } catch (NoSuchElementException e) { return false; } @@ -266,7 +266,8 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { } protected void scrollTable(TableElement table, int rows, int rowToWait) { - testBenchElement(table.findElement(By.className("v-scrollable"))).scroll(rows * 30); + testBenchElement(table.findElement(By.className("v-scrollable"))) + .scroll(rows * 30); waitUntilRowIsVisible(table, rowToWait); } @@ -430,6 +431,11 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { @After public void tearDown() throws Exception { if (driver != null) { + try { + openTestURL("&closeApplication"); + } catch (Exception e) { + e.printStackTrace(); + } driver.quit(); } driver = null; |