aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_item_list.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-31 18:06:13 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-31 18:06:13 +0100
commitad69f9c86b950cc84ca103e65824b9c9129d3999 (patch)
treea4314c8a5031b9fb2a278021b2388b86190c2823 /test/unit/test_item_list.py
parent4c6a2323d90e9321ec2b78e226167b3013ea69ab (diff)
downloadbrowser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.tar.gz
browser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.zip
add support for testing with other browsers (especially Abrowser and Librewolf)
There are still some spurious failures when running under those newer browsers. Those will be systematically investigated and fixed.
Diffstat (limited to 'test/unit/test_item_list.py')
-rw-r--r--test/unit/test_item_list.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/test/unit/test_item_list.py b/test/unit/test_item_list.py
index ff532f8..0702129 100644
--- a/test/unit/test_item_list.py
+++ b/test/unit/test_item_list.py
@@ -217,17 +217,6 @@ def test_item_list_displaying(driver, execute_in_page, item_type):
assert f'item{i}' in text
assert f'Item {i}' in text
- # Check that file preview link works.
- window0 = driver.window_handles[0]
- driver.find_element_by_link_text('report.spdx').click()
- WebDriverWait(driver, 10).until(lambda _: len(driver.window_handles) == 2)
- window1 = next(filter(lambda w: w != window0, driver.window_handles))
- driver.switch_to.window(window1)
- assert 'dummy report' in driver.page_source
-
- driver.close()
- driver.switch_to.window(window0)
-
# Check that item removal confirmation dialog is displayed correctly.
execute_in_page('list_ctx.remove_but.click();')
WebDriverWait(driver, 10).until(lambda _: dialog_container.is_displayed())
@@ -271,29 +260,6 @@ def test_item_list_displaying(driver, execute_in_page, item_type):
execute_in_page('list_ctx.ul.children[1].click();')
- # Check that missing file causes the right error dialog to appear.
- execute_in_page(
- '''{
- async function steal_file(hash_key)
- {
- const db = await haketilodb.get();
- const transaction = db.transaction("files", "readwrite");
- transaction.objectStore("files").delete(hash_key);
- }
- returnval(steal_file(arguments[0]));
- }''',
- sample_files['LICENSES/CC0-1.0.txt']['hash_key'])
- driver.find_element_by_link_text('LICENSES/CC0-1.0.txt').click()
- WebDriverWait(driver, 10).until(lambda _: dialog_container.is_displayed())
- assert 'list_disabled' in ul.get_attribute('class')
- assert not preview_container.is_displayed()
-
- msg = execute_in_page('returnval(list_ctx.dialog_ctx.msg.textContent);')
- assert msg == "File missing from Haketilo's internal database :("
-
- execute_in_page('returnval(list_ctx.dialog_ctx.ok_but.click());')
- WebDriverWait(driver, 10).until(lambda _: preview_container.is_displayed())
-
# Check that item removal failure causes the right error dialog to appear.
execute_in_page('haketilodb.finalize_transaction = () => {throw "sth";};')
remove_current_item()