mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-28 06:53:12 +08:00
* Run tests in CI in parallel * make tests automatically open/close playwright * fix parallel tests and screenshots * fix capturing screenshots for non-failing tests * cleanup * cleanup * format * log js errors * provide screenshots as artifacts * remove old scripts
25 lines
674 B
Python
25 lines
674 B
Python
from django.urls import reverse
|
|
from playwright.sync_api import expect
|
|
|
|
from bookmarks.tests_e2e.helpers import LinkdingE2ETestCase
|
|
|
|
|
|
class GlobalShortcutsE2ETestCase(LinkdingE2ETestCase):
|
|
def test_focus_search(self):
|
|
self.open(reverse("linkding:bookmarks.index"))
|
|
|
|
self.page.press("body", "s")
|
|
|
|
expect(
|
|
self.page.get_by_placeholder("Search for words or #tags")
|
|
).to_be_focused()
|
|
|
|
def test_add_bookmark(self):
|
|
self.open(reverse("linkding:bookmarks.index"))
|
|
|
|
self.page.press("body", "n")
|
|
|
|
expect(self.page).to_have_url(
|
|
self.live_server_url + reverse("linkding:bookmarks.new")
|
|
)
|