Simple ITs for Info- and HelpDialog
@ -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"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 100 KiB |
BIN
src/test/resources/screenshots/helpDialog_windows_firefox_86.png
Normal file
After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 27 KiB |
BIN
src/test/resources/screenshots/infoDialog_windows_firefox_86.png
Normal file
After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 99 KiB |
BIN
src/test/resources/screenshots/letView1_windows_firefox_86.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
src/test/resources/screenshots/letView2_windows_firefox_86.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 46 KiB |