-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
super cool front end testing which defs is testing our front end
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import re | ||
from playwright.sync_api import Page, expect | ||
import unittest | ||
import requests | ||
from .base import BaseCase | ||
|
||
class TestFrontEnd(BaseCase): | ||
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() |