Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tepi committed Dec 19, 2023
1 parent c904e23 commit c107a81
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.vaadin.base.devserver.themeeditor;

import com.vaadin.base.devserver.MockVaadinContext;
import com.vaadin.experimental.FeatureFlags;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.internal.ComponentTracker;
import com.vaadin.flow.di.Lookup;
import com.vaadin.flow.dom.Element;
import com.vaadin.flow.function.DeploymentConfiguration;
import com.vaadin.flow.server.Command;
import com.vaadin.flow.server.VaadinContext;
import com.vaadin.flow.server.VaadinService;
Expand Down Expand Up @@ -44,6 +44,8 @@ public abstract class AbstractThemeEditorTest {
protected final int INLINEADD_CREATE = 48;
protected final int INLINEADD_ATTACH = 48;

private VaadinSession session;

protected class TestThemeModifier extends ThemeModifier {

public TestThemeModifier() {
Expand All @@ -58,8 +60,6 @@ protected File getFrontendFolder() {

protected class TestJavaSourceModifier extends JavaSourceModifier {

private VaadinSession session = new MockVaadinSession(null);

public TestJavaSourceModifier() {
super(mockContext);
}
Expand Down Expand Up @@ -145,6 +145,13 @@ public void prepare() {
VaadinService.setCurrent(service);
Mockito.when(service.getContext()).thenReturn(mockContext);

DeploymentConfiguration depConf = Mockito
.mock(DeploymentConfiguration.class);
Mockito.when(depConf.isProductionMode()).thenReturn(false);
Mockito.when(service.getDeploymentConfiguration()).thenReturn(depConf);

session = new MockVaadinSession(service);

ApplicationConfiguration configuration = Mockito
.mock(ApplicationConfiguration.class);
ApplicationConfigurationFactory factory = Mockito
Expand Down

0 comments on commit c107a81

Please sign in to comment.