diff --git a/src/main/java/edu/kit/typicalc/view/main/InputBar.java b/src/main/java/edu/kit/typicalc/view/main/InputBar.java index 53c887a..b24dd9c 100644 --- a/src/main/java/edu/kit/typicalc/view/main/InputBar.java +++ b/src/main/java/edu/kit/typicalc/view/main/InputBar.java @@ -35,6 +35,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver { private static final String INFER_BUTTON_ID = "inferButton"; private static final String EXAMPLE_BUTTON_ID = "exampleButton"; private static final String LAMBDA_BUTTON_ID = "lambdaButton"; + private static final String ASS_BUTTON_ID = "assButton"; private static final short MAX_INPUT_LENGTH = 1000; @@ -80,6 +81,7 @@ public class InputBar extends HorizontalLayout implements LocaleChangeObserver { lambdaButton.setId(LAMBDA_BUTTON_ID); UI.getCurrent().getPage().executeJs("window.lambdaButtonListener($0, $1);", LAMBDA_BUTTON_ID, INPUT_FIELD_ID); typeAssumptions = new Button("", event -> onTypeAssumptionsButton()); + typeAssumptions.setId(ASS_BUTTON_ID); typeAssumptionsArea = new TypeAssumptionsArea(); exampleButton = new Button(VaadinIcon.PAPERCLIP.create(), event -> onExampleButtonClick()); exampleButton.setId(EXAMPLE_BUTTON_ID); diff --git a/src/test/java/edu/kit/typicalc/view/pageobjects/InputBarElement.java b/src/test/java/edu/kit/typicalc/view/pageobjects/InputBarElement.java index 71c17f4..80200ea 100644 --- a/src/test/java/edu/kit/typicalc/view/pageobjects/InputBarElement.java +++ b/src/test/java/edu/kit/typicalc/view/pageobjects/InputBarElement.java @@ -47,7 +47,7 @@ public class InputBarElement extends HorizontalLayoutElement { * Opens the type assumptions area. */ public void openTypeAssumptionsArea() { - $(ButtonElement.class).first().click(); + $(ButtonElement.class).id("assButton").click(); } }