Skip to content

Commit db3da01

Browse files
committed
Fix log path issue with visual tests that use the "sb" fixture
1 parent d77472c commit db3da01

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9555,12 +9555,15 @@ def __process_visual_baseline_logs(self):
95559555
test_logpath = os.path.join(self.log_path, self.__get_test_id())
95569556
for baseline_copy_tuple in self.__visual_baseline_copies:
95579557
baseline_path = baseline_copy_tuple[0]
9558-
baseline_copy_path = baseline_copy_tuple[1]
9559-
b_c_alt_path = baseline_copy_tuple[2]
9558+
baseline_copy_name = baseline_copy_tuple[1]
9559+
b_c_alt_name = baseline_copy_tuple[2]
95609560
latest_png_path = baseline_copy_tuple[3]
9561-
latest_copy_path = baseline_copy_tuple[4]
9562-
l_c_alt_path = baseline_copy_tuple[5]
9563-
9561+
latest_copy_name = baseline_copy_tuple[4]
9562+
l_c_alt_name = baseline_copy_tuple[5]
9563+
baseline_copy_path = os.path.join(test_logpath, baseline_copy_name)
9564+
b_c_alt_path = os.path.join(test_logpath, b_c_alt_name)
9565+
latest_copy_path = os.path.join(test_logpath, latest_copy_name)
9566+
l_c_alt_path = os.path.join(test_logpath, l_c_alt_name)
95649567
if len(self.__visual_baseline_copies) == 1:
95659568
baseline_copy_path = b_c_alt_path
95669569
latest_copy_path = l_c_alt_path
@@ -9798,19 +9801,14 @@ def check_window(
97989801
out_file.writelines(json.dumps(level_3))
97999802
out_file.close()
98009803

9801-
test_logpath = os.path.join(self.log_path, self.__get_test_id())
98029804
baseline_path = os.path.join(visual_baseline_path, baseline_png)
98039805
baseline_copy_name = "baseline_%s.png" % name
9804-
baseline_copy_path = os.path.join(test_logpath, baseline_copy_name)
98059806
b_c_alt_name = "baseline.png"
9806-
b_c_alt_path = os.path.join(test_logpath, b_c_alt_name)
98079807
latest_copy_name = "baseline_diff_%s.png" % name
9808-
latest_copy_path = os.path.join(test_logpath, latest_copy_name)
98099808
l_c_alt_name = "baseline_diff.png"
9810-
l_c_alt_path = os.path.join(test_logpath, l_c_alt_name)
98119809
baseline_copy_tuple = (
9812-
baseline_path, baseline_copy_path, b_c_alt_path,
9813-
latest_png_path, latest_copy_path, l_c_alt_path,
9810+
baseline_path, baseline_copy_name, b_c_alt_name,
9811+
latest_png_path, latest_copy_name, l_c_alt_name,
98149812
)
98159813
self.__visual_baseline_copies.append(baseline_copy_tuple)
98169814

0 commit comments

Comments
 (0)