vaadin / portlet

Portlet support for Vaadin Flow
https://vaadin.com
Other
2 stars 3 forks source link

feat: Forward-port Liferay support to Vaadin 23.1 #225

Closed mshabarov closed 2 years ago

mshabarov commented 2 years ago

Description

Co-authored-by: Mikael Grankvist mgrankvi@vaadin.com

Related-to #221

Type of change

Checklist

Additional for Feature type of change

mcollovati commented 2 years ago

Running tests locally I got the following error in LiferayUploadIT

org.openqa.selenium.UnsupportedCommandException: unknown command: unknown command: session/f1cfdffffa23ffd675299c0f666f2534/se/file

It seems a know issue with Selenium 4, already fixed in TestBench https://github.com/vaadin/flow-components/issues/2633 https://github.com/SeleniumHQ/selenium/issues/10352

Directly using UploadElement.upload instead of manually handling input WebElement seems to fix the problem locally

UploadElement upload = getVaadinPortletRootElement()
        .$(UploadElement.class).waitForFirst();
/* ----> Current  Implementation <------
WebElement input = upload.$("*").id("fileInput");
setLocalFileDetector(input);
input.sendKeys(file.getAbsolutePath());
 */

upload.upload(file); // <---- Replaces current implementation
vaadin-bot commented 2 years ago

SonarQube analysis reported 7 issues

  1. MAJOR VaadinPortlet.java#L662: Remove these unused method parameters. rule
  2. MAJOR VaadinPortletResponse.java#L37: Make "HTTP_DATE_FORMAT" an instance variable. rule
  3. MAJOR VaadinPortletResponse.java#L130: Take the required action to fix the issue indicated by this comment. rule
  4. MAJOR PortletApplicationRouteRegistryUtil.java#L37: "context" is a method parameter, and should not be used for synchronization. rule
  5. MINOR VaadinPortletException.java#L12: Remove this unused import 'com.vaadin.flow.component.HasValue'. rule
  6. MINOR VaadinPortletService.java#L68: Rename this field "DEFAULT_HANDLER" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
  7. INFO VaadinPortletService.java#L247: Complete the task associated to this TODO comment. rule