diff --git a/asl_articles/tests/test_db_report.py b/asl_articles/tests/test_db_report.py
index 9213e33..9782a7a 100644
--- a/asl_articles/tests/test_db_report.py
+++ b/asl_articles/tests/test_db_report.py
@@ -10,7 +10,7 @@ from asl_articles.tests.test_publications import edit_publication
from asl_articles.tests.test_articles import edit_article
from asl_articles.tests.utils import init_tests, \
select_main_menu_option, select_sr_menu_option, check_ask_dialog, \
- do_search, find_search_result, \
+ do_search, find_search_result, get_search_results, \
wait_for, wait_for_elem, find_child, find_children
# ---------------------------------------------------------------------
@@ -36,10 +36,11 @@ def test_db_report( webdriver, flask_app, dbconn ):
assert image_sizes == {}
# add some images
- results = do_search( SEARCH_ALL )
- publ_sr = find_search_result( "Avalon Hill", results )
+ do_search( SEARCH_ALL )
+ publ_sr = find_search_result( "Avalon Hill", wait=2 )
fname = os.path.join( os.path.split(__file__)[0], "fixtures/images/1.gif" )
edit_publisher( publ_sr, { "image": fname } )
+ results = get_search_results()
pub_sr = find_search_result( "ASL Journal (1)", results )
fname = os.path.join( os.path.split(__file__)[0], "fixtures/images/2.gif" )
edit_publication( pub_sr, { "image": fname } )
@@ -78,11 +79,12 @@ def test_db_report( webdriver, flask_app, dbconn ):
}
# delete all the publishers (and associated objects), then check the updated report
- results = do_search( SEARCH_ALL )
- publ_sr = find_search_result( "Avalon Hill", results )
+ do_search( SEARCH_ALL )
+ publ_sr = find_search_result( "Avalon Hill", wait=2 )
select_sr_menu_option( publ_sr, "delete" )
check_ask_dialog( "Delete this publisher?", "ok" )
- publ_sr = find_search_result( "Multiman Publishing" )
+ results = get_search_results()
+ publ_sr = find_search_result( "Multiman Publishing", results )
select_sr_menu_option( publ_sr, "delete" )
check_ask_dialog( "Delete this publisher?", "ok" )
row_counts, links, dupe_images, image_sizes = _get_db_report()
diff --git a/asl_articles/tests/utils.py b/asl_articles/tests/utils.py
index b7883ba..60420c3 100644
--- a/asl_articles/tests/utils.py
+++ b/asl_articles/tests/utils.py
@@ -132,13 +132,15 @@ def get_search_result_names( results=None ):
results = get_search_results()
return [ find_child( ".name", r ).text for r in results ]
-def find_search_result( name, results=None ):
+def find_search_result( name, results=None, wait=0 ):
"""Find a search result."""
- if not results:
- results = get_search_results()
- results = [ r for r in results if find_child( ".name", r ).text == name ]
- assert len(results) == 1
- return results[0]
+ def find_sr():
+ matches = [
+ r for r in results or get_search_results()
+ if find_child( ".name", r ).text == name
+ ]
+ return matches[0] if len(matches) == 1 else None
+ return wait_for( wait, find_sr )
def check_search_result( sr, check, expected ):
"""Check a search result in the UI."""
diff --git a/web/public/images/watermark.png b/web/public/images/watermark.png
new file mode 100644
index 0000000..bb9c4e2
Binary files /dev/null and b/web/public/images/watermark.png differ
diff --git a/web/src/App.css b/web/src/App.css
index dd798e2..a2f4ebd 100644
--- a/web/src/App.css
+++ b/web/src/App.css
@@ -18,6 +18,14 @@
[data-reach-menu-list] .divider { height: 0 ; margin: 2px 0 ; border-top: 1px solid #aaa ; }
[data-reach-menu-list] img { height: 100% ; margin-top: -0.1em ; margin-right: 0.5em ; }
+#watermark {
+ position: fixed ; right: 0 ; bottom: 0 ;
+ height: 30% ;
+ opacity: 0 ; z-index: -999 ;
+ transition: opacity 5s ;
+}
+#watermark img { height: 100% ; }
+
.MuiDialogTitle-root { padding: 10px 16px 6px 16px !important ; }
.MuiDialogContent-root>div { margin-bottom: 1em ; }
.MuiDialogContent-root p { margin-top: 0.5em ; }
diff --git a/web/src/App.js b/web/src/App.js
index 08f9c45..4578948 100644
--- a/web/src/App.js
+++ b/web/src/App.js
@@ -129,11 +129,13 @@ export class App extends React.Component