Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable "explore in tool" on dev place pages #4785

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 3 additions & 2 deletions static/js/place/dev_place_main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,11 @@ const PlaceCharts = (props: {
return (
<div className="charts-container">
<SubjectPageMainPane
defaultEnclosedPlaceType={childPlaceType}
id="place-subject-page"
place={place}
pageConfig={pageConfig}
defaultEnclosedPlaceType={childPlaceType}
place={place}
showExploreMore={true}
/>
</div>
);
Expand Down
Loading