Fix vaadin 16 test (#7758)

Test started failing due to a new version of
https://www.npmjs.com/package/@types/node Pinning that dependency to the
previous version seems to help.
This commit is contained in:
Lauri Tulmin 2023-02-08 02:41:22 +02:00 committed by GitHub
parent a26b5f6639
commit 2ec97a601c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5856 additions and 4 deletions

View File

@ -5,4 +5,49 @@
package io.opentelemetry.javaagent.instrumentation.vaadin;
public class Vaadin16Test extends AbstractVaadin16Test {}
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Stream;
public class Vaadin16Test extends AbstractVaadin16Test {
@Override
protected void prepareVaadinBaseDir(File baseDir) {
URL lockFile = AbstractVaadin16Test.class.getResource("/pnpm-lock.yaml");
if (lockFile == null) {
return;
}
URI uri;
try {
uri = lockFile.toURI();
} catch (URISyntaxException e) {
throw new IllegalStateException(e);
}
Path sourceDirectory = Paths.get(uri).getParent();
String sourcePath = sourceDirectory.toString();
Path destinationDirectory = Paths.get(baseDir.toURI());
String destinationPath = destinationDirectory.toString();
try (Stream<Path> stream = Files.walk(sourceDirectory)) {
stream.forEach(
source -> {
Path destination =
Paths.get(destinationPath, source.toString().substring(sourcePath.length()));
if (!Files.exists(destination)) {
try {
Files.copy(source, destination);
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
});
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
}

View File

@ -0,0 +1,114 @@
{
"name": "no-name",
"license": "UNLICENSED",
"vaadin": {
"dependencies": {
"@vaadin/router": "1.7.2",
"@polymer/polymer": "3.2.0",
"@vaadin/vaadin-grid": "5.6.2",
"@vaadin/vaadin-icons": "4.3.1",
"@vaadin/vaadin-split-layout": "4.2.0",
"@vaadin/vaadin-combo-box": "5.1.1",
"@vaadin/vaadin-core-shrinkwrap": "16.0.0",
"@vaadin/vaadin-upload": "4.3.0",
"@vaadin/vaadin-dialog": "2.4.0",
"@vaadin/vaadin-select": "2.2.0",
"@vaadin/vaadin-app-layout": "2.1.0",
"@vaadin/vaadin-item": "2.2.0",
"@vaadin/vaadin-notification": "1.5.0",
"@vaadin/vaadin-progress-bar": "1.2.0",
"@vaadin/vaadin-date-time-picker": "1.1.0",
"@vaadin/vaadin-ordered-layout": "1.3.0",
"@vaadin/vaadin-login": "1.1.0",
"@vaadin/vaadin-button": "2.3.0",
"@vaadin/vaadin-date-picker": "4.1.1",
"@vaadin/vaadin-text-field": "2.6.0",
"@vaadin/vaadin-menu-bar": "1.1.0",
"@vaadin/vaadin-custom-field": "1.1.0",
"@vaadin/vaadin-form-layout": "2.2.0",
"@vaadin/vaadin-accordion": "1.1.0",
"@polymer/iron-list": "3.0.2",
"@vaadin/vaadin-list-box": "1.3.0",
"@vaadin/vaadin-checkbox": "2.3.0",
"@vaadin/vaadin-details": "1.1.0",
"@polymer/iron-icon": "3.0.1",
"@vaadin/vaadin-time-picker": "2.1.1",
"@vaadin/vaadin-context-menu": "4.4.0",
"@vaadin/vaadin-radio-button": "1.3.0",
"@vaadin/vaadin-tabs": "3.1.0",
"@vaadin/vaadin-lumo-styles": "1.6.0",
"@vaadin/vaadin-material-styles": "1.3.2"
},
"devDependencies": {
"compression-webpack-plugin": "3.1.0",
"raw-loader": "4.0.0",
"webpack-cli": "3.3.11",
"script-ext-html-webpack-plugin": "2.1.4",
"awesome-typescript-loader": "5.2.1",
"terser": "4.6.7",
"copy-webpack-plugin": "5.1.1",
"webpack": "4.42.0",
"progress-webpack-plugin": "0.0.24",
"html-webpack-plugin": "3.2.0",
"chokidar": "^3.4.0",
"typescript": "3.8.3",
"webpack-merge": "4.2.2",
"webpack-dev-server": "3.10.3"
},
"hash": "79ba508fb926135742da63c53757e251362a5a47c5cad2d70c09ff8c92f70472"
},
"dependencies": {
"@vaadin/router": "1.7.2",
"@polymer/polymer": "3.2.0",
"@vaadin/flow-frontend": "./target/flow-frontend",
"@vaadin/vaadin-grid": "5.6.2",
"@vaadin/vaadin-icons": "4.3.1",
"@vaadin/vaadin-split-layout": "4.2.0",
"@vaadin/vaadin-combo-box": "5.1.1",
"@vaadin/vaadin-core-shrinkwrap": "16.0.0",
"@vaadin/vaadin-upload": "4.3.0",
"@vaadin/vaadin-dialog": "2.4.0",
"@vaadin/vaadin-select": "2.2.0",
"@vaadin/vaadin-app-layout": "2.1.0",
"@vaadin/vaadin-item": "2.2.0",
"@vaadin/vaadin-notification": "1.5.0",
"@vaadin/vaadin-progress-bar": "1.2.0",
"@vaadin/vaadin-date-time-picker": "1.1.0",
"@vaadin/vaadin-ordered-layout": "1.3.0",
"@vaadin/vaadin-login": "1.1.0",
"@vaadin/vaadin-button": "2.3.0",
"@vaadin/vaadin-date-picker": "4.1.1",
"@vaadin/vaadin-text-field": "2.6.0",
"@vaadin/vaadin-menu-bar": "1.1.0",
"@vaadin/vaadin-custom-field": "1.1.0",
"@vaadin/vaadin-form-layout": "2.2.0",
"@vaadin/vaadin-accordion": "1.1.0",
"@polymer/iron-list": "3.0.2",
"@vaadin/vaadin-list-box": "1.3.0",
"@vaadin/vaadin-checkbox": "2.3.0",
"@vaadin/vaadin-details": "1.1.0",
"@polymer/iron-icon": "3.0.1",
"@vaadin/vaadin-time-picker": "2.1.1",
"@vaadin/vaadin-context-menu": "4.4.0",
"@vaadin/vaadin-radio-button": "1.3.0",
"@vaadin/vaadin-tabs": "3.1.0",
"@vaadin/vaadin-lumo-styles": "1.6.0",
"@vaadin/vaadin-material-styles": "1.3.2"
},
"devDependencies": {
"compression-webpack-plugin": "3.1.0",
"raw-loader": "4.0.0",
"webpack-cli": "3.3.11",
"script-ext-html-webpack-plugin": "2.1.4",
"awesome-typescript-loader": "5.2.1",
"terser": "4.6.7",
"copy-webpack-plugin": "5.1.1",
"webpack": "4.42.0",
"progress-webpack-plugin": "0.0.24",
"html-webpack-plugin": "3.2.0",
"chokidar": "^3.4.0",
"typescript": "3.8.3",
"webpack-merge": "4.2.2",
"webpack-dev-server": "3.10.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -87,13 +87,16 @@ public abstract class AbstractVaadinTest
}
}
protected void prepareVaadinBaseDir(File baseDir) {}
@Override
protected ConfigurableApplicationContext setupServer() {
File baseDir = new File("build/vaadin-" + Version.getFullVersion());
prepareVaadinBaseDir(baseDir);
// set directory for files generated by vaadin development mode
// by default these go to project root
System.setProperty(
"vaadin.project.basedir",
new File("build/vaadin-" + Version.getFullVersion()).getAbsolutePath());
System.setProperty("vaadin.project.basedir", baseDir.getAbsolutePath());
return TestApplication.start(port, getContextPath());
}