diff --git a/asl_articles/tests/test_articles.py b/asl_articles/tests/test_articles.py index 0c69e0e..3b0b57f 100644 --- a/asl_articles/tests/test_articles.py +++ b/asl_articles/tests/test_articles.py @@ -236,7 +236,7 @@ def test_parent_publisher( webdriver, flask_app, dbconn ): nonlocal article_sr elem = find_child( ".title .publication", article_sr ) if expected_parent: - assert elem.text == "({})".format( expected_parent[1] ) + assert elem.text == "[{}]".format( expected_parent[1] ) else: assert elem is None @@ -255,7 +255,7 @@ def test_parent_publisher( webdriver, flask_app, dbconn ): article_sr = results[0] elem = find_child( ".title .publication", article_sr ) if expected_parent: - assert elem.text == "({})".format( expected_parent[1] ) + assert elem.text == "[{}]".format( expected_parent[1] ) else: assert elem is None diff --git a/web/src/ArticleSearchResult.js b/web/src/ArticleSearchResult.js index 0302de5..71a2832 100644 --- a/web/src/ArticleSearchResult.js +++ b/web/src/ArticleSearchResult.js @@ -1,5 +1,6 @@ import React from "react" ; import { ArticleSearchResult2 } from "./ArticleSearchResult2.js" ; +import { PublicationSearchResult } from "./PublicationSearchResult.js" ; import { gAppRef } from "./index.js" ; import { makeScenarioDisplayName, applyUpdatedVals, removeSpecialFields, makeOptionalLink, makeCommaList } from "./utils.js" ; @@ -60,13 +61,14 @@ export class ArticleSearchResult extends React.Component } // NOTE: The "title" field is also given the CSS class "name" so that the normal CSS will apply to it. // Some tests also look for a generic ".name" class name when checking search results. + const pub_display_name = pub ? PublicationSearchResult.makeDisplayName( pub ) : null ; return (