Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node-terminal",
"name": "Run Maven Jetty",
"request": "launch",
"command": "mvn jetty:run",
"cwd": "${workspaceFolder}/vaadin-spreadsheet"
},
{
"type": "java",
"name": "Attach to Maven Jetty",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "Run Maven Jetty with debugger"
}
],
"compounds": [
{
"name": "Debug Maven Jetty",
"configurations": [
"Attach to Maven Jetty"
]
}
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "disabled",
"files.exclude": {
"**/*.rpyc": true,
"**/*.rpa": true,
"**/*.rpymc": true,
"**/cache/": true
}
}
35 changes: 35 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Maven Jetty with debugger",
"type": "shell",
"command": "mvn",
"args": [
"jetty:run"
],
"options": {
"cwd": "${workspaceFolder}/vaadin-spreadsheet",
"env": {
"MAVEN_OPTS": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005"
}
},
"isBackground": true,
"problemMatcher": {
"owner": "java",
"fileLocation": "absolute",
"pattern": {
"regexp": "^(.+\\.java):\\[(\\d+),(\\d+)\\]\\s+(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
},
"background": {
"activeOnStart": true,
"beginsPattern": "Listening for transport dt_socket at address: 5005",
"endsPattern": "Listening for transport dt_socket at address: 5005"
}
}
}
]
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<currentYear>2026</currentYear>

<vaadin.version>8.30.1</vaadin.version>
<vaadin.version>8.32.0</vaadin.version>
<charts.version>4.3.5</charts.version>
<testbench.version>5.1.2</testbench.version>
<testbench.version>5.4.0</testbench.version>
<jetty.version>9.4.54.v20240208</jetty.version>
<javax.servlet.version>3.0.1</javax.servlet.version>
<junit.version>4.13.2</junit.version>
Expand Down
4 changes: 2 additions & 2 deletions vaadin-spreadsheet-charts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<currentYear>2026</currentYear>

<vaadin.version>8.14.4</vaadin.version>
<vaadin.version>8.32.0</vaadin.version>
<charts.version>4.3.5</charts.version>
<testbench.version>5.1.2</testbench.version>
<testbench.version>5.4.0</testbench.version>
<jetty.version>9.4.54.v20240208</jetty.version>
<poi.version>5.5.1</poi.version>

Expand Down
4 changes: 2 additions & 2 deletions vaadin-spreadsheet-testbench-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<currentYear>2026</currentYear>

<vaadin.version>8.14.4</vaadin.version>
<testbench.version>5.1.2</testbench.version>
<vaadin.version>8.32.0</vaadin.version>
<testbench.version>5.4.0</testbench.version>
</properties>

<organization>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
package com.vaadin.addon.spreadsheet.elements;

import java.time.Duration;
import java.util.List;

