add test for field swap and update images
-> adjusted coloring error of reversed quadrant image
Signed-off-by: emilym <emily.markova@gmail.com>
Change-Id: I04bf1452109717f5063caa7d09ae855598b1b89d
diff --git a/scouting/scouting_test.ts b/scouting/scouting_test.ts
index e983a86..a34d98c 100644
--- a/scouting/scouting_test.ts
+++ b/scouting/scouting_test.ts
@@ -301,20 +301,25 @@
await element(by.buttonText('Next')).click();
expect(await getHeadingText()).toEqual('Auto');
- // We expect 2 fully loaded images.
- browser
- .executeAsyncScript(function (callback) {
- let images = document.getElementsByTagName('img');
- let numLoaded = 0;
- for (let i = 0; i < images.length; i += 1) {
- if (images[i].naturalWidth > 0) {
- numLoaded += 1;
+ // We expect 2 fully loaded images for each of the orientations.
+ // 2 images for the original orientation and 2 images for the flipped orientation.
+ for (let i = 0; i < 2; i++) {
+ browser
+ .executeAsyncScript(function (callback) {
+ let images = document.getElementsByTagName('img');
+ let numLoaded = 0;
+ for (let i = 0; i < images.length; i += 1) {
+ if (images[i].naturalWidth > 0) {
+ numLoaded += 1;
+ }
}
- }
- callback(numLoaded);
- })
- .then(function (numLoaded) {
- expect(numLoaded).toBe(2);
- });
+ callback(numLoaded);
+ })
+ .then(function (numLoaded) {
+ expect(numLoaded).toBe(2);
+ });
+
+ await element(by.buttonText('Flip')).click();
+ }
});
});
diff --git a/scouting/www/BUILD b/scouting/www/BUILD
index b14c29b..0b7cebb 100644
--- a/scouting/www/BUILD
+++ b/scouting/www/BUILD
@@ -109,6 +109,8 @@
outs = [
"pictures/field/balls.jpeg",
"pictures/field/quadrants.jpeg",
+ "pictures/field/reversed_quadrants.jpeg",
+ "pictures/field/reversed_balls.jpeg",
],
cmd = "cp $(SRCS) $(@D)/pictures/field/",
)
diff --git a/scouting/www/entry/entry.component.ts b/scouting/www/entry/entry.component.ts
index 08f4dd4..330ab47 100644
--- a/scouting/www/entry/entry.component.ts
+++ b/scouting/www/entry/entry.component.ts
@@ -44,7 +44,7 @@
original_image:
'/sha256/cbb99a057a2504e80af526dae7a0a04121aed84c56a6f4889e9576fe1c20c61e/pictures/field/quadrants.jpeg',
reversed_image:
- '/sha256/2c67fffbb722e9a7d0e1d270f1aad7f39a2dc8493c2e7ad1ae50bd6fa52d5bb7/pictures/field/reversed_quadrants.jpeg',
+ '/sha256/ee4d24cf6b850158aa64e2b301c31411cb28f88a247a8916abb97214bb251eb5/pictures/field/reversed_quadrants.jpeg',
},
{
id: 'field_balls_image',
diff --git a/third_party/y2022/field/BUILD b/third_party/y2022/field/BUILD
index a8d3e28..685e6e4 100644
--- a/third_party/y2022/field/BUILD
+++ b/third_party/y2022/field/BUILD
@@ -8,6 +8,8 @@
srcs = [
"balls.jpeg",
"quadrants.jpeg",
+ "reversed_balls.jpeg",
+ "reversed_quadrants.jpeg",
],
visibility = ["//visibility:public"],
)
diff --git a/third_party/y2022/field/reversed_quadrants.jpeg b/third_party/y2022/field/reversed_quadrants.jpeg
index adacd8d..a6ce113 100644
--- a/third_party/y2022/field/reversed_quadrants.jpeg
+++ b/third_party/y2022/field/reversed_quadrants.jpeg
Binary files differ