Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juliawu committed Dec 11, 2024
1 parent a6b3aa9 commit 996c02b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions server/webdriver/shared_tests/place_explorer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,17 @@ def test_dev_place_overview_california(self):
related_places_callout_el = WebDriverWait(
self.driver, self.TIMEOUT_SEC).until(related_places_callout_el_present)
self.assertEqual(related_places_callout_el.text, 'Places in California')

# Assert the "Download" link is present in charts
download_link_present = EC.presence_of_element_located(
(By.CLASS_NAME, 'download-outlink'))
download_link_el = WebDriverWait(
self.driver, self.TIMEOUT_SEC).until(download_link_present)
self.assertTrue('Download' in download_link_el.text)

# Assert the "Explore in ... Tool" link is present in charts
explore_in_link_present = EC.presence_of_element_located(
(By.CLASS_NAME, 'explore-in-outlink'))
explore_in_link_el = WebDriverWait(
self.driver, self.TIMEOUT_SEC).until(explore_in_link_present)
self.assertTrue('Explore in' in explore_in_link_el.text)
4 changes: 2 additions & 2 deletions static/js/components/tiles/chart_footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function ChartFooter(props: ChartFooterPropType): JSX.Element {
<div className="main-footer-section">
<div className="outlinks">
{props.handleEmbed && (
<div className="outlink-item">
<div className="outlink-item download-outlink">
<span className="material-icons-outlined">download</span>
<a
href="#"
Expand All @@ -66,7 +66,7 @@ export function ChartFooter(props: ChartFooterPropType): JSX.Element {
</div>
)}
{props.exploreLink && (
<div className="outlink-item">
<div className="outlink-item explore-in-outlink">
<span className="material-icons-outlined">timeline</span>
<a
href={props.exploreLink.url}
Expand Down

0 comments on commit 996c02b

Please sign in to comment.