This commit is contained in:
burnettk 2025-02-10 09:54:21 -05:00
parent 45c801b419
commit de3c01d160
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,34 @@
import pytest
from playwright.sync_api import sync_playwright, expect
def test_login_and_navigate():
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
# Navigate to the initial URL.
page.goto("http://localhost:7001/newui")
# Wait for the username field to appear (assuming redirect to login).
page.wait_for_selector("#username")
page.fill("#username", "nelson")
page.fill("#password", "nelson")
page.click("#spiff-login-button")
# Wait for navigation to complete after login. We'll wait for the
# target element to appear as a proxy for successful login and redirect.
page.wait_for_selector('[data-qa="nav-start-new process"]')
# Click the "Start New Process" navigation element.
page.click('[data-qa="nav-start-new process"]')
# Add an assertion here - for example, check the URL after clicking.
# Replace '/expected_url' with the actual URL you expect.
expect(page).to_have_url("http://localhost:7001/newui/startprocess")
browser.close()
if __name__ == "__main__":
pytest.main([__file__])

View File

@ -213,6 +213,7 @@ function SideNav({
{!isCollapsed && (
<ListItemText
primary={item.text}
data-qa={`nav-${item.text.toLowerCase().replace(' ', '-')}`}
primaryTypographyProps={{
fontSize: '0.875rem',
fontWeight: selectedTab === index ? 'bold' : 'normal',