Skip to content

Commit

Permalink
Python linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-next committed Nov 13, 2024
1 parent 872179c commit 49e9b10
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions server/webdriver/shared_tests/browser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,21 @@ def test_page_landing(self):
self.assertEqual(shared.safe_url_open(self.driver.current_url), 200)

# Assert page title is correct
WebDriverWait(self.driver, self.TIMEOUT_SEC).until(
EC.title_contains(title_text)
)
WebDriverWait(self.driver,
self.TIMEOUT_SEC).until(EC.title_contains(title_text))
self.assertIn(title_text, self.driver.title)

# Wait for title to be present
h1_locator = (By.CSS_SELECTOR, '#intro-text h1')
WebDriverWait(self.driver, self.TIMEOUT_SEC).until(
EC.text_to_be_present_in_element(h1_locator, 'Knowledge Graph')
)
EC.text_to_be_present_in_element(h1_locator, 'Knowledge Graph'))
h1_element = self.driver.find_element(*h1_locator)
self.assertEqual("Knowledge Graph", h1_element.text)

# Assert intro is correct
intro_locator = (By.CSS_SELECTOR, '#intro-text .container header p')
WebDriverWait(self.driver, self.TIMEOUT_SEC).until(
EC.presence_of_element_located(intro_locator)
)
EC.presence_of_element_located(intro_locator))
intro_element = self.driver.find_element(*intro_locator)
expected_intro_start = 'The Data Commons Knowledge Graph is constructed'
self.assertTrue(
Expand Down

0 comments on commit 49e9b10

Please sign in to comment.