diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-08 14:47:39 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-08 14:48:12 +0100 |
commit | 448820a11634de6ec356c77b8c7c0cf4937b344c (patch) | |
tree | 06147c3d40475ba863ccea9904ba4cdfe1d66db0 /test/unit/test_basic.py | |
parent | 372d24ea3a52e376f953deeffeb7847d008b81c9 (diff) | |
download | browser-extension-448820a11634de6ec356c77b8c7c0cf4937b344c.tar.gz browser-extension-448820a11634de6ec356c77b8c7c0cf4937b344c.zip |
work on UI components
This commit introduces some HTML and javascript (and tests for it) to use in constructing the new UI. This is partial work that is not yet finished.
Diffstat (limited to 'test/unit/test_basic.py')
-rw-r--r-- | test/unit/test_basic.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/test/unit/test_basic.py b/test/unit/test_basic.py index 612fe06..5f42f5d 100644 --- a/test/unit/test_basic.py +++ b/test/unit/test_basic.py @@ -58,15 +58,14 @@ def test_webextension(driver): assert "Extension's options page for testing" in heading @pytest.mark.ext_data({ - 'extra_html': [ - ExtraHTML( - 'html/default_blocking_policy.html', - { - 'html/default_blocking_policy.js': - 'document.body.innerHTML = `ski-ba-bop-ba ${typeof by_id}`;' - } - ) - ] + 'extra_html': ExtraHTML( + 'html/default_blocking_policy.html', + { + 'html/default_blocking_policy.js': + 'document.body.innerHTML = `ski-ba-bop-ba ${typeof by_id}`;' + } + ), + 'navigate_to': 'html/default_blocking_policy.html' }) @pytest.mark.usefixtures('webextension') def test_extra_html(driver): @@ -74,7 +73,5 @@ def test_extra_html(driver): A trivial test case of the facility for loading the Haketilo's HTML files into test WebExtension for unit-testing. """ - driver.get(driver.execute_script('return window.location.href;') - .replace('testpage.html', 'html/default_blocking_policy.html')) assert driver.execute_script('return document.body.innerText') == \ 'ski-ba-bop-ba function' |