13 lines
479 B
Python
13 lines
479 B
Python
# retoor <retoor@molodetz.nl>
|
|
from tests.conftest import goto_ready
|
|
|
|
|
|
def test_lightbox_opens_and_closes(page, app_server):
|
|
goto_ready(page, app_server + "/flyers")
|
|
page.locator("[data-lightbox]").first.click()
|
|
lightbox = page.locator("dp-lightbox")
|
|
assert lightbox.evaluate("el => el.classList.contains('visible')")
|
|
page.keyboard.press("Escape")
|
|
assert not lightbox.evaluate("el => el.classList.contains('visible')")
|
|
assert page.console_errors == []
|