import org.openqa.selenium.By;
Expand Down Expand Up @@ -287,7 +288,7 @@ boolean isElementSelected(WebElement element) {
private void findSelectionOutline() {
// sometimes the spreadsheet takes so long to load that the selection
// widget elements are not found
new WebDriverWait(getDriver(), 10).until(ExpectedConditions
new WebDriverWait(getDriver(), Duration.ofMillis(10)).until(ExpectedConditions
.presenceOfElementLocated(By.className("s-top")));
sTop = findElement(By.className("s-top"));
sBottom = findElement(By.className("s-bottom"));
Expand Down
4 changes: 2 additions & 2 deletions vaadin-spreadsheet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<currentYear>2026</currentYear>

<vaadin.version>8.30.1</vaadin.version>
<vaadin.version>8.32.0</vaadin.version>
<charts.version>4.3.5</charts.version>
<testbench.version>5.1.2</testbench.version>
<testbench.version>5.4.0</testbench.version>
<jetty.version>9.4.54.v20240208</jetty.version>
<javax.servlet.version>3.0.1</javax.servlet.version>
<junit.version>4.13.2</junit.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void test() throws Exception {
spreadsheetPage.selectSheetAt(0);
compareScreen("sheet1_row_3_hidden");

if (!isPhantomOrFF()) {
if (!isFirefox()) {
// Context click doesn't work in those FF and Phantom
compareSheet1WithRow3Shown();
compareSheet1WithColumnHShown();
Expand All @@ -40,17 +40,16 @@ public void test() throws Exception {
spreadsheetPage.selectSheetAt(1);
compareScreen("sheet2_initial");

if (!isPhantomOrFF()) {
if (!isFirefox()) {
// Context click doesn't work in those FF and Phantom
compareSheet2WithRowsShown();
compareSheet2WithColumnsShown();
}
}

private boolean isPhantomOrFF() {
private boolean isFirefox() {
DesiredCapabilities capabilities = getDesiredCapabilities();
return BrowserUtil.isFirefox(capabilities)
|| BrowserUtil.isPhantomJS(capabilities);
return BrowserUtil.isFirefox(capabilities);
}

private void compareSheet1WithRow3Shown() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public void deletionHandler_SpreadsheetWithDeletionFixture_deleteSingleCellFails

@Test
public void deletionHandler_SpreadsheetWithDeletionFixture_deleteIndividualCellSucceedsWhenHandlerReturnsTrue() {
skipBrowser("PhantomJS ignores the CTRL", Browser.PHANTOMJS);
skipBrowser("Firefox ignores the CTRL", Browser.FIREFOX);

sheetController.clickCell("B3");
Expand All @@ -81,7 +80,6 @@ public void deletionHandler_SpreadsheetWithDeletionFixture_deleteIndividualCellS

@Test
public void deletionHandler_SpreadsheetWithDeletionFixture_deleteIndividualCellFailsWhenHandlerReturnsFalse() {
skipBrowser("PhantomJS ignores the CTRL", Browser.PHANTOMJS);
skipBrowser("Firefox ignores the CTRL", Browser.FIREFOX);

sheetController.clickCell("C3");
Expand All @@ -102,7 +100,6 @@ public void deletionHandler_SpreadsheetWithDeletionFixture_deleteIndividualCellF

@Test
public void deletionHandler_SpreadsheetWithDeletionFixture_deleteCellRangeSucceedsWhenHandlerReturnsTrue() {
skipBrowser("PhantomJS ignores the SHIFT", Browser.PHANTOMJS);
skipBrowser("Firefox ignores the SHIFT", Browser.FIREFOX);

sheetController.clickCell("B6");
Expand All @@ -122,7 +119,6 @@ public void deletionHandler_SpreadsheetWithDeletionFixture_deleteCellRangeSuccee

@Test
public void deletionHandler_SpreadsheetWithDeletionFixture_deleteCellRangeFailsWhenHandlerReturnsFalse() {
skipBrowser("PhantomJS ignores the SHIFT", Browser.PHANTOMJS);
skipBrowser("Firefox ignores the SHIFT", Browser.FIREFOX);

sheetController.clickCell("C6");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void contextClick_on_commentIndicator() throws InterruptedException {
@Test
public void removeRow_removeRowWithComment_commentIsRemoved() {
skipBrowser("Context click does not work with PhantomJS and Firefox",
Browser.PHANTOMJS, Browser.FIREFOX);
Browser.FIREFOX); // is this true?
headerPage.createNewSpreadsheet();
headerPage.loadFile("cell_comments.xlsx", this); // A1 has a comment
final SpreadsheetElement spreadsheet = $(SpreadsheetElement.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import static org.junit.Assert.assertEquals;

import java.util.concurrent.TimeUnit;
import java.time.Duration;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.Duration;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.Sleeper;

Expand Down Expand Up @@ -128,9 +128,9 @@ public void testScrollingBug() throws InterruptedException {
assertEquals(TEXT_PROXY, sheetController.getCellContent("B2"));
sheetController.selectCell("B5");
sheetController.navigateToCell("B100");
Sleeper.SYSTEM_SLEEPER.sleep(new Duration(1, TimeUnit.SECONDS));
Sleeper.SYSTEM_SLEEPER.sleep(Duration.ofSeconds(1));
sheetController.navigateToCell("B1");
Sleeper.SYSTEM_SLEEPER.sleep(new Duration(3, TimeUnit.SECONDS));
Sleeper.SYSTEM_SLEEPER.sleep(Duration.ofSeconds(3));

assertEquals(TEXT_PROXY, sheetController.getCellContent("B2"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.junit.Test;

import com.vaadin.addon.spreadsheet.test.fixtures.TestFixtures;
import com.vaadin.testbench.parallel.Browser;

public class HideTest extends AbstractSpreadsheetTestCase {

Expand All @@ -40,8 +39,6 @@ public void testHideColumn() {
@Test
public void testHideRow() {
headerPage.createNewSpreadsheet();
skipBrowser("Fails on phantom JS, B3 is visible after hiding region",
Browser.PHANTOMJS);

sheetController.selectCell("B3");
headerPage.loadTestFixture(TestFixtures.RowToggle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public void overflowBasedOnFullMergedWidth() throws IOException {

SheetCellElement cellElement = underlyingCell
.wrap(SheetCellElement.class);
if (!BrowserUtil.isPhantomJS(getDesiredCapabilities())
&& !BrowserUtil.isIE(getDesiredCapabilities(), 10)) {
if (!BrowserUtil.isIE(getDesiredCapabilities(), 10)) {
// for some reason PhantomJS and IE10 lose the underlying content
// doesn't affect the end result negatively so can be ignored
assertThat(cellElement.getValue(), equalTo(cellText));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public void overflow_spreadsheetWithMergedAndFormattedArea_noOverflowFromFirstCe
}
SheetCellElement cellElement = underlyingCell
.wrap(SheetCellElement.class);
if (!BrowserUtil.isPhantomJS(getDesiredCapabilities())
&& !BrowserUtil.isIE(getDesiredCapabilities(), 10)) {
if (!BrowserUtil.isIE(getDesiredCapabilities(), 10)) {
// for some reason PhantomJS and IE10 lose the underlying content
// doesn't affect the end result negatively so can be ignored
assertThat(cellElement.getValue(), equalTo(cellText));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.vaadin.addon.spreadsheet.elements.SpreadsheetElement;
import com.vaadin.addon.spreadsheet.test.fixtures.TestFixtures;
import com.vaadin.testbench.By;
import com.vaadin.testbench.parallel.Browser;

public class MultipleSheetTest extends AbstractSpreadsheetTestCase {

Expand Down Expand Up @@ -58,9 +57,6 @@ public void testMultipleSheet() {

@Test
public void testRenameSheet() {
skipBrowser("Cannot find the 'new sheet name' element on PhantomJS",
Browser.PHANTOMJS);

Actions actions = new Actions(driver);
actions.doubleClick(driver.findElement(By.xpath(
"//div[@class='sheet-tabsheet-container']//div[text()='Sheet1']")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ public void testEnterSelectionRangeInAddress() throws Exception {
@Test
public void testEnterSelectionRangeInAddress_outsideOfViewport()
throws Exception {
skipBrowser(
"setAddressFieldValue() does not work correctly with PhantomJS",
Browser.PHANTOMJS);
spreadsheetPage.setAddressFieldValue("AT1:AV7");
assertSelectionRange("AT1:AV7", true);
}
Expand All @@ -236,7 +233,6 @@ public void testEnterSelectionRangeInAddress_outsideOfViewport()
public void testKeyboardNavigation() throws Exception {
skipBrowser("Sending multiple keys fails in IE", Browser.IE9,
Browser.IE10, Browser.IE11);
skipBrowser("Fails randomly with PhantomJS", Browser.PHANTOMJS);

spreadsheetPage.clickOnCell("J10");
new Actions(getDriver()).sendKeys(Keys.RIGHT).build().perform();
Expand Down Expand Up @@ -271,10 +267,6 @@ public void testKeyboardNavigation() throws Exception {
@Test
@Ignore("Keys.RETURN loses active position indication")
public void testNavigationInSelectionWithEnterAndTab() throws Exception {
skipBrowser(
"setAddressFieldValue() does not work correctly with PhantomJS",
Browser.PHANTOMJS);

spreadsheetPage.setAddressFieldValue("A1:C2");
// Assert that everything is selected
assertSelectionRange("A1:C2", true);
Expand Down Expand Up @@ -442,8 +434,8 @@ public void testClickOnRowHeaderSelectsRow() throws Exception {

@Test
public void testShiftClickShouldSelect() throws Exception {
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX,
Browser.PHANTOMJS);
// TODO: Is this still true?
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX);
spreadsheetPage.clickOnCell("B2");
assertSelectedCell("B2", spreadsheetPage.isCellSelected("B2"));
// new Actions(getDriver()).keyDown(Keys.SHIFT).build().perform();
Expand All @@ -456,8 +448,8 @@ public void testShiftClickShouldSelect() throws Exception {

@Test
public void testShiftClickOnColumnHeader() throws Exception {
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX,
Browser.PHANTOMJS);
// TODO: Is this still true?
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX);
spreadsheetPage.clickOnCell("B2");
assertSelectedCell("B2", spreadsheetPage.isCellSelected("B2"));
// new Actions(getDriver()).keyDown(Keys.SHIFT).build().perform();
Expand All @@ -471,8 +463,8 @@ public void testShiftClickOnColumnHeader() throws Exception {

@Test
public void testShiftClickOnRowHeader() throws Exception {
skipBrowser("Range selection assertion fails", Browser.FIREFOX,
Browser.PHANTOMJS);
// TODO: Is this still true?
skipBrowser("Range selection assertion fails", Browser.FIREFOX);

spreadsheetPage.clickOnCell("B10");
assertSelectedCell("B10", spreadsheetPage.isCellSelected("B10"));
Expand All @@ -487,8 +479,8 @@ public void testShiftClickOnRowHeader() throws Exception {

@Test
public void testSelectCellsByCtrlClick() throws Exception {
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX,
Browser.PHANTOMJS);
// TODO: Is this still true?
skipBrowser("Fails on Firefox and PhantomJS", Browser.FIREFOX);

// ("only works on windows due to
// https://code.google.com/p/selenium/issues/detail?id=4843 (patch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@

import com.vaadin.addon.spreadsheet.test.tb3.AbstractTB3Test;
import com.vaadin.addon.spreadsheet.test.tb3.PrivateTB3Configuration;
import com.vaadin.addon.spreadsheet.test.tb3.VaadinBrowserFactory;
//import com.vaadin.addon.spreadsheet.test.tb3.VaadinBrowserFactory;
import com.vaadin.testbench.annotations.BrowserFactory;
import com.vaadin.testbench.annotations.RunLocally;
import com.vaadin.testbench.annotations.RunOnHub;
import com.vaadin.testbench.parallel.Browser;

/**
* Blatant copy of {@link PrivateTB3Configuration} to create TB tests that don't
Expand All @@ -33,8 +35,9 @@
* point
*
*/
@RunOnHub("tb3-hub.intra.itmill.com")
@BrowserFactory(VaadinBrowserFactory.class)
@RunLocally(Browser.FIREFOX)
//@RunOnHub("tb3-hub.intra.itmill.com")
//@BrowserFactory(VaadinBrowserFactory.class)
public abstract class NoScreenshotTBTest extends AbstractTB3Test {

public static final String PORT_PROPERTY = "com.vaadin.testbench.deployment.port";
Expand Down
Loading