Skip to content

Commit

Permalink
Fix playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaretnikov committed Feb 18, 2024
1 parent 03198ed commit c0d594a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/playwright/test_ux.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _create_new_environment(page, screenshot=False):
# ensure new filename in case this test is run multiple times
new_env_name = f'test_env_{random.randint(0, 100000)}'
# set timeout for building the environment
time_to_build_env = 2 * 60 * 1000 # 2 minutes in milliseconds
time_to_build_env = 5 * 60 * 1000 # 5 minutes in milliseconds

# Create the new environment
# click the + to create a new env
Expand Down Expand Up @@ -118,7 +118,7 @@ def _create_new_environment(page, screenshot=False):

# Interact with the environment shortly after creation
# click to open the Active environment dropdown manu
page.get_by_role("button", name=" - Active", exact=False).click()
page.get_by_text(" - Active", exact=False).click()
# click on the Active environment on the dropdown menu item (which is currently building)
page.get_by_role("option", name=" - Active", exact=False).click()
# ensure that the environment is building
Expand Down Expand Up @@ -193,7 +193,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=3*60*10
# change the description
page.get_by_placeholder("Enter here the description of your environment").fill("new description")
# change the vesion spec of an existing package
page.get_by_role("row", name="ipykernel", exact=False).get_by_role("button").first.click()
page.get_by_role("row", name="ipykernel", exact=False).get_by_role("combobox").first.click()
page.get_by_role("option", name=">=").click()
# Note: purposefully not testing version constraint since there is inconsistent behavior here

Expand Down Expand Up @@ -306,7 +306,7 @@ def test_integration(page: Page, test_config, screenshot):
# Use playwright.chromium, playwright.firefox or playwright.webkit
# Pass headless=False to launch() to see the browser UI
# slow_mo adds milliseconds to each playwright command so humans can follow along
browser = playwright.chromium.launch(headless=False, slow_mo=500)
browser = playwright.chromium.launch(headless=True, slow_mo=500)
page = browser.new_page()

# Go to http://localhost:{server_port}
Expand Down

0 comments on commit c0d594a

Please sign in to comment.