Simple ITs for Info- and HelpDialog

This commit is contained in:
Moritz Dieing 2021-03-12 15:55:32 +01:00
parent c1fa4b8663
commit f95ff0721a
22 changed files with 41 additions and 2 deletions

View File

@ -98,7 +98,7 @@ public class ScreenshotIT extends AbstractIT {
TestBenchCommandExecutor executor = getCommandExecutor(); TestBenchCommandExecutor executor = getCommandExecutor();
executor.waitForVaadin(); executor.waitForVaadin();
matches.add(testBench().compareScreen("letView")); matches.add(testBench().compareScreen("letView1"));
ControlPanelElement control = $(ControlPanelElement.class).waitForFirst(); ControlPanelElement control = $(ControlPanelElement.class).waitForFirst();
control.openShareDialog(); control.openShareDialog();
@ -110,7 +110,7 @@ public class ScreenshotIT extends AbstractIT {
String permalink = shareDialogElement.getPermalink(); String permalink = shareDialogElement.getPermalink();
getDriver().get(permalink); getDriver().get(permalink);
matches.add(testBench().compareScreen("letView")); matches.add(testBench().compareScreen("letView2"));
// TODO: jeden Schritt durchgehen? // TODO: jeden Schritt durchgehen?
} }
@ -230,4 +230,20 @@ public class ScreenshotIT extends AbstractIT {
executor.waitForVaadin(); executor.waitForVaadin();
matches.add(testBench().compareScreen("testScenario1_step4gi")); matches.add(testBench().compareScreen("testScenario1_step4gi"));
} }
@Test
public void infoDialogTest() throws IOException {
InputBarElement inputBar = $(InputBarElement.class).first();
inputBar.openInfoDialog();
matches.add(testBench().compareScreen("infoDialog"));
}
@Test
public void helpDialogTest() throws IOException {
UpperBarElement upperBar = $(UpperBarElement.class).first();
upperBar.openHelpDialog();
matches.add(testBench().compareScreen("helpDialog"));
}
} }

View File

@ -50,4 +50,11 @@ public class InputBarElement extends HorizontalLayoutElement {
$(ButtonElement.class).id("assButton").click(); $(ButtonElement.class).id("assButton").click();
} }
/**
* Opens the info dialog.
*/
public void openInfoDialog() {
$(ButtonElement.class).first().click();
}
} }

View File

@ -0,0 +1,16 @@
package edu.kit.typicalc.view.pageobjects;
import com.vaadin.flow.component.button.testbench.ButtonElement;
import com.vaadin.flow.component.orderedlayout.testbench.HorizontalLayoutElement;
import com.vaadin.testbench.annotations.Attribute;
@Attribute(name = "id", value = "header")
public class UpperBarElement extends HorizontalLayoutElement {
/**
* Opens the help dialog.
*/
public void openHelpDialog() {
$(ButtonElement.class).last().click();
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 46 KiB