From e7d11c7c1173d07db741301053db78b835a73ab3 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 14 Jan 2022 22:48:01 +0100 Subject: add settings page with styling --- test/unit/test_indexeddb.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'test/unit/test_indexeddb.py') diff --git a/test/unit/test_indexeddb.py b/test/unit/test_indexeddb.py index 0c0e7a0..07b620c 100644 --- a/test/unit/test_indexeddb.py +++ b/test/unit/test_indexeddb.py @@ -27,9 +27,6 @@ from selenium.common.exceptions import WebDriverException from ..script_loader import load_script from .utils import * -indexeddb_js = lambda: load_script('common/indexeddb.js') -broker_js = lambda: load_script('background/broadcast_broker.js') + ';start();' - # Sample resource definitions. They'd normally contain more fields but here we # use simplified versions. @@ -70,7 +67,7 @@ def test_haketilodb_item_modifications(driver, execute_in_page): indexeddb.js facilitates operating on Haketilo's internal database. Verify database operations on mappings/resources work properly. """ - execute_in_page(indexeddb_js()) + execute_in_page(load_script('common/indexeddb.js')) mock_broadcast(execute_in_page) # Start with no database. @@ -235,7 +232,7 @@ def test_haketilodb_settings(driver, execute_in_page): indexeddb.js facilitates operating on Haketilo's internal database. Verify assigning/retrieving values of simple "settings" item works properly. """ - execute_in_page(indexeddb_js()) + execute_in_page(load_script('common/indexeddb.js')) mock_broadcast(execute_in_page) # Start with no database. @@ -257,7 +254,7 @@ def test_haketilodb_allowing(driver, execute_in_page): indexeddb.js facilitates operating on Haketilo's internal database. Verify changing the "blocking" configuration for a URL works properly. """ - execute_in_page(indexeddb_js()) + execute_in_page(load_script('common/indexeddb.js')) mock_broadcast(execute_in_page) # Start with no database. @@ -285,7 +282,7 @@ def test_haketilodb_repos(driver, execute_in_page): indexeddb.js facilitates operating on Haketilo's internal database. Verify operations on repositories list work properly. """ - execute_in_page(indexeddb_js()) + execute_in_page(load_script('common/indexeddb.js')) mock_broadcast(execute_in_page) # Start with no database. @@ -317,7 +314,7 @@ test_page_html = ''' 'background_script': broker_js, 'test_page': test_page_html, 'extra_files': { - 'testpage.js': indexeddb_js + 'testpage.js': lambda: load_script('common/indexeddb.js') } }) @pytest.mark.usefixtures('webextension') -- cgit v1.2.3