[WIP] Add new automated test framework (#1)
Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
859bd57006
commit
97ed87c79f
31 changed files with 769 additions and 6 deletions
29
src/tests_wordpress/test_wordpress.py
Normal file
29
src/tests_wordpress/test_wordpress.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import re
|
||||
|
||||
import pytest
|
||||
from playwright.sync_api import Page, expect
|
||||
|
||||
|
||||
def test_one():
|
||||
assert 1 + 1 == 2
|
||||
|
||||
|
||||
def test_two():
|
||||
assert 2 + 1 == 3
|
||||
|
||||
|
||||
def test_has_title(page: Page):
|
||||
page.goto("https://playwright.dev/")
|
||||
|
||||
# Expect a title "to contain" a substring.
|
||||
expect(page).to_have_title(re.compile("Playwright"))
|
||||
|
||||
|
||||
def test_get_started_link(page: Page):
|
||||
page.goto("https://playwright.dev/")
|
||||
|
||||
# Click the get started link.
|
||||
page.get_by_role("link", name="Get started").click()
|
||||
|
||||
# Expects page to have a heading with the name of Installation.
|
||||
expect(page.get_by_role("heading", name="Installation")).to_be_visible()
|
||||
Loading…
Add table
Add a link
Reference in a new issue