[android] - show amount failed tests and executed tests, integrate pixelratio in tests

This commit is contained in:
tobrun
2018-06-08 14:02:43 +02:00
committed by Tobrun
parent 871903bf62
commit 5c01142b90
3 changed files with 43 additions and 7 deletions

View File

@@ -49,6 +49,17 @@ public class RenderTestDefinition {
return DEFAULT_HEIGHT;
}
public float getPixelRatio() {
RenderTestStyleDefinition.Test test = getTest();
if (test != null) {
Float pixelRatio = test.getPixelRatio();
if (pixelRatio != null && pixelRatio > 0) {
return pixelRatio;
}
}
return 1;
}
public String getStyleJson() {
return styleJson;
}
@@ -65,6 +76,7 @@ public class RenderTestDefinition {
return new MapSnapshotter
.Options(getWidth(), getHeight())
.withStyleJson(styleJson)
.withPixelRatio(getPixelRatio())
.withLogo(false);
}

View File

@@ -60,6 +60,7 @@ public class RenderTestStyleDefinition {
private Integer width;
private Integer height;
private Float pixelRatio;
private List<Integer> center = null;
private Integer zoom;
private Double diff;
@@ -82,6 +83,10 @@ public class RenderTestStyleDefinition {
this.height = height;
}
public Float getPixelRatio() {
return pixelRatio;
}
public List<Integer> getCenter() {
return center;
}