cleanup tests
This commit is contained in:
@@ -286,7 +286,6 @@ class TestTabs:
|
|||||||
def test_tabs_filter_predicate(self, b, mock_send):
|
def test_tabs_filter_predicate(self, b, mock_send):
|
||||||
mock_send.return_value = [TAB_DATA, {**TAB_DATA, "id": 11, "url": "https://youtube.com"}]
|
mock_send.return_value = [TAB_DATA, {**TAB_DATA, "id": 11, "url": "https://youtube.com"}]
|
||||||
tabs = b.tabs_filter(lambda tab: "youtube" in tab.url)
|
tabs = b.tabs_filter(lambda tab: "youtube" in tab.url)
|
||||||
print(tabs)
|
|
||||||
assert [tab.id for tab in tabs] == [11]
|
assert [tab.id for tab in tabs] == [11]
|
||||||
|
|
||||||
def test_tabs_filter_list_transformer(self, b, mock_send):
|
def test_tabs_filter_list_transformer(self, b, mock_send):
|
||||||
|
|||||||
@@ -362,7 +362,6 @@ def test_groups_move_accepts_left_short_alias():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_windows_list_multi_browser_shows_browser_column():
|
def test_windows_list_multi_browser_shows_browser_column():
|
||||||
def fake_send_command(command, args=None, profile=None):
|
def fake_send_command(command, args=None, profile=None):
|
||||||
assert command == "windows.list"
|
assert command == "windows.list"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"""Tests for dom.* commands (require an http/https active tab)."""
|
"""Tests for dom.* commands (require an http/https active tab)."""
|
||||||
import pytest
|
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_dom_query_body(browser, http_tab):
|
def test_dom_query_body(browser, http_tab):
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"""Tests for extract.* commands (require an http/https active tab)."""
|
"""Tests for extract.* commands (require an http/https active tab)."""
|
||||||
import pytest
|
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_extract_links(browser, http_tab):
|
def test_extract_links(browser, http_tab):
|
||||||
@@ -58,15 +56,3 @@ def test_extract_markdown_missing_selector_errors(browser, http_tab):
|
|||||||
assert "No element" in str(exc)
|
assert "No element" in str(exc)
|
||||||
|
|
||||||
|
|
||||||
def test_dom_exists(browser, http_tab):
|
|
||||||
browser("tabs.active", {"tabId": http_tab["id"]})
|
|
||||||
result = browser("dom.exists", {"selector": "body"})
|
|
||||||
assert result is True
|
|
||||||
|
|
||||||
|
|
||||||
def test_dom_query(browser, http_tab):
|
|
||||||
browser("tabs.active", {"tabId": http_tab["id"]})
|
|
||||||
elements = browser("dom.query", {"selector": "body"})
|
|
||||||
assert isinstance(elements, list)
|
|
||||||
assert len(elements) > 0
|
|
||||||
assert elements[0].get("tag") == "body"
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Tests for group.* commands."""
|
"""Tests for group.* commands."""
|
||||||
import pytest
|
import pytest
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_group_list(browser):
|
def test_group_list(browser):
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"""Tests for navigate.* commands."""
|
"""Tests for navigate.* commands."""
|
||||||
import pytest
|
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_nav_open_and_close(browser):
|
def test_nav_open_and_close(browser):
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Tests for session.* commands."""
|
"""Tests for session.* commands."""
|
||||||
import time
|
import time
|
||||||
import pytest
|
|
||||||
from browser_cli.client import send_command
|
from browser_cli.client import send_command
|
||||||
from tests.conftest import TEST_BROWSER_PROFILE
|
from tests.conftest import TEST_BROWSER_PROFILE
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Tests for tabs.* commands."""
|
"""Tests for tabs.* commands."""
|
||||||
import pytest
|
import pytest
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_tabs_list(browser):
|
def test_tabs_list(browser):
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"""Tests for windows.* commands."""
|
"""Tests for windows.* commands."""
|
||||||
import pytest
|
|
||||||
from browser_cli.client import send_command
|
|
||||||
|
|
||||||
|
|
||||||
def test_windows_list(browser):
|
def test_windows_list(browser):
|
||||||
|
|||||||
Reference in New Issue
Block a user