Skip to content

Commit fd6e1c9

Browse files
committed
feat(matrix ui): add tooltip explaining the situation when verification date is before pact publication date
1 parent f7bea07 commit fd6e1c9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/pact_broker/ui/view_models/matrix_line.rb

+6
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ def overwritten?
175175
def overwritten= overwritten
176176
@overwritten = overwritten
177177
end
178+
179+
def inherited_verification_message
180+
if @line[:verification_executed_at] && @line[:pact_created_at] > @line[:verification_executed_at]
181+
"The verification date is before the pact publication date because this verification has been inherited from a previously verified pact with identical content."
182+
end
183+
end
178184
end
179185
end
180186
end

lib/pact_broker/ui/views/matrix/show.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
%a{href: tag.url}
119119
.tag.label.label-default
120120
= tag.name
121-
%td.pact-published{'data-sort-value' => line.pact_published_order}
121+
%td.pact-published{'data-sort-value' => line.pact_published_order, "title": line.inherited_verification_message, "data-toggle": "tooltip"}
122122
%a{href: line.pact_publication_date_url}
123123
- if options.all_rows_checked
124124
= "#{line.pact_publication_date} (revision #{line.pact_revision_number})"
@@ -142,7 +142,7 @@
142142
%a{href: tag.url}
143143
.tag.label.label-default
144144
= tag.name
145-
%td.verification-result{class: line.verification_status_class}
145+
%td.verification-result{class: line.verification_status_class, "title": line.inherited_verification_message, "data-toggle": "tooltip"}
146146
%a{href: line.verification_status_url}
147147
- if options.all_rows_checked
148148
= "#{line.verification_status} (number #{line.number})"

0 commit comments

Comments
 (0)