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();
+    }
   });
 });