fix exportLatexWithAssumptions test (failed due to icons that are now buttons)

This commit is contained in:
Johanna Stuber 2021-03-05 18:16:23 +01:00
parent 3fd5de7611
commit 4c00af9007
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
private static final String INFER_BUTTON_ID = "inferButton"; private static final String INFER_BUTTON_ID = "inferButton";
private static final String EXAMPLE_BUTTON_ID = "exampleButton"; private static final String EXAMPLE_BUTTON_ID = "exampleButton";
private static final String LAMBDA_BUTTON_ID = "lambdaButton"; private static final String LAMBDA_BUTTON_ID = "lambdaButton";
private static final String ASS_BUTTON_ID = "assButton";
private static final short MAX_INPUT_LENGTH = 1000; private static final short MAX_INPUT_LENGTH = 1000;
@ -80,6 +81,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver {
lambdaButton.setId(LAMBDA_BUTTON_ID); lambdaButton.setId(LAMBDA_BUTTON_ID);
UI.getCurrent().getPage().executeJs("window.lambdaButtonListener($0, $1);", LAMBDA_BUTTON_ID, INPUT_FIELD_ID); UI.getCurrent().getPage().executeJs("window.lambdaButtonListener($0, $1);", LAMBDA_BUTTON_ID, INPUT_FIELD_ID);
typeAssumptions = new Button("", event -> onTypeAssumptionsButton()); typeAssumptions = new Button("", event -> onTypeAssumptionsButton());
typeAssumptions.setId(ASS_BUTTON_ID);
typeAssumptionsArea = new TypeAssumptionsArea(); typeAssumptionsArea = new TypeAssumptionsArea();
exampleButton = new Button(VaadinIcon.PAPERCLIP.create(), event -> onExampleButtonClick()); exampleButton = new Button(VaadinIcon.PAPERCLIP.create(), event -> onExampleButtonClick());
exampleButton.setId(EXAMPLE_BUTTON_ID); exampleButton.setId(EXAMPLE_BUTTON_ID);

View File

@ -47,7 +47,7 @@ public class InputBarElement extends HorizontalLayoutElement {
* Opens the type assumptions area. * Opens the type assumptions area.
*/ */
public void openTypeAssumptionsArea() { public void openTypeAssumptionsArea() {
$(ButtonElement.class).first().click(); $(ButtonElement.class).id("assButton").click();
} }
} }