Skip to content

Commit

Permalink
Add id to logo for testing. Update selectors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Nov 7, 2024
1 parent 77009f1 commit edc22c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jhub_apps/static/js/index.js

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions jhub_apps/tests/tests_e2e/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_panel_app_creation(playwright: Playwright, with_server_options) -> None
page.goto(BASE_URL)
sign_in_and_authorize(page, username=f"admin-{app_suffix}", password="password")
# Verify that the page is loaded
logo = page.get_by_alt_text("logo").last()
logo = page.locator("id=app-logo")
expect(logo).to_be_visible()
profile_menu = page.locator("id=profile-menu-btn").last()
profile_menu = page.locator("id=profile-menu-btn")
expect(profile_menu).to_be_visible()
page_title = page.locator("h1")
expect(page_title).to_have_text("Home")
Expand Down Expand Up @@ -97,16 +97,17 @@ def create_app(
):
logger.info("Creating App")
# Verify that the page is loaded
logo = page.get_by_alt_text("logo").last()
logo = page.locator("id=app-logo")
expect(logo).to_be_visible()
profile_menu = page.locator("id=profile-menu-btn").last()
profile_menu = page.locator("id=profile-menu-btn")
expect(profile_menu).to_be_visible()
page_title = page.locator("h1")
expect(page_title).to_have_text("Deploy a new app")

# Deploy App
deploy_button = page.get_by_role("button", name="Deploy App")
expect(deploy_button).to_be_visible()
deploy_button.click()
page_title = page.locator("h1")
expect(page_title).to_have_text("Deploy a new app")
logger.info("Fill App display Name")
display_name_field = page.get_by_label("*Name")
expect(display_name_field).to_be_visible()
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/navigation/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export const TopNavigation = ({ ...props }): React.ReactElement => {
sx={{ flexGrow: 1, display: { xs: 'none', sm: 'block' } }}
>
<Link href={APP_BASE_URL}>
<img src={getAppLogoUrl()} alt="logo" height="28" />
<img id="app-logo" src={getAppLogoUrl()} alt="logo" height="28" />
</Link>
</Box>
<Box sx={{ display: { xs: 'none', sm: 'block' } }}>
Expand Down

0 comments on commit edc22c0

Please sign in to comment.