-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configured local testing, more TODO on the way.
- Loading branch information
1 parent
6d3d8fb
commit 02d0992
Showing
5 changed files
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.DS_Store | ||
.DS_Store | ||
playwright-tests/__pycache__ | ||
playwright-tests/.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from playwright.sync_api import sync_playwright | ||
|
||
|
||
def test_first_load(): | ||
with sync_playwright() as p: | ||
browser = p.chromium.launch() | ||
page = browser.new_page() | ||
page.goto('http://joshuamae.com') | ||
assert page.title() == 'Joshua Mae' | ||
browser.close() | ||
|
||
|
||
def main(): | ||
test_first_load() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from playwright.sync_api import sync_playwright, expect | ||
|
||
|
||
def test_header_links(): | ||
|
||
with sync_playwright() as p: | ||
browser = p.chromium.launch(headless=True) | ||
page = browser.new_page() | ||
page.goto('http://joshuamae.com') | ||
page.get_by_role("link", name="Github").click() | ||
page.wait_for_load_state() | ||
expect(page).to_have_url("https://github.com/joshua-mae") | ||
browser.close() | ||
|
||
|
||
def main(): | ||
test_header_links() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |