From 88acc8f2a68c25f08a72a6acc3df7d96eac0ecfa Mon Sep 17 00:00:00 2001
From: Dominic Oram <dominic.oram@diamond.ac.uk>
Date: Thu, 25 Apr 2024 11:03:58 +0100
Subject: [PATCH] (#1282) Fix ispyb system tests for adding snapshots

---
 .../external_interaction/test_exp_eye_dev.py          | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/system_tests/external_interaction/test_exp_eye_dev.py b/tests/system_tests/external_interaction/test_exp_eye_dev.py
index 53337f298..da3fe3aa3 100644
--- a/tests/system_tests/external_interaction/test_exp_eye_dev.py
+++ b/tests/system_tests/external_interaction/test_exp_eye_dev.py
@@ -10,6 +10,10 @@
 
 @pytest.mark.s03
 def test_start_and_end_robot_load():
+    """To confirm this test is successful go to
+    https://ispyb-test.diamond.ac.uk/dc/visit/cm37235-2 and see that data is added
+    when it's run.
+    """
     os.environ["ISPYB_CONFIG_PATH"] = CONST.SIM.DEV_ISPYB_DATABASE_CFG
 
     SAMPLE_ID = 5289780
@@ -23,7 +27,12 @@ def test_start_and_end_robot_load():
 
     print(f"Created {robot_action_id}")
 
-    expeye.update_barcode(robot_action_id, BARCODE)
+    test_folder = "/dls/i03/data/2024/cm37235-2/xtal_snapshots"
+    oav_snapshot = test_folder + "/235855_load_after_0.0.png"
+    webcam_snapshot = test_folder + "/235855_webcam.jpg"
+    expeye.update_barcode_and_snapshots(
+        robot_action_id, BARCODE, oav_snapshot, webcam_snapshot
+    )
 
     sleep(0.5)