From 58fe4c7d806359bed299f74ba56902ab396a6ed1 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 14 Dec 2021 21:40:23 +0100 Subject: facilitate broadcasting messages to different execution contexts within the webextension --- test/unit/test_patterns_query_tree.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/unit/test_patterns_query_tree.py') diff --git a/test/unit/test_patterns_query_tree.py b/test/unit/test_patterns_query_tree.py index e282592..a67e22f 100644 --- a/test/unit/test_patterns_query_tree.py +++ b/test/unit/test_patterns_query_tree.py @@ -25,13 +25,14 @@ from ..script_loader import load_script def patterns_tree_code(): yield load_script('common/patterns_query_tree.js', ['common']) +@pytest.mark.get_page('https://gotmyowndoma.in') def test_modify_branch(execute_in_page, patterns_tree_code): """ patterns_query_tree.js contains Pattern Tree data structure that allows arrays of string labels to be mapped to items. Verify operations modifying a single branch of such tree work properly. """ - execute_in_page(patterns_tree_code, page='https://gotmyowndoma.in') + execute_in_page(patterns_tree_code) execute_in_page( ''' let items_added; @@ -195,13 +196,14 @@ def test_modify_branch(execute_in_page, patterns_tree_code): } } +@pytest.mark.get_page('https://gotmyowndoma.in') def test_search_branch(execute_in_page, patterns_tree_code): """ patterns_query_tree.js contains Pattern Tree data structure that allows arrays of string labels to be mapped to items. Verify searching a single branch of such tree work properly. """ - execute_in_page(patterns_tree_code, page='https://gotmyowndoma.in') + execute_in_page(patterns_tree_code) execute_in_page( ''' const item_adder = item => (array => [...(array || []), item]); @@ -282,13 +284,14 @@ def test_search_branch(execute_in_page, patterns_tree_code): '\nresult:', result, file=sys.stderr) raise e from None +@pytest.mark.get_page('https://gotmyowndoma.in') def test_pattern_tree(execute_in_page, patterns_tree_code): """ patterns_query_tree.js contains Pattern Tree data structure that allows arrays of string labels to be mapped to items. Verify operations on entire such tree work properly. """ - execute_in_page(patterns_tree_code, page='https://gotmyowndoma.in') + execute_in_page(patterns_tree_code) # Perform tests with all possible patterns for a simple URL. url = 'https://example.com' -- cgit v1.2.3