Skip to content

Commit c5b6558

Browse files
committed
put all DrawableScreenshot access into the base class.
1 parent e8ee8f0 commit c5b6558

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/main/java/net/itarray/automotion/internal/ResponsiveUIChunkValidatorBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ protected void storeRootDetails(JSONObject rootDetails) {
457457
@Override
458458
protected void drawRootElement() {
459459
if (!rootElements.isEmpty()) {
460-
drawableScreenshot.drawRootElement(rootElements.get(0));
460+
drawElement(rootElements.get(0));
461461
}
462462
}
463463
}

src/main/java/net/itarray/automotion/internal/ResponsiveUIValidatorBase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public abstract class ResponsiveUIValidatorBase {
2323
protected final UISnapshot snapshot;
2424
private final DriverFacade driver;
2525
private final double zoomFactor;
26-
protected DrawableScreenshot drawableScreenshot;
26+
private DrawableScreenshot drawableScreenshot;
2727

2828
protected ResponsiveUIValidatorBase(UISnapshot snapshot) {
2929
this.snapshot = snapshot;
@@ -242,4 +242,8 @@ protected void drawHorizontalLine(Scalar y) {
242242
drawableScreenshot.drawHorizontalLine(y);
243243
}
244244
}
245+
246+
protected void drawElement(UIElement element) {
247+
drawableScreenshot.drawRootElement(element);
248+
}
245249
}

src/main/java/net/itarray/automotion/internal/UIValidatorBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ protected void storeRootDetails(JSONObject rootDetails) {
609609

610610
@Override
611611
protected void drawRootElement() {
612-
drawableScreenshot.drawRootElement(rootElement);
612+
drawElement(rootElement);
613613
}
614614

615615
private void drawLeftOffsetLine() {

0 commit comments

Comments
 (0)