diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java b/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java index d8465104827..5518040b85d 100644 --- a/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java +++ b/flow-tests/test-application-theme/test-theme-component-live-reload/src/test/java/com/vaadin/flow/uitest/ui/ComponentThemeLiveReloadIT.java @@ -25,7 +25,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; @@ -100,11 +99,17 @@ public void cleanUp() { } } - // ignored until resolved. See issue 11928 @Test - @Ignore public void webpackLiveReload_newComponentStylesCreatedAndDeleted_stylesUpdatedOnFly() { open(); + + /* + * Access browser logs in order to clear them to avoid to check entries + * from a previous run if the test is flaky due to webpack file change + * detection during parent css deletion + */ + getLogEntries(java.util.logging.Level.ALL); + Assert.assertFalse( "Border radius for themed component is not expected before " + "applying the styles", diff --git a/flow-tests/test-application-theme/test-theme-component-live-reload/webpack.config.js b/flow-tests/test-application-theme/test-theme-component-live-reload/webpack.config.js new file mode 100644 index 00000000000..6a2fa509edf --- /dev/null +++ b/flow-tests/test-application-theme/test-theme-component-live-reload/webpack.config.js @@ -0,0 +1,42 @@ +/** + * This file contains project specific customizations for the webpack build. + * It is autogenerated if it didn't exist or if it was made for an older + * incompatible version. + * + * Defaults are provided in an autogenerated webpack.generated.js file and used by this file. + * The webpack.generated.js file is overwritten on each build and no customization can be done there. + */ +const merge = require('webpack-merge'); +const flowDefaults = require('./webpack.generated.js'); + +/** + * To change the webpack config, add a new configuration object in + * the merge arguments below: + */ +module.exports = merge(flowDefaults, + // Decrease aggregate timeout to avoid random duplicated + // theme-app-theme.generated.js file changes notification + // that makes compilation fail when deleting parent theme component css. + // see https://github.com/vaadin/flow/issues/11928#issuecomment-1031146480 + { + watchOptions: { + aggregateTimeout: 5 + } + } + // Override default configuration + // { + // mode: 'development', + // devtool: 'inline-source-map', + // }, + + // Add a custom plugin + // (install the plugin with `npm install --save-dev webpack-bundle-analyzer`) + // { + // plugins: [ + // new require('webpack-bundle-analyzer').BundleAnalyzerPlugin({ + // analyzerMode: 'static' + // }) + // ] + // }, +); +