mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 18:30:42 +00:00
add scenario1 test
This commit is contained in:
parent
b058ee037c
commit
6c291ce271
@ -157,4 +157,35 @@ public class ScreenshotIT extends AbstractIT {
|
|||||||
assertTrue("Screenshot comparison for 'exportLatexWithAssumptions' (stage 3) failed",
|
assertTrue("Screenshot comparison for 'exportLatexWithAssumptions' (stage 3) failed",
|
||||||
testBench().compareScreen("exportLatexWithAssumptions3"));
|
testBench().compareScreen("exportLatexWithAssumptions3"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testScenario1() throws IOException {
|
||||||
|
InputBarElement inputBar = $(InputBarElement.class).first();
|
||||||
|
String term = "λx. f x";
|
||||||
|
inputBar.setCurrentValue(term);
|
||||||
|
|
||||||
|
// check if the correct term is entered
|
||||||
|
Assert.assertEquals(term, inputBar.getCurrentValue());
|
||||||
|
inputBar.typeInfer();
|
||||||
|
|
||||||
|
ControlPanelElement controlPanelElement = $(ControlPanelElement.class).first();
|
||||||
|
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step0"));
|
||||||
|
controlPanelElement.nextStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step1"));
|
||||||
|
controlPanelElement.nextStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step2"));
|
||||||
|
controlPanelElement.nextStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step3"));
|
||||||
|
controlPanelElement.nextStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step4"));
|
||||||
|
controlPanelElement.previousStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step3"));
|
||||||
|
controlPanelElement.previousStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step2"));
|
||||||
|
controlPanelElement.firstStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step0"));
|
||||||
|
controlPanelElement.lastStep();
|
||||||
|
assertTrue(testBench().compareScreen("testScenario1_step4gi"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,19 @@ import com.vaadin.testbench.annotations.Attribute;
|
|||||||
|
|
||||||
@Attribute(name = "id", value = "control-panel")
|
@Attribute(name = "id", value = "control-panel")
|
||||||
public class ControlPanelElement extends HorizontalLayoutElement {
|
public class ControlPanelElement extends HorizontalLayoutElement {
|
||||||
|
|
||||||
|
public void firstStep() {
|
||||||
|
$(ButtonElement.class).get(1).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void previousStep() {
|
||||||
|
$(ButtonElement.class).get(2).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nextStep() {
|
||||||
|
$(ButtonElement.class).get(3).click();
|
||||||
|
}
|
||||||
|
|
||||||
public void lastStep() {
|
public void lastStep() {
|
||||||
$(ButtonElement.class).get(4).click();
|
$(ButtonElement.class).get(4).click();
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Loading…
Reference in New Issue
Block a user