Skip to content

Commit

Permalink
- fixed a bug in functional test
Browse files Browse the repository at this point in the history
- default empty value for content
  • Loading branch information
temi committed Jan 21, 2025
1 parent 4e1f6d3 commit c5b8ada
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion grails-app/assets/javascripts/knockout-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

// if view model has changed, update the popover
instance.config.title = combinedOptions.title || "";
instance.config.content = combinedOptions.content;
instance.config.content = combinedOptions.content || "";

if (options.autoShow) {
if ($element.data('firstPopover') === false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<li>
<div class="row">
<div class="col-sm-4">
<div class="projectLogo" data-toggle="popover" data-trigger="hover" data-title="Photo metadata" data-bind="popover: {placement:'top', content: function(){ return $(this).find('.metadata').html()} }">
<div class="projectLogo" data-toggle="popover" data-trigger="hover" data-title="Photo metadata" data-bind="popover: {placement:'top', content: function(){ return $(this).parent().parent().find('.metadata').html()} }">
<a href=""
data-bind="attr:{href:getImageViewerUrl()}, fancybox: {nextEffect:'fade', preload:0, 'prevEffect':'fade', type: 'iframe', width: '80%', title: function(){ return $(this).next().find('.metadata').html()}}"
target="fancybox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ImageTypeSpec extends GebReportingSpec {

then: "A popover is displayed containing the photo metadata"
waitFor 10, {
(!$('.popover').displayed)
$('.popover').displayed
}
and: "the photo metadata is displayed correctly"
$(".popover span[data-bind*=name]").text() == null
Expand All @@ -31,7 +31,7 @@ class ImageTypeSpec extends GebReportingSpec {

}

def "If the metadataAlwaysDisplayed displayOption is set, the metadata will be displayed next to the image in view mode"() {
def "If the metadataAlwaysVisible displayOption is set, the metadata will be displayed next to the image in view mode"() {
when:
to ([name:'images', mode:'view'], PreviewPage)

Expand Down

0 comments on commit c5b8ada

Please sign in to comment.