Skip to content

Commit

Permalink
feat(matrix ui): add tooltip explaining the situation when verificati…
Browse files Browse the repository at this point in the history
…on date is before pact publication date
  • Loading branch information
bethesque committed Mar 15, 2018
1 parent f7bea07 commit fd6e1c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/pact_broker/ui/view_models/matrix_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ def overwritten?
def overwritten= overwritten
@overwritten = overwritten
end

def inherited_verification_message
if @line[:verification_executed_at] && @line[:pact_created_at] > @line[:verification_executed_at]
"The verification date is before the pact publication date because this verification has been inherited from a previously verified pact with identical content."
end
end
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/pact_broker/ui/views/matrix/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
%a{href: tag.url}
.tag.label.label-default
= tag.name
%td.pact-published{'data-sort-value' => line.pact_published_order}
%td.pact-published{'data-sort-value' => line.pact_published_order, "title": line.inherited_verification_message, "data-toggle": "tooltip"}
%a{href: line.pact_publication_date_url}
- if options.all_rows_checked
= "#{line.pact_publication_date} (revision #{line.pact_revision_number})"
Expand All @@ -142,7 +142,7 @@
%a{href: tag.url}
.tag.label.label-default
= tag.name
%td.verification-result{class: line.verification_status_class}
%td.verification-result{class: line.verification_status_class, "title": line.inherited_verification_message, "data-toggle": "tooltip"}
%a{href: line.verification_status_url}
- if options.all_rows_checked
= "#{line.verification_status} (number #{line.number})"
Expand Down

0 comments on commit fd6e1c9

Please sign in to comment